:root {
    
    --stamp: #b0102a;
    --stamp-hover: #8f0d22;
    --brand: var(--stamp);
    --brand-hover: var(--stamp-hover);
    --brand-soft: rgba(176, 16, 42, 0.08);
    --plate: #1a1e26;
    --plate-dark: #0f1217;
    --primary: var(--plate);
    --primary-dark: var(--plate-dark);
    --primary-light: #eef0f4;
    --accent: var(--plate);
    --paper: #ebecef;
    --sheet: #ffffff;
    --bg: var(--paper);
    --bg-soft: #f4f5f7;
    --bg-gradient: none;
    --card: var(--sheet);
    --ink: #14171e;
    --text: var(--ink);
    --text-secondary: #4a5160;
    --text-muted: #6b7382;
    --rule: #d5d8e0;
    --rule-strong: #c5cad4;
    --border: var(--rule);
    --line: var(--rule);
    --success: #1a7f37;
    --warning: #b54708;
    --danger: var(--stamp);
    --shadow: 0 1px 2px rgba(20, 23, 30, 0.04), 0 1px 1px rgba(20, 23, 30, 0.02);
    --shadow-md: 0 6px 20px rgba(20, 23, 30, 0.07);
    --shadow-lg: 0 16px 40px rgba(20, 23, 30, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
    --header-height: 58px;
    --mbn-height: 0px;
    --gap: 16px;
    --card-pad: 20px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 0.16s;
    --dur: 0.28s;
    --z-dropdown: 80;
    --z-sticky: 100;
    --z-modal: 200;
    --focus-ring: 0 0 0 3px rgba(26, 30, 38, 0.14);
    --font: "HarmonyOS Sans SC", "HarmonyOS Sans", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
    --font-display: var(--font);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

::selection {
    background: rgba(176, 16, 42, 0.12);
    color: var(--ink);
}

:focus-visible {
    outline: 2px solid var(--plate);
    outline-offset: 2px;
}

.specimen-frame {
    border: none;
    box-shadow: none;
}

body {
    font-family: var(--font);
    background:
        radial-gradient(900px 420px at 10% -12%, rgba(26, 30, 38, 0.035), transparent 55%),
        linear-gradient(180deg, #e4e6eb 0%, var(--paper) 32%, var(--bg-soft) 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.62;
    font-size: 15px;
    letter-spacing: 0.01em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--stamp); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

.header {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(1.1) blur(12px);
    -webkit-backdrop-filter: saturate(1.1) blur(12px);
    height: var(--header-height);
    box-shadow: var(--shadow);
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
}

.header .logo { color: var(--ink); }
.header .nav a { color: var(--text-secondary); }
.header .nav a:hover,
.header .nav a.active {
    background: transparent;
    color: var(--ink);
}
.header .nav a.active {
    box-shadow: inset 0 -2px 0 var(--stamp);
}
.header .user-menu span { color: var(--text-secondary); font-size: 13px; }
.header .btn-ghost { color: var(--text-secondary); }
.header .btn-ghost:hover { background: var(--primary-light); color: var(--ink); }
.header .btn-outline {
    border-color: var(--rule);
    color: var(--ink);
    background: var(--sheet);
}
.header .btn-outline:hover { background: var(--bg-soft); border-color: var(--rule-strong); }
.header .btn-primary { background: var(--plate); color: #fff; }
.header .btn-primary:hover { background: var(--plate-dark); color: #fff; }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.01em;
    color: var(--ink);
    flex-shrink: 0;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 22px;
    padding: 0 7px;
    border-radius: 5px;
    background: var(--stamp);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.logo-icon { font-size: 28px; }

.nav { display: flex; align-items: center; gap: 0; flex: 1; justify-content: center; min-width: 0; }

.nav a {
    padding: 0 16px;
    height: var(--header-height);
    display: inline-flex;
    align-items: center;
    border-radius: 0;
    color: var(--text-secondary);
    font-size: 13.5px;
    font-weight: 550;
    letter-spacing: 0.01em;
    transition: color var(--dur-fast) var(--ease-out);
}

.nav a:hover, .nav a.active {
    background: transparent;
    color: var(--ink);
}

.nav-badge { position: relative; }

.nav-badge .badge {
    position: absolute;
    top: 12px;
    right: 5px;
    background: var(--stamp);
    color: #fff;
    font-size: 10px;
    padding: 0 5px;
    border-radius: 8px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    font-weight: 700;
}

.user-menu { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-soft);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    overflow: hidden;
    border: 1px solid var(--rule);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 550;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition:
        background var(--dur-fast) var(--ease-out),
        border-color var(--dur-fast) var(--ease-out),
        color var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-fast) var(--ease-out),
        transform var(--dur-fast) var(--ease-out);
    text-decoration: none;
}
.btn[hidden],
[hidden] {
    display: none !important;
}

.btn-primary {
    background: var(--plate);
    color: #fff;
    border-color: var(--plate);
    box-shadow: var(--shadow);
}
.btn-primary:hover {
    background: var(--plate-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.btn-outline {
    background: var(--sheet);
    border: 1px solid var(--rule);
    color: var(--ink);
    box-shadow: none;
}
.btn-outline:hover { background: var(--bg-soft); border-color: var(--rule-strong); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--primary-light); color: var(--ink); }
.btn-danger { background: var(--stamp); color: #fff; border-color: var(--stamp); }
.btn-danger:hover { background: var(--stamp-hover); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible { box-shadow: var(--focus-ring); }

.form-inline {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}
.form-inline .form-group { flex: 1; min-width: 0; margin: 0; }
.form-inline--center { align-items: center; }

.btn-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.page-toolbar h2 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.02em;
    min-width: 0;
    color: var(--ink);
}

.hero,
.home-top {
    background: transparent;
    color: var(--text);
    padding: 28px 0 12px;
    margin-bottom: 8px;
    position: relative;
    overflow: visible;
}
.hero::before { display: none; }
.hero .container,
.home-top .container { position: relative; z-index: 1; }
.hero h1 { display: none; }
.hero p { display: none; }

.search-bar {
    display: flex;
    max-width: 560px;
    width: 100%;
    background: var(--sheet);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--rule);
    box-shadow: var(--shadow);
}
.home-search { max-width: 560px; }

.search-bar input {
    flex: 1;
    border: none;
    padding: 13px 16px;
    font-size: 14px;
    outline: none;
    min-width: 0;
    background: transparent;
    color: var(--ink);
}
.search-bar input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0.01em;
    font-size: 14px;
    text-transform: none;
}

.search-bar button {
    background: var(--plate);
    color: #fff;
    border: none;
    padding: 0 22px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 550;
    letter-spacing: 0.01em;
}
.search-bar button:hover { background: var(--plate-dark); }

.home-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding: 12px 14px;
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.ns-select {
    position: relative;
    min-width: 160px;
    max-width: 100%;
    z-index: 1;
}
.ns-select.is-open {
    z-index: var(--z-dropdown);
}
.ns-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 160px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius-sm);
    background: var(--sheet);
    color: var(--ink);
    font-size: 13px;
    font-weight: 550;
    font-family: inherit;
    letter-spacing: 0.02em;
    cursor: pointer;
    text-align: left;
    box-shadow: none;
}
.ns-select-trigger:hover {
    border-color: var(--rule-strong);
    background: var(--paper);
}
.ns-select.is-open .ns-select-trigger {
    border-color: var(--plate);
    box-shadow: var(--focus-ring);
}
.ns-select-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ns-select-chevron {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    border-right: 1.5px solid #8a8a8a;
    border-bottom: 1.5px solid #8a8a8a;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.2s var(--ease-out, ease);
}
.ns-select.is-open .ns-select-chevron {
    transform: rotate(225deg) translateY(-2px);
}
.ns-select-panel {
    position: fixed;
    min-width: 200px;
    max-height: min(72vh, 440px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 1200;
    transform-origin: top center;
    animation: nsSelectDrop 0.2s var(--ease-out, ease) both;
}
.ns-select-option {
    display: block;
    padding: 12px 14px;
    border-radius: 4px;
    color: var(--ink);
    font-size: 14px;
    text-decoration: none;
    line-height: 1.4;
}
.ns-select-option:hover,
.ns-select-option:focus {
    background: var(--primary-light);
    color: var(--ink);
    outline: none;
}
.ns-select-option.is-active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
}
.ns-select--form {
    width: 100%;
    display: block;
    overflow: visible;
}
.ns-select--form .ns-select-trigger {
    width: 100%;
}
.ns-select--form .ns-select-panel {
    
    z-index: 50;
}
.card:has(.ns-select--form) {
    overflow: visible;
}
.ns-select-check {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.ns-select-check input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}
.ns-check-mark {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    border: 1.5px solid #9aa3b2;
    border-radius: 3px;
    background: #fff;
    position: relative;
    order: 0;
}
.ns-check-text {
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
    text-align: left;
}
.ns-select-check.is-active {
    background: var(--primary-light);
    color: var(--ink);
}
.ns-select-check.is-active .ns-check-mark {
    border-color: var(--primary);
    background: var(--primary);
}
.ns-select-check.is-active .ns-check-mark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.ns-select-check.is-active .ns-check-text {
    color: var(--ink);
    font-weight: 600;
}
@keyframes nsSelectDrop {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.category-select {
    display: none;
}

@media (max-width: 768px) {
    .ns-select {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        max-width: none;
    }
    .author-toolbar .ns-select {
        width: auto;
        min-width: 140px;
        flex: 0 1 auto;
    }
    .ns-select-trigger {
        min-height: 44px;
        min-width: 0;
        width: 100%;
        padding: 0 14px;
        font-size: 15px;
    }
    .ns-select-panel {
        max-height: min(70vh, 480px);
        box-shadow: var(--shadow-lg);
    }
    .ns-select-option {
        padding: 14px 14px;
        font-size: 15px;
    }
}

.home-toolbar-hint {
    color: var(--text-secondary);
    font-size: 13px;
}

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

.cover-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 42px;
    font-weight: 700;
    color: #94a3b8;
    background: #e2e8f0;
}

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

.category-tab {
    padding: 10px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.category-tab:hover, .category-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.author-resources {
    margin-top: 8px;
    margin-bottom: 40px;
}
.author-toolbar {
    align-items: center;
}
.author-res-title {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
    letter-spacing: -0.015em;
}
.author-resource-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.resource-card {
    background: var(--sheet);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--rule);
    box-shadow: var(--shadow);
    transition:
        transform var(--dur) var(--ease-out),
        box-shadow var(--dur) var(--ease-out),
        border-color var(--dur) var(--ease-out);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.resource-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--rule-strong);
}

.resource-cover {
    width: 100%;
    aspect-ratio: 3 / 4;
    height: auto;
    min-height: 0;
    background: linear-gradient(165deg, #e8ebf0 0%, #f3f4f7 55%, #e4e7ed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--rule);
}

.resource-cover img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center center;
    margin: 0;
}

.resource-price {
    display: none;
}
.resource-price-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
}
.resource-price-text.is-free { color: var(--success); font-weight: 550; }
.resource-pin-mark {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: var(--stamp);
    color: #fff;
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    padding: 5px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
}
.resource-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: rgba(26, 30, 38, 0.82);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 5px 8px;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.home-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}
.home-filters .ns-select {
    min-width: 108px;
}
.home-filters .ns-select-trigger {
    min-width: 108px;
    min-height: 30px;
    padding: 0 8px;
    font-size: 12px;
    border-radius: 6px;
}
.home-filters .ns-select-chevron {
    width: 8px;
    height: 8px;
}
.type-filter {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    background: #e8ebf0;
    border-radius: 6px;
}
.type-chip {
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}
.type-chip:hover { color: var(--ink); }
.type-chip.is-active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 2px rgba(18, 22, 30, 0.08);
}
.type-chip-official {
    background: #eef2f7;
    border: 1px solid #d5dde8;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
}
.home-custom-entry {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 650;
    color: #fff;
    background: var(--primary);
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
}
.home-custom-entry:hover { filter: brightness(1.05); color: #fff; }
.type-chip-official:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.type-chip-official.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: none;
}

.content-type-pick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.content-type-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.content-type-option input { position: absolute; opacity: 0; pointer-events: none; }
.content-type-option.is-active,
.content-type-option:has(input:checked) {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}
.cto-title { font-size: 15px; font-weight: 650; color: var(--ink); }
.cto-desc { font-size: 12px; color: var(--text-muted); }

.upload-page-wrap {
    max-width: 760px;
    margin: 32px auto 40px;
    width: 100%;
    box-sizing: border-box;
}
.upload-page-card {
    overflow-x: hidden;
    max-width: 100%;
}
body.page-upload {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y;
}

.form-hint-inline {
    font-weight: 400;
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 6px;
}
.cat-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.cat-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.cat-chip-check {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid #b8bec9;
    background: #fff;
    flex-shrink: 0;
    position: relative;
}
.cat-chip.is-active,
.cat-chip:has(input:checked) {
    border-color: var(--primary);
    background: rgba(28, 32, 40, 0.03);
    box-shadow: 0 0 0 1px var(--primary);
}
.cat-chip.is-active .cat-chip-check,
.cat-chip:has(input:checked) .cat-chip-check {
    border-color: var(--primary);
    background: var(--primary);
}
.cat-chip.is-active .cat-chip-check::after,
.cat-chip:has(input:checked) .cat-chip-check::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.cat-chip-text {
    font-size: 14px;
    font-weight: 550;
    color: var(--ink);
}

.spec-panels {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}
.spec-empty-hint {
    margin: 0;
    padding: 16px;
    font-size: 13px;
    color: var(--text-muted);
    background: #f3f4f7;
    border-radius: 8px;
}
.spec-panel {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fafbfc;
}
.spec-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.spec-panel-head strong {
    font-size: 15px;
    color: var(--ink);
}
.spec-panel-tag {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}
.spec-price-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 520px) {
    .spec-price-row { grid-template-columns: 1fr; }
}
.spec-existing-covers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}
.spec-existing-covers img {
    width: 40px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 550;
}
.activation-block {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}
.activation-fields { margin-top: 14px; }

.formula-editor {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #f7f7f8;
}
.formula-preview {
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #fff;
    border: 1px solid var(--line);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    color: var(--ink);
    margin-bottom: 10px;
    word-break: break-all;
}
.formula-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}
.formula-num-row,
.formula-import-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.formula-num-row input,
.formula-import-row input {
    flex: 1;
    min-width: 0;
}

.act-price-panels {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.act-price-row {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) minmax(140px, 1.2fr);
    gap: 12px;
    align-items: end;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.act-price-model {
    font-weight: 600;
    font-size: 14px;
    padding-bottom: 8px;
}

.act-need-tip {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f3f4f6;
    border: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}
.act-need-tip strong {
    color: var(--ink);
    font-weight: 650;
}

.orders-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 16px;
}
.orders-search {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
    min-width: 200px;
    max-width: 360px;
}
.orders-search input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
}

.order-card-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.order-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    padding: 14px 14px 12px;
}
.order-card.is-replaced {
    opacity: 0.72;
    background: rgba(28, 32, 40, 0.03);
}
.order-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.order-card-title {
    font-size: 15px;
    font-weight: 650;
    color: var(--ink);
    line-height: 1.4;
    word-break: break-word;
    text-decoration: none;
}
.order-card-title:hover { color: var(--brand); }
.order-card-price {
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 650;
    color: var(--ink);
    white-space: nowrap;
}
.order-card-cover {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border);
    flex-shrink: 0;
}
.order-card-head-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.order-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin: 0 0 12px;
}
.order-card-meta > div {
    min-width: 0;
}
.order-card-meta dt {
    margin: 0;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}
.order-card-meta dd {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--ink);
    word-break: break-word;
    line-height: 1.4;
}
.order-card-meta code {
    font-size: 13px;
    letter-spacing: 0.04em;
}
.order-card-code-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.order-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.order-card-hint {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}
@media (max-width: 640px) {
    .orders-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .orders-search {
        max-width: none;
        width: 100%;
        min-width: 0;
    }
    .order-card-meta {
        grid-template-columns: 1fr 1fr;
    }
}
.act-code-cell {
    font-size: 13px;
    margin-right: 6px;
}
.act-code-struck {
    text-decoration: line-through;
    opacity: 0.55;
}
tr.act-order-replaced td {
    opacity: 0.72;
    background: rgba(28, 32, 40, 0.03);
}
.device-refix-warn {
    font-size: 14px;
    line-height: 1.65;
    margin: 0 0 14px;
    color: #1a1d24;
}
.device-refix-warn .refix-em,
.refix-em {
    color: #c62828;
    font-weight: 700;
}
.device-digit-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.device-digit-box {
    width: 40px;
    height: 46px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border: 1px solid rgba(28, 32, 40, 0.2);
    border-radius: 8px;
    background: #fff;
}
.ding-bubble {
    border: 1px solid rgba(198, 40, 40, 0.25);
    background: rgba(198, 40, 40, 0.06);
}
.message-bubble.ding-bubble.sent {
    background: rgba(28, 32, 40, 0.08);
}
.author-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: 6px 0 10px;
}
.credit-badge {
    border: 1px solid rgba(28, 32, 40, 0.12);
    background: #f3f4f6;
    color: #1a1d24;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    cursor: pointer;
}
.credit-badge.credit-excellent { background: #e8f5e9; color: #1b5e20; }
.credit-badge.credit-good { background: #e3f2fd; color: #0d47a1; }
.credit-badge.credit-fair { background: #fff8e1; color: #e65100; }
.credit-badge.credit-poor { background: #fbe9e7; color: #bf360c; }
.seller-probation-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.seller-observe-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #fef3c7;
  color: #a16207;
  font-size: 13px;
  font-weight: 700;
  vertical-align: middle;
  letter-spacing: 0.02em;
}
.credit-badge.credit-bad { background: #ffebee; color: #b71c1c; }
.user-status-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
}
.user-status-banned { background: #ffebee; color: #b71c1c; }
.user-status-muted { background: #fff3e0; color: #e65100; }
.offline-trade-banner {
    margin: 0;
    padding: 12px 14px;
    background: #fff3e0;
    border-bottom: 2px solid #ef6c00;
    color: #e65100;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
    flex-shrink: 0;
}
.chat-mid-warn.credit-low-warn {
    margin: 0;
    padding: 10px 14px;
    text-align: center;
    background: linear-gradient(180deg, #fff8e8 0%, #fff3d6 100%);
    border-bottom: 1px solid rgba(183, 110, 0, 0.28);
    color: #8a5a00;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}
.chat-contradiction-banner {
    margin: 0;
    padding: 10px 14px;
    background: #f3f6fb;
    border-bottom: 1px solid rgba(40, 80, 140, 0.18);
    color: #2a4a72;
    font-size: 12.5px;
    line-height: 1.55;
    flex-shrink: 0;
}
.chat-contradiction-banner p {
    margin: 0 0 6px;
}
.chat-contradiction-banner p:last-child {
    margin-bottom: 0;
}
.message-bubble.has-offline-hint {
    outline: 2px solid rgba(230, 81, 0, 0.45);
    outline-offset: 2px;
}
.complaint-msg-pick {
    max-height: 220px;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
}
.complaint-msg-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    cursor: pointer;
}
.complaint-msg-item:last-child { border-bottom: 0; }

.home-ads {
    margin: 12px 0 4px;
}
.home-ads-carousel {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #e8e8ea;
    aspect-ratio: 16 / 5;
    max-height: 180px;
}
.home-ads-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    display: block;
}
.home-ads-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}
.home-ads-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.home-ads-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 6px;
}
.home-ads-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    background: rgba(255,255,255,0.55);
    cursor: pointer;
}
.home-ads-dot.is-active {
    background: #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}
@media (prefers-reduced-motion: reduce) {
    .home-ads-slide { transition: none; }
}
@media (max-width: 640px) {
    .act-price-row { grid-template-columns: 1fr; }
    .home-ads-carousel { aspect-ratio: 2.2 / 1; max-height: 140px; }
}

.act-mode-pick {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.act-mode-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 550;
    background: #fff;
    transition: border-color 0.15s ease;
}
.act-mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.act-mode-option.is-active,
.act-mode-option:has(input:checked) {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.resource-multi-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    z-index: 2;
    background: rgba(28, 32, 40, 0.88);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 5px 8px;
    border-radius: 3px;
    letter-spacing: 0.02em;
}

.spec-pick-block { margin-bottom: 16px; }
.spec-pick-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.spec-pick-option {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.spec-pick-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.spec-pick-option.is-active,
.spec-pick-option:has(input:checked) {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}
.spo-name {
    font-size: 14px;
    font-weight: 650;
    color: var(--ink);
    grid-column: 1;
}
.spo-fmt {
    font-size: 12px;
    color: var(--text-muted);
    grid-column: 1;
}
.spo-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    white-space: nowrap;
}

.activation-reveal {
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f7f8fa;
    text-align: center;
}
.activation-reveal-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.04em;
}
.activation-reveal-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: 0.06em;
    word-break: break-all;
    margin-bottom: 10px;
}
.activation-reveal-empty {
    margin: 0;
    font-size: 13px;
    color: var(--danger, #c0392b);
}

.cert-app-item {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.cert-app-item:last-child { border-bottom: none; }
.cert-app-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.cert-app-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.cert-app-note { font-size: 13px; color: var(--text-secondary); margin-top: 8px; }

.certify-page {
    max-width: 720px;
    margin: 28px auto 40px;
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}
.certify-card {
    margin-bottom: 16px;
    overflow: visible;
}
.certify-current {
    margin: 0;
    line-height: 1.6;
    word-break: break-word;
}
.certify-muted {
    color: var(--text-muted);
    margin: 0;
}
.certify-form .form-group {
    margin-bottom: 14px;
}
.certify-form select,
.certify-form textarea,
.certify-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}
.certify-form textarea {
    resize: vertical;
    min-height: 96px;
}
.certify-page .user-title-badge {
    margin-left: 0;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    border-radius: 6px;
    line-height: 1.35;
}

.welcome-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(720px 380px at 12% 0%, rgba(255,255,255,0.9), transparent 55%),
        linear-gradient(165deg, #e4e7ed 0%, #eef0f4 45%, #e6e8ee 100%);
}
.welcome-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 48px;
}
.welcome-card {
    width: min(440px, 100%);
    background: rgba(251,251,252,0.97);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 32px 26px 26px;
    box-shadow: 0 18px 48px rgba(18,22,30,0.1);
}
.welcome-kicker {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}
.welcome-title {
    font-size: 26px;
    font-weight: 650;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
    color: var(--ink);
}
.welcome-desc {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 22px;
}
.welcome-nav {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}
.welcome-prefs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.welcome-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 14px;
    color: var(--ink);
}
.welcome-switch.is-locked { opacity: 0.72; background: #f0f1f4; }
.welcome-switch input { width: 18px; height: 18px; flex-shrink: 0; }
.welcome-reminders {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.welcome-reminder {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.welcome-reminder.is-in {
    opacity: 1;
    transform: none;
}
.welcome-ack {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--ink);
}
.welcome-ack input { margin-top: 3px; }
.welcome-swipe {
    text-align: center;
    padding: 28px 0 12px;
    margin: 8px 0 16px;
}
.welcome-swipe-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}
.welcome-swipe-arrow {
    font-size: 22px;
    animation: welcomeBounce 1.2s ease-in-out infinite;
}
@keyframes welcomeBounce {
    0%, 100% { transform: translateY(0); opacity: 0.55; }
    50% { transform: translateY(-6px); opacity: 1; }
}
.welcome-start-btn { min-width: 160px; }
@media (prefers-reduced-motion: reduce) {
    .welcome-reminder { opacity: 1; transform: none; transition: none; }
    .welcome-swipe-arrow { animation: none; }
}

.resource-info {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    background: var(--sheet);
}

.resource-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--ink);
}

.resource-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    text-transform: none;
}

.resource-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.resource-author .avatar { width: 22px; height: 22px; font-size: 11px; border-radius: 50%; }

.card {
    background: var(--sheet);
    border-radius: var(--radius);
    border: 1px solid var(--rule);
    box-shadow: var(--shadow);
    padding: var(--card-pad);
    margin-bottom: var(--gap);
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rule);
    color: var(--ink);
}

.form-group { margin-bottom: 14px; }

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-size: 13.5px;
    font-weight: 550;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    outline: none;
    transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
    font-family: inherit;
    background: #fff;
    color: var(--ink);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: var(--focus-ring);
}

.form-group textarea { resize: vertical; min-height: 100px; }

.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.file-upload {
    border: 1.5px dashed var(--border);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.file-upload:hover { border-color: var(--primary); background: var(--primary-light); }
.file-upload.is-dragover {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: inset 0 0 0 1px var(--primary);
}
.file-upload input { display: none; }
.file-upload-icon { font-size: 36px; margin-bottom: 8px; }

.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
}

.alert-success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; }
.alert-error { background: #fff2f0; color: #cf1322; border: 1px solid #ffccc7; }
.alert-warning { background: #fffbe6; color: #d48806; border: 1px solid #ffe58f; }
.alert-info { background: #e6f7ff; color: #096dd9; border: 1px solid #91d5ff; }
.upload-rules-notice {
    line-height: 1.7;
}
.upload-rules-notice p {
    margin: 0 0 6px;
}
.upload-rules-notice p:last-child {
    margin-bottom: 0;
}
.upload-rules-notice a {
    color: inherit;
    font-weight: 650;
    text-decoration: underline;
}

.detail-page {
    padding-top: 8px;
}
.detail-page-nav {
    display: flex;
    align-items: center;
    margin: 4px 0 8px;
    min-height: 40px;
}
.detail-page-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: -6px;
    min-height: 44px;
    padding: 10px 12px 10px 8px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 550;
    line-height: 1;
    text-decoration: none;
    border-radius: 8px;
    touch-action: manipulation;
    transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.detail-page-back:hover {
    color: var(--ink);
    background: var(--primary-light);
}
.detail-page-back-icon {
    font-size: 18px;
    line-height: 1;
    transform: translateY(-0.5px);
}
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    margin-top: 12px;
    align-items: start;
}

.detail-cover {
    width: 100%;
    max-width: 240px;
    aspect-ratio: 3 / 4;
    height: auto;
    max-height: none;
    min-height: 0;
    margin: 0 auto;
    border-radius: var(--radius);
    background: #eceef2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    overflow: hidden;
    position: relative;
}

.detail-cover img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    max-width: none;
    object-fit: contain;
    object-position: center center;
    margin: 0;
}

.detail-cover .cover-preview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 100%;
    max-height: none;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.detail-cover .cover-preview-btn img {
    pointer-events: none;
    object-fit: contain;
    object-position: center center;
}

.detail-info h1 { font-size: 24px; margin-bottom: 12px; }
.detail-desc { color: var(--text-secondary); margin: 16px 0; line-height: 1.8; }
.detail-desc.is-collapsible:not(.is-expanded) .detail-desc-body {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    max-height: 5.4em;
}
.detail-desc-toggle {
    display: inline-block;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-primary, #111);
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.detail-desc-toggle:hover { opacity: 0.75; }

.detail-stats {
    display: flex;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 16px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.author-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg);
    border-radius: 8px;
    margin: 16px 0;
}

.author-card .avatar { width: 48px; height: 48px; }

.home-section-title {
    margin: 10px 0 14px;
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.015em;
    color: var(--ink);
}

.home-user-search {
    margin-bottom: 20px;
}

.user-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}

.user-search-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.user-search-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.user-search-card .avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.user-search-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-search-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-search-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.price-tag {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin: 16px 0;
}

.message-page {
    margin-top: 16px;
    margin-bottom: 16px;
}

body.page-messages .message-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - 32px);
    max-height: calc(100vh - var(--header-height) - 32px);
    margin-top: 12px;
    margin-bottom: 12px;
    min-height: 0;
}

.message-layout {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.conversation-list {
    border-right: 1px solid var(--border);
    min-height: 0;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.conversation-item:hover, .conversation-item.active { background: var(--primary-light); }

.conversation-item .avatar { width: 40px; height: 40px; flex-shrink: 0; }

.conversation-info { flex: 1; min-width: 0; }
.conversation-name { font-weight: 500; font-size: 14px; }
.conversation-preview {
    font-size: 13px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.conversation-time { font-size: 12px; color: var(--text-muted); }

.unread-dot {
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    flex-shrink: 0;
}

.chat-area {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.chat-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 0;
    background: var(--card);
    z-index: 2;
}

.chat-back {
    display: none;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--ink, #1a1d24);
    font-size: 20px;
    line-height: 1;
    border-radius: 8px;
}

.chat-back:hover { background: var(--primary-light, #f3f4f6); }

.chat-header-name-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}
.chat-header-name-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.chat-header-identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
    line-height: 1.2;
}
.chat-presence {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted, #8b919a);
}
.chat-presence.is-online {
    color: #1a7f4b;
}
.chat-presence.is-online::before,
.chat-presence.is-offline::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    background: currentColor;
    opacity: 0.85;
}
.chat-presence.is-online::before {
    background: #22a55a;
}
.chat-presence.is-offline::before {
    background: #a0a6b0;
}

.chat-resource-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 0;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 5;
}
.chat-resource-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
    text-decoration: none;
    color: inherit;
}
.chat-resource-cover {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--fill-tertiary, #eee);
}
.chat-resource-cover.is-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-muted);
}
.chat-resource-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.chat-resource-title {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-resource-price {
    font-size: 12px;
    color: var(--text-muted);
}
.chat-resource-buy {
    flex-shrink: 0;
    white-space: nowrap;
}

@media (max-width: 640px) {
    body.page-messages .chat-resource-bar {
        padding: 8px 10px;
    }
    body.page-messages .chat-resource-buy {
        padding: 6px 10px;
        font-size: 12px;
    }
}

.chat-header-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    max-width: none;
}

.chat-header-actions .btn {
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.3;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-danger-text { color: var(--danger, #dc2626) !important; }

.chat-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.message-bubble.sent {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 2px;
}

.message-bubble.received {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}

.message-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.message-bubble.is-tip {
    max-width: min(220px, 72%);
    padding: 0;
    background: transparent !important;
    border: none !important;
    color: inherit;
    box-shadow: none !important;
}
.message-bubble.is-tip .message-time {
    padding: 0 2px;
    margin-top: 6px;
}
.message-bubble.is-tip.sent .message-time { text-align: right; }
.wx-tip-card {
    width: 100%;
    min-width: 180px;
    border-radius: 6px;
    overflow: hidden;
    background: #f6a723;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
.message-bubble.is-tip.sent .wx-tip-card {
    background: #f6a723;
}
.message-bubble.is-tip.received .wx-tip-card {
    background: #f6a723;
}
.wx-tip-main {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 14px 12px;
}
.wx-tip-icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    margin-top: 1px;
    display: inline-flex;
}
.wx-tip-icon svg { display: block; }
.wx-tip-text { min-width: 0; flex: 1; }
.wx-tip-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.01em;
}
.wx-tip-amount {
    margin-top: 6px;
    font-size: 20px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    line-height: 1.2;
}
.wx-tip-note {
    margin-top: 6px;
    font-size: 12px;
    line-height: 1.35;
    opacity: 0.92;
    word-break: break-word;
}
.wx-tip-foot {
    padding: 7px 14px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 11px;
    line-height: 1.2;
    opacity: 0.92;
    background: rgba(0, 0, 0, 0.04);
}
.wx-tip-foot span {
    display: inline-block;
}

.tip-sheet[hidden] { display: none !important; }
.tip-sheet {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}
.tip-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 14, 18, 0.55);
}
.tip-sheet-panel {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: min(92dvh, 680px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f7f7f8;
    border-radius: 16px 16px 0 0;
    padding: 22px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(0,0,0,0.2);
    animation: tipSheetUp 0.28s var(--ease-out, ease) both;
    box-sizing: border-box;
}
@keyframes tipSheetUp {
    from { transform: translateY(24px); opacity: 0.6; }
    to { transform: none; opacity: 1; }
}
.tip-sheet-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: #8a8a92;
    cursor: pointer;
    line-height: 1;
}
.tip-to {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 22px;
}
.tip-to-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: #e6e6ea;
    color: #4a4a52;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 650;
    flex-shrink: 0;
}
.tip-to-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tip-to-label { font-size: 12px; color: #8a8a92; }
.tip-to-name { font-size: 17px; font-weight: 650; color: #1c1c1e; }
.tip-amount-label {
    display: block;
    font-size: 13px;
    color: #6b6b73;
    margin-bottom: 8px;
}
.tip-amount-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    border-bottom: 1px solid #d8d8de;
    padding-bottom: 8px;
}
.tip-yen {
    font-size: 28px;
    font-weight: 700;
    color: #1c1c1e;
}
.tip-amount-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: clamp(28px, 9vw, 40px);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #1c1c1e;
    outline: none;
    min-width: 0;
    font-variant-numeric: tabular-nums;
    width: 100%;
}
.tip-amount-input::placeholder { color: #c4c4ca; }
.tip-chips {
    display: flex;
    gap: 8px;
    margin: 16px 0 8px;
}
.tip-chips button {
    flex: 1;
    border: 1px solid #d8d8de;
    background: #fff;
    border-radius: 8px;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1c1c1e;
    cursor: pointer;
}
.tip-chips button:hover { border-color: #07c160; color: #07c160; }
.tip-note-toggle {
    display: block;
    width: 100%;
    margin: 10px 0 0;
    border: none;
    background: transparent;
    color: #576b95;
    font-size: 14px;
    text-align: left;
    padding: 8px 0;
    cursor: pointer;
}
.tip-note-input {
    width: 100%;
    margin-top: 8px;
    border: 1px solid #d8d8de;
    border-radius: 8px;
    padding: 12px 12px;
    font-size: 14px;
    background: #fff;
}
.tip-balance {
    margin: 16px 0 8px;
    font-size: 13px;
    color: #8a8a92;
}
.tip-balance strong { color: #4a4a52; font-weight: 600; }
.tip-pay-pwd {
    margin: 12px 0 4px;
    text-align: left;
}
.tip-pay-pwd label {
    display: block;
    font-size: 13px;
    color: #6a6a72;
    margin-bottom: 6px;
}
.tip-pay-pwd input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 10px;
    font-size: 16px;
    letter-spacing: .2em;
    box-sizing: border-box;
}
.tip-err {
    margin: 0 0 10px;
    font-size: 13px;
    color: #c8102e;
}
.tip-submit,
.tip-sheet-done {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 650;
    cursor: pointer;
    background: #07c160;
    color: #fff;
}
.tip-submit:disabled { opacity: 0.55; cursor: wait; }
.tip-submit:hover:not(:disabled),
.tip-sheet-done:hover { background: #06ad56; }
.tip-success {
    text-align: center;
    padding: 28px 8px 8px;
}
.tip-success-check {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #07c160;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tip-success-title {
    font-size: 18px;
    font-weight: 650;
    color: #1c1c1e;
}
.tip-success-amount {
    margin-top: 10px;
    font-size: 34px;
    font-weight: 700;
    color: #1c1c1e;
    font-variant-numeric: tabular-nums;
}
.tip-success-desc {
    margin: 10px 0 18px;
    font-size: 13px;
    color: #8a8a92;
}
.tip-success-link {
    display: inline-block;
    margin-bottom: 16px;
    color: #576b95;
    font-size: 14px;
}
@media (max-width: 768px) {
    .tip-sheet-panel {
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
    }
    .tip-chips {
        flex-wrap: wrap;
    }
    .tip-chips button {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }
}
@media (min-width: 769px) {
    .tip-sheet { align-items: center; padding: 24px; }
    .tip-sheet-panel {
        border-radius: 14px;
        padding: 26px 24px 22px;
        width: min(420px, 100%);
    }
}
@media (prefers-reduced-motion: reduce) {
    .tip-sheet-panel { animation: none; }
}

.chat-input-disabled {
    flex-shrink: 0;
    margin: 0 !important;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--card);
    align-items: center;
    z-index: 2;
}

.chat-input input[type="text"],
.chat-input input:not([type="hidden"]):not([type="file"]) {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    background: #fff;
    color: var(--ink, #1a1d24);
}

.chat-input .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.offline-trade-banner {
    flex-shrink: 0;
}

.profile-header {
    background: #fff;
    color: var(--ink);
    padding: 28px 0;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-info .avatar {
    width: 72px;
    height: 72px;
    font-size: 28px;
    border: 1px solid var(--line);
    background: #f5f5f5;
}

.profile-stats {
    display: flex;
    gap: 32px;
    margin-top: 16px;
}

.profile-stat { text-align: center; }
.profile-stat .num { font-size: 20px; font-weight: 600; color: var(--ink); }
.profile-stat .label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
a.profile-stat {
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    padding: 4px 8px;
    margin: -4px -8px;
    transition: background .15s ease;
}
a.profile-stat:hover { background: rgba(18, 22, 30, 0.06); }

.owner-dash {
    margin: 16px 0 4px;
    padding: 14px 16px;
    border: 1px solid rgba(18, 22, 30, 0.1);
    border-radius: 12px;
    background: #f4f5f7;
}
.owner-dash-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.owner-dash-head strong { font-size: 14px; color: var(--ink); }
.owner-dash-hint { font-size: 11px; color: var(--text-muted); }
.owner-dash-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
@media (min-width: 520px) {
    .owner-dash-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.owner-dash-item {
    background: #fff;
    border: 1px solid rgba(18, 22, 30, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
}
.owner-dash-item .od-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.owner-dash-item .od-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
}
.owner-dash-item .od-input {
    width: 100%;
    border: 1px solid rgba(18, 22, 30, 0.14);
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
    background: #fff;
}
.owner-dash-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.owner-dash-boost {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(18, 22, 30, 0.1);
}
.owner-dash-boost-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.owner-dash-boost-head strong {
    font-size: 13px;
    color: var(--ink);
}
.owner-dash-boost-status {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
    line-height: 1.45;
}
.owner-dash-boost-pkgs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.owner-boost-pkg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(18, 22, 30, 0.12);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font: inherit;
    color: inherit;
}
.owner-boost-pkg.is-active {
    border-color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--ink);
}
.owner-boost-pkg .obp-name {
    font-weight: 650;
    font-size: 13px;
}
.owner-boost-pkg .obp-meta {
    font-size: 12px;
    color: var(--text-muted);
}
.owner-boost-pkg .obp-price {
    margin-left: auto;
    font-weight: 700;
    color: var(--brand, #b0102a);
    font-size: 14px;
}
.owner-dash-boost-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.owner-dash-page-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0 0 14px;
}
.owner-dash-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.owner-dash-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 14px 16px;
    border: 1px solid rgba(18, 22, 30, 0.1);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    color: inherit;
    font: inherit;
}
.owner-dash-row:hover {
    border-color: rgba(18, 22, 30, 0.2);
    background: #f8f9fb;
}
.owner-dash-row-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.owner-dash-row-main strong {
    font-size: 15px;
    color: var(--ink);
}
.owner-dash-row-meta {
    font-size: 12px;
    color: var(--text-muted);
}
.owner-dash-row-cta {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}
.owner-dash-modal {
    position: fixed;
    inset: 0;
    z-index: 100040;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}
.owner-dash-modal[hidden] { display: none !important; }
.owner-dash-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 22, 30, 0.45);
}
.owner-dash-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    max-height: min(90dvh, 640px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0;
    box-sizing: border-box;
}
@media (min-width: 720px) {
    .owner-dash-modal { align-items: center; padding: 16px; }
    .owner-dash-modal-panel {
        border-radius: 14px;
        width: min(520px, 100%);
        padding: 16px;
    }
}

.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}

.tab-nav a {
    padding: 12px 24px;
    color: var(--text-secondary);
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.tab-nav a:hover, .tab-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table th, table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 13px;
}

table tr:hover { background: #fafafa; }

.status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-published { background: #f6ffed; color: #389e0d; }
.status-pending { background: #fffbe6; color: #d48806; }
.status-rejected { background: #fff2f0; color: #cf1322; }
.status-offline { background: #f5f5f5; color: #999; }
.status-draft { background: #e6f7ff; color: #096dd9; }

.membership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.membership-card {
    background: var(--card);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    transition: all 0.2s;
}

.membership-card:hover, .membership-card.featured {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(255,103,0,0.15);
}

.membership-card.featured { position: relative; }

.membership-card .price {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
    margin: 16px 0;
}

.membership-card .price span { font-size: 14px; font-weight: 400; }

.membership-benefits {
    text-align: left;
    margin: 20px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.membership-benefits li {
    padding: 6px 0;
    list-style: none;
}

.membership-benefits li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: 700;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 32px 0;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    text-decoration: none;
}

.page-btn:hover, .page-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.footer {
    background: var(--plate);
    color: #a8adb8;
    padding: 22px 0;
    margin-top: auto;
    text-align: center;
    font-size: 12.5px;
    letter-spacing: 0.04em;
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer a { color: #e8e6e1; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-contact-btn {
    display: inline;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    color: #e8e6e1;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}
.footer-contact-btn:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.footer-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0 8px;
    white-space: normal;
    overflow: visible;
    word-break: break-word;
    text-align: center;
    line-height: 1.55;
    font-size: 12px;
    color: var(--text-muted, #6f7582);
}
.footer-line a {
    display: inline;
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.footer-beian {
    color: var(--text-muted, #6f7582) !important;
}
.footer-beian:hover {
    color: var(--ink, #1d1d1f) !important;
}

.footer-sep {
    margin: 0 8px;
    opacity: 0.35;
    user-select: none;
}

.footer-more-btn {
    display: inline;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.footer-more-btn:hover,
.footer-more-btn.is-open {
    color: var(--ink, #1d1d1f);
}
.footer-more {
    margin: 12px auto 0;
    max-width: 36rem;
    padding: 10px 12px 2px;
    text-align: center;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-muted, #6f7582);
}
.footer-more[hidden] { display: none !important; }
.footer-more p { margin: 0 0 6px; }
.footer-more-check {
    display: inline-block;
    margin-right: 4px;
    color: #1a7f4b;
    font-weight: 700;
}

.footer-muted { color: #6f7582; }

.mobile-bottom-nav {
    display: none;
}

.profile-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.profile-overview-grid .card {
    text-align: center;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.profile-overview-grid .card-icon {
    font-size: 28px;
}

.profile-overview-grid .card-label {
    font-weight: 600;
    margin-top: 6px;
    font-size: 14px;
}

.container.profile-page,
.profile-header > .container {
    max-width: 1200px;
    width: 100%;
    padding-left: 24px;
    padding-right: 24px;
    margin-left: auto;
    margin-right: auto;
}

.profile-page .profile-tab-nav,
.profile-tab-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0;
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    max-width: 100%;
}
.profile-page .profile-tab-nav a,
.profile-tab-nav a {
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    writing-mode: horizontal-tb !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.3;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    text-align: center;
}
.profile-page .profile-tab-nav a:hover,
.profile-page .profile-tab-nav a.active,
.profile-tab-nav a:hover,
.profile-tab-nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.profile-balance {
    opacity: 0.85;
    font-size: 14px;
}

.profile-member-tag {
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    margin-top: 8px;
    display: inline-block;
}

.profile-header-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-btn-ghost {
    border-color: var(--line) !important;
    color: var(--ink) !important;
}

.profile-overview-list {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.profile-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
    font-weight: 500;
}

.profile-link-row:last-child {
    border-bottom: none;
}

.profile-link-row:hover {
    background: #f8fafc;
    color: var(--text);
}

.profile-link-row .chev {
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
}

.rules-section-title {
    margin: 8px 0 12px;
    font-size: 16px;
}

.rules-doc {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    font-size: 14px;
    line-height: 1.75;
    max-height: 420px;
    overflow-y: auto;
}

.stats-hero {
    background: #fff;
    color: var(--ink);
    padding: 32px 0 20px;
    border-bottom: 1px solid var(--line);
}

.stats-hero-inner h1 {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0;
    margin: 0 0 6px;
}

.stats-eyebrow { display: none; }

.stats-desc {
    color: var(--text-secondary);
    max-width: 42rem;
    font-size: 14px;
}

.stats-status {
    margin-top: 10px;
    display: inline-block;
    padding: 0;
    border-radius: 0;
    font-size: 13px;
    background: transparent;
    color: var(--text-muted);
}

.stats-status.is-live { color: var(--success); }
.stats-status.is-offline { color: var(--brand); }

.stats-page {
    padding: 28px 0 48px;
}

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

.stats-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 18px;
    min-width: 0;
}

.stats-card h2 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.stats-value {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

.stats-meta {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.stats-footnote {
    margin-top: 24px;
    font-size: 14px;
}

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

@media (max-width: 720px) {
    .stats-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }
    .stats-card {
        flex: 0 0 min(70vw, 210px);
        scroll-snap-align: start;
        padding: 16px 14px;
    }
    .stats-value { font-size: 24px; }
}

.wallet-page { margin-top: 28px; margin-bottom: 40px; }
.wallet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}
.wallet-header h1 { font-size: 24px; font-weight: 700; }
.wallet-stats { margin-bottom: 20px; }
.wallet-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.wallet-nav a {
    padding: 8px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    font-size: 14px;
}
.wallet-nav a.active,
.wallet-nav a:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.wallet-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.wallet-entry {
    display: block;
    padding: 18px 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: inherit;
    text-decoration: none;
}
.wallet-entry:hover {
    border-color: #94a3b8;
    color: inherit;
}
.wallet-entry strong {
    display: block;
    font-size: 16px;
    margin-bottom: 6px;
}
.wallet-entry span {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}
.wallet-hint, .wallet-meta {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}
.wallet-confirm-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}
.wallet-confirm-table {
    width: 100%;
    font-size: 14px;
    line-height: 1.9;
}
.wallet-confirm-table td:first-child {
    color: var(--text-muted);
    width: 120px;
}
.wallet-confirm-group {
    padding-top: 12px !important;
    font-weight: 600;
    color: var(--text) !important;
}
.wallet-agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    cursor: pointer;
    line-height: 1.6;
}
.wallet-agree input { margin-top: 4px; width: 18px; height: 18px; }
.wallet-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.wallet-form-split {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
button.is-processing,
.btn.is-processing {
    opacity: 0.65;
    cursor: wait;
}
.ncoin-price {
    font-size: 18px;
    color: #c2410c;
    margin-bottom: 12px;
    font-weight: 600;
}

.cover-preview-btn {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
    position: relative;
}
.cover-preview-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cover-preview-hint {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
}
.img-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.img-preview-modal[hidden] { display: none !important; }
.img-preview-modal img {
    max-width: min(960px, 100%);
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.img-preview-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

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

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.chat-tools { display: flex; gap: 2px; align-items: center; }
.chat-tool-btn {
    min-width: 36px;
    min-height: 36px;
    padding: 4px 8px !important;
    color: #5c5c66 !important;
    font-size: 15px !important;
}
.chat-emoji-panel {
    position: absolute;
    bottom: 54px;
    left: 8px;
    right: 8px;
    max-height: 168px;
    overflow-y: auto;
    background: #f7f7f8;
    border: 1px solid #e5e5ea;
    border-radius: 12px;
    padding: 8px 6px;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 2px;
    z-index: 5;
    box-shadow: 0 6px 18px rgba(28, 32, 40, 0.08);
}
.chat-emoji-panel[hidden] { display: none !important; }
.chat-emoji-item {
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 8px 0;
    border-radius: 8px;
}
.chat-emoji-item:hover,
.chat-emoji-item:active { background: #ececef; }
.chat-img-name { font-size: 11px; color: var(--text-muted); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-bubble.is-image { padding: 6px; max-width: min(260px, 75%); background-clip: padding-box; }
.message-bubble.is-image a.chat-img-link {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
    -webkit-tap-highlight-color: transparent;
}
.message-bubble .chat-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: min(280px, 52vh);
    object-fit: cover;
    border-radius: 8px;
    background: #ececef;
    min-height: 40px;
}
.chat-img-cap { font-size: 13px; margin-top: 6px; padding: 0 4px; line-height: 1.4; }
.message-bubble.is-image.sent .chat-img-cap { color: rgba(255,255,255,0.92); }
.message-bubble.is-image .message-time { padding: 0 4px; }

.chat-img-lightbox[hidden] { display: none !important; }
.chat-img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    background: rgba(8, 10, 14, 0.92);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
    touch-action: none;
}
.chat-img-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
}
.chat-img-lightbox-close {
    position: absolute;
    top: max(10px, env(safe-area-inset-top, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 1;
    touch-action: manipulation;
}
html.chat-img-preview-open,
html.chat-img-preview-open body,
body.chat-img-preview-open {
    overflow: hidden !important;
}
body.page-messages.chat-img-preview-open {
    overflow: hidden !important;
}
body.page-messages .chat-input { position: relative; flex-wrap: wrap; }
body.page-messages .chat-input input[name="content"] { flex: 1; min-width: 120px; }

.empty-state .icon { font-size: 48px; margin-bottom: 16px; }

.ns-pay[hidden] { display: none !important; }
.ns-pay {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}
.ns-pay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}
.ns-pay-sheet {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: min(94dvh, 720px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f7f7f8;
    border-radius: 16px 16px 0 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
    animation: nsPayUp 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
    box-sizing: border-box;
}
@keyframes nsPayUp {
    from { transform: translateY(100%); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
}
.ns-pay-close {
    position: absolute;
    top: 10px;
    left: 12px;
    border: 0;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    color: #8a8a92;
    cursor: pointer;
    z-index: 1;
    width: 40px;
    height: 40px;
}
.ns-pay-brand {
    text-align: center;
    font-size: 13px;
    font-weight: 650;
    color: #07c160;
    margin: 4px 0 8px;
}
.ns-pay-title {
    text-align: center;
    font-size: 16px;
    font-weight: 650;
    color: #1c1c1e;
    margin-bottom: 6px;
}
.ns-pay-amount {
    text-align: center;
    font-size: clamp(22px, 7vw, 28px);
    font-weight: 700;
    color: #1c1c1e;
    margin: 4px 0 14px;
    letter-spacing: -0.02em;
}
.ns-pay-dots {
    display: flex;
    justify-content: center;
    gap: clamp(6px, 2vw, 8px);
    margin: 8px 0 12px;
    padding: 0 4px;
}
.ns-pay-dots i {
    width: clamp(36px, 10vw, 40px);
    height: clamp(36px, 10vw, 40px);
    border-radius: 8px;
    border: 1px solid #d5d5da;
    background: #fff;
    position: relative;
    flex-shrink: 0;
}
.ns-pay-dots i.on::after {
    content: '';
    position: absolute;
    inset: 50% auto auto 50%;
    width: 10px;
    height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: #1c1c1e;
}
.ns-pay-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: #576b95;
    margin-bottom: 10px;
}
.ns-pay-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.ns-pay-pad button {
    min-height: 48px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    font-size: 22px;
    font-weight: 600;
    color: #1c1c1e;
    font-family: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.ns-pay-pad button:active { background: #ececef; }
.ns-pay-pad-empty { visibility: hidden; }
.ns-pay-pad-del { font-size: 18px !important; color: #64646e !important; }
.ns-pay-loading, .ns-pay-result {
    min-height: min(52dvh, 320px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 12px 20px;
    text-align: center;
}
.ns-pay-spinner {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid #dfe5e1;
    border-top-color: #07c160;
    animation: nsPaySpin 0.75s linear infinite;
    margin-bottom: 16px;
}
@keyframes nsPaySpin { to { transform: rotate(360deg); } }
.ns-pay-loading-brand {
    font-size: 18px;
    font-weight: 700;
    color: #07c160;
    margin-bottom: 6px;
}
.ns-pay-loading-text { font-size: 14px; color: #8a8a92; }
.ns-pay-pre-sub { margin-top:10px; font-size:12.5px; color:#a0a0a8; line-height:1.65; padding:0 18px; }
.ns-pay-view[data-view="pre"] .ns-pay-loading-text {
    font-size:15px; font-weight:600; color:#1c1c1e; letter-spacing:.01em;
}

.ns-pay-ok-mark,
.ns-pay-err-mark {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    background: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    color: transparent;
}
.ns-pay-ok-svg,
.ns-pay-err-svg {
    display: block;
    overflow: visible;
}
.ns-pay-ok-fill {
    fill: #07c160;
    transform-origin: 40px 40px;
    transform: scale(0.2);
    opacity: 0;
}
.ns-pay-ok-check {
    stroke: #fff;
    stroke-width: 5.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
}
.ns-pay-ok-mark.is-play .ns-pay-ok-fill {
    animation: nsPayFillPop 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.ns-pay-ok-mark.is-play .ns-pay-ok-check {
    animation: nsPayCheckIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) 0.18s forwards;
}
@keyframes nsPayFillPop {
    0% { transform: scale(0.2); opacity: 0; }
    70% { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}
@keyframes nsPayCheckIn {
    to { stroke-dashoffset: 0; }
}
.ns-pay-err-fill {
    fill: #fa5151;
}
.ns-pay-err-x {
    stroke: #fff;
    stroke-width: 5;
    stroke-linecap: round;
}
.ns-pay-ok-title { font-size: 17px; font-weight: 650; color: #1c1c1e; margin-bottom: 6px; }
.ns-pay-ok-amount { font-size: clamp(24px, 7vw, 30px); font-weight: 700; margin-bottom: 20px; letter-spacing: -0.03em; color: #1c1c1e; }
.ns-pay-err-text { font-size: 14px; color: #64646e; margin: 0 0 18px; max-width: 280px; line-height: 1.5; }
.ns-pay-ok-btn {
    min-width: 168px;
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: #07c160;
    color: #fff;
    font-size: 16px;
    font-weight: 650;
    font-family: inherit;
    cursor: pointer;
}
.ns-pay-ok-btn:active { background: #06ad56; }
@media (max-width: 768px) {
    .ns-pay-sheet {
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
    }
}
@media (min-width: 769px) {
    .ns-pay { align-items: center; padding: 24px; }
    .ns-pay-sheet { border-radius: 16px; max-width: 380px; }
}
@media (prefers-reduced-motion: reduce) {
    .ns-pay-sheet, .ns-pay-spinner { animation: none; }
    .ns-pay-ok-mark.is-play .ns-pay-ok-fill {
        animation: none;
        transform: scale(1);
        opacity: 1;
    }
    .ns-pay-ok-mark.is-play .ns-pay-ok-check {
        animation: none;
        stroke-dashoffset: 0;
    }
}

@media (max-width: 768px) {
    body.ns-overlay-open .mobile-bottom-nav,
    body:has(.ns-pay:not([hidden])) .mobile-bottom-nav,
    body:has(.tip-sheet:not([hidden])) .mobile-bottom-nav,
    body:has(.gift-modal[style*="flex"]) .mobile-bottom-nav,
    body:has(.modal[style*="flex"]) .mobile-bottom-nav,
    body:has(.modal[style*="block"]) .mobile-bottom-nav,
    body:has(.owner-dash-modal:not([hidden])) .mobile-bottom-nav,
    body:has(.contact-chooser:not([hidden])) .mobile-bottom-nav {
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

.admin-topbar { display: none; }
.admin-nav-overlay { display: none; }

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: #1a1a1a;
    color: #fff;
    padding: 20px 0;
}

.admin-sidebar .logo {
    padding: 0 20px 20px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 12px;
}

.admin-nav a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: color 0.15s ease, background 0.15s ease;
}

.admin-nav a:hover, .admin-nav a.active {
    background: rgba(207, 10, 44, 0.18);
    color: #fff;
}

.admin-content { padding: 24px; background: var(--bg); }

.admin-page-title { margin: 0 0 8px; font-size: 22px; font-weight: 650; }
.admin-page-desc {
    margin: 0 0 18px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.55;
    max-width: 62ch;
}
.admin-form .form-group { margin-bottom: 14px; }
.admin-control,
.admin-content .admin-control {
    display: block;
    width: 100%;
    max-width: 520px;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    background: #fff;
}
.admin-content textarea.admin-control { min-height: 120px; resize: vertical; }
.admin-form-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.admin-inline-form { display: inline; margin: 0; }
.admin-empty { color: var(--text-muted); font-size: 14px; margin: 0; }
.admin-cell-wrap { white-space: normal !important; max-width: 280px; line-height: 1.45; }
.admin-warn-card { margin-bottom: 16px; }

.site-warning-modal .site-warning-card {
    max-width: 440px;
    margin: auto;
    text-align: center;
    padding: 22px 20px 18px;
}
.site-warning-modal .card-title { color: #b0102a; margin-bottom: 6px; }
.site-warning-from {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 12px;
}
.site-warning-body {
    line-height: 1.65;
    margin: 0 0 18px;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card .num { font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-card .label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    background:
        radial-gradient(720px 380px at 12% 0%, rgba(255, 255, 255, 0.85), transparent 55%),
        radial-gradient(560px 320px at 90% 100%, rgba(176, 16, 42, 0.06), transparent 50%),
        linear-gradient(165deg, #e4e7ed 0%, #eef0f4 45%, #e6e8ee 100%);
}

.auth-card {
    background: rgba(251, 251, 252, 0.96);
    padding: 32px 28px 26px;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(18, 22, 30, 0.1);
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(216, 220, 228, 0.9);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.auth-brand .logo-mark {
    min-width: 36px;
    height: 28px;
    font-size: 13px;
}
.auth-card h2 {
    text-align: center;
    margin: 0 0 4px;
    font-weight: 650;
    font-size: 22px;
    letter-spacing: -0.02em;
    color: var(--ink);
}
.auth-card .subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
}

.pwd-strength {
    margin-top: 8px;
}
.pwd-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #e5e7eb;
    overflow: hidden;
}
.pwd-strength-fill {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.2s ease, background-color 0.2s ease;
    background: #9ca3af;
}
.pwd-strength-fill.lv0,
.pwd-strength-fill.lv1 { background: #b0102a; }
.pwd-strength-fill.lv2 { background: #b54708; }
.pwd-strength-fill.lv3 { background: #1a7f37; }
.pwd-strength-fill.lv4 { background: #0f6b2e; }
.pwd-strength-text {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-muted);
}
.pwd-strength-text.lv0,
.pwd-strength-text.lv1 { color: #b0102a; }
.pwd-strength-text.lv2 { color: #b54708; }
.pwd-strength-text.lv3,
.pwd-strength-text.lv4 { color: #1a7f37; }
.pwd-match-hint.is-ok { color: #1a7f37; }
.pwd-match-hint.is-bad { color: #b0102a; }

.auth-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    padding: 4px;
    background: #e8ebf0;
    border-radius: 8px;
}
.auth-tabs a {
    flex: 1;
    text-align: center;
    padding: 9px 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.auth-tabs a:hover { color: var(--ink); }
.auth-tabs a.active {
    background: #fff;
    color: var(--ink);
    box-shadow: 0 1px 3px rgba(18, 22, 30, 0.08);
}

.auth-card .form-group label { color: var(--text-secondary); }
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
    background: #fff;
    border-color: var(--line);
}
.auth-card .btn-primary {
    margin-top: 4px;
    min-height: 44px;
    font-size: 15px;
}

.auth-forgot {
    text-align: center;
    margin: 14px 0 0;
    font-size: 13px;
}
.auth-forgot a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.auth-forgot a:hover { color: var(--ink); }

.auth-footer {
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-footer a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lottery-float {
    position: fixed;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    left: max(16px, env(safe-area-inset-left, 0px));
    right: auto;
    z-index: 145;
    width: 64px;
    padding: 6px 4px 8px;
    border: 0;
    border-radius: 16px;
    background: rgba(255,255,255,0.96);
    box-shadow: 0 8px 22px rgba(28, 32, 40, 0.18);
    color: #1c2028;
    font-family: inherit;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    transition: box-shadow 0.15s ease;
}
.lottery-float.is-dragging {
    cursor: grabbing;
    box-shadow: 0 12px 28px rgba(28, 32, 40, 0.28);
}
.lottery-float-wheel {
    display: block;
    line-height: 0;
}
.lottery-float-spin {
    transform-origin: 32px 32px;
    animation: lotteryFloatSpin 8s linear infinite;
}
.lottery-float-txt {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #1c2028;
}
@keyframes lotteryFloatSpin {
    to { transform: rotate(360deg); }
}
@media (max-width: 768px) {
    .lottery-float {
        bottom: calc(var(--mbn-height, 64px) + env(safe-area-inset-bottom, 0px) + 56px);
        left: max(12px, env(safe-area-inset-left, 0px));
        width: 60px;
        z-index: 145;
    }
}
@media (prefers-reduced-motion: reduce) {
    .lottery-float-spin { animation: none; }
}

.profile-menu-row--admin .pm-label { font-weight: 650; }

.lottery-hub { margin-top: 20px; margin-bottom: 40px; }
.lottery-hub-head h1 { font-size: 1.6rem; margin: 0 0 6px; }
.lottery-hub-sub { color: var(--text-secondary); margin: 0 0 18px; font-size: 14px; }
.lottery-nav { margin-bottom: 18px; }
.lottery-card-list { display: grid; gap: 12px; }
.lottery-card {
    display: block;
    background: var(--surface, #fff);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lottery-card:hover {
    border-color: #c8c8ce;
    box-shadow: var(--shadow);
    color: inherit;
}
.lottery-card h3 { margin: 6px 0 8px; font-size: 1.05rem; }
.lottery-card-type {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    background: rgba(176, 16, 42, 0.08);
    padding: 2px 8px;
    border-radius: 6px;
}
.lottery-card-meta { font-size: 13px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.lottery-card-desc { font-size: 13px; color: var(--text-secondary); margin: 8px 0 0; line-height: 1.5; }
.lottery-type-pick { display: grid; gap: 10px; }
.lottery-type-opt {
    display: block;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
}
.lottery-type-opt:hover { border-color: var(--brand); color: inherit; }
.lottery-type-opt strong { display: block; margin-bottom: 4px; }
.lottery-type-opt span { font-size: 13px; color: var(--text-secondary); }

.lottery-create-page,
.lottery-view-page { margin-top: 20px; margin-bottom: 48px; }
.lottery-create-form .form-group { margin-bottom: 14px; }
.lottery-section-title { font-size: 1rem; margin: 22px 0 10px; }
.lottery-prize-rows { display: grid; gap: 12px; margin-bottom: 10px; }
.lottery-prize-row {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 10px;
    background: #fafafa;
}
@media (min-width: 720px) {
    .lottery-prize-row {
        grid-template-columns: 1.2fr 1fr 0.6fr 0.6fr auto;
        align-items: end;
    }
}

.lottery-view-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.lottery-view-actions { display: flex; gap: 8px; }
.lottery-view-title { font-size: 1.45rem; margin: 8px 0 10px; }
.lottery-view-desc { font-size: 14px; line-height: 1.65; color: var(--text-secondary); }
.lottery-tip {
    margin: 14px 0;
    padding: 10px 12px;
    background: #f4f5f7;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}
.lottery-prize-list,
.lottery-winner-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.lottery-prize-list li,
.lottery-winner-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}
.lottery-prize-list em,
.lottery-admin-meta { color: var(--text-muted); font-style: normal; font-size: 12px; }
.lottery-countdown { margin-top: 10px; font-size: 14px; color: var(--brand); font-weight: 600; }
.lottery-creator-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.lottery-join-panel,
.lottery-rp-panel { margin-top: 16px; }
.lottery-escrow-box { margin-top: 12px; background: #fff8f0; border: 1px solid #f0d5b8; }

.lottery-wheel-wrap {
    position: relative;
    max-width: 340px;
    margin: 20px auto;
    text-align: center;
}
.lottery-wheel-pointer {
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 18px solid var(--brand);
    z-index: 2;
}
#lotteryWheel {
    width: min(320px, 100%);
    height: auto;
    border-radius: 50%;
    box-shadow: 0 8px 28px rgba(28, 32, 40, 0.12);
}
.lottery-wheel-msg { margin: 12px 0; font-size: 14px; color: var(--text-secondary); min-height: 1.4em; }

.rp-ceremony {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(18, 22, 30, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.rp-ceremony-card { width: min(280px, 100%); }
.rp-cover {
    background: linear-gradient(160deg, #e0544a 0%, #c62828 55%, #9b1c1c 100%);
    border-radius: 12px;
    padding: 36px 20px 28px;
    text-align: center;
    color: #ffe9a8;
    box-shadow: 0 16px 40px rgba(0,0,0,0.25);
    position: relative;
}
.rp-cover-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 48px;
    background: rgba(0,0,0,0.12);
    border-radius: 12px 12px 50% 50% / 12px 12px 40% 40%;
}
.rp-open-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: none;
    background: #ffe9a8;
    color: #a02020;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    margin: 24px 0 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.rp-open-btn:disabled { opacity: 0.7; cursor: wait; }
.rp-cover-from { margin: 0; font-size: 14px; }
.rp-result {
    background: #fff;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
}
.rp-result-msg { margin: 0 0 8px; font-size: 15px; color: var(--text-secondary); }
.rp-result-amt { margin: 0 0 18px; font-size: 2rem; font-weight: 700; color: #c62828; }

.contact-float {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    right: max(16px, env(safe-area-inset-right, 0px));
    left: auto;
    max-width: min(120px, calc(100vw - 32px));
    background: var(--primary);
    color: #fff;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    line-height: 1.2;
    cursor: pointer;
    z-index: var(--z-sticky, 100);
    transition: background 0.15s ease;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transform: none !important;
}

.contact-float:hover {
    background: var(--primary-dark);
    color: #fff;
}

.contact-chooser {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(18, 22, 30, 0.45);
    box-sizing: border-box;
}
.contact-chooser[hidden] { display: none !important; }
.contact-chooser-panel {
    width: 100%;
    max-width: 420px;
    max-height: min(88dvh, 560px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fbfbfc;
    border: 1px solid #d8dce4;
    border-radius: 16px 16px 0 0;
    padding: 20px 18px calc(14px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 16px 40px rgba(18, 22, 30, 0.16);
    animation: contactChooserIn 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
    box-sizing: border-box;
}
@keyframes contactChooserIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .contact-chooser-panel { animation: none; }
}
.contact-chooser-panel h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: var(--ink);
}
.contact-chooser-hint {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--text-secondary);
}
.contact-chooser-opt {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.contact-chooser-opt:hover {
    border-color: var(--primary);
    background: #f4f5f7;
}
.contact-chooser-opt small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-muted);
}
.contact-chooser-close {
    margin-top: 4px;
}
.contact-them-opt {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
}
.contact-them-presence {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    background: #a0a6b0;
}
.contact-them-presence.is-online {
    background: #22a55a;
    box-shadow: 0 0 0 3px rgba(34, 165, 90, 0.18);
}
.contact-them-presence.is-offline {
    background: #a0a6b0;
}
.contact-them-presence.is-author {
    background: var(--primary, #3b5bdb);
    border-radius: 2px;
    width: 10px;
    height: 10px;
}
.contact-them-opt-body {
    min-width: 0;
    flex: 1;
}
.contact-them-opt-title {
    display: block;
}
body.contact-them-open {
    overflow: hidden;
}
body:has(.contact-them-chooser:not([hidden])) .mobile-bottom-nav {
    visibility: hidden;
    pointer-events: none;
}
@media (min-width: 721px) {
    .contact-chooser {
        align-items: center;
        padding: 24px;
    }
    .contact-chooser-panel {
        width: min(360px, 100%);
        border-radius: 14px;
        padding: 20px 18px 14px;
    }
}

body.page-resource .contact-float {
    display: none !important;
}

.detail-report-row {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.btn-report-res {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 32px;
    padding: 6px 12px !important;
    border: 1px solid rgba(176, 16, 42, 0.45) !important;
    border-radius: 8px !important;
    background: transparent !important;
    color: var(--brand, #b0102a) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0;
    text-decoration: none !important;
    box-shadow: none;
}
.btn-report-res:hover {
    background: rgba(176, 16, 42, 0.08) !important;
    color: var(--brand, #b0102a) !important;
    border-color: var(--brand, #b0102a) !important;
}

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

@media (min-width: 769px) {
    
    body.page-messages .message-layout {
        grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) !important;
        grid-template-rows: minmax(0, 1fr) !important;
    }
    body.page-messages .message-layout .conversation-list {
        display: block !important;
        visibility: visible !important;
        min-width: 240px;
        width: auto;
        height: 100% !important;
        overflow-y: auto !important;
    }
    body.page-messages .message-layout .chat-area {
        display: flex !important;
        visibility: visible !important;
        height: 100% !important;
    }
    body.page-messages .chat-back {
        display: none !important;
    }
}

@media (max-width: 768px) {
    html, body { overflow-x: hidden; }
    :root {
        --header-height: 60px;
        --mbn-height: 64px;
    }
    body {
        padding-bottom: calc(var(--mbn-height) + 8px + env(safe-area-inset-bottom, 0px));
    }
    .container { padding: 0 14px; }

    .detail-layout { grid-template-columns: 1fr; }
    body.page-messages {
        overflow: hidden;
    }
    body.page-messages .message-page {
        height: calc(100dvh - var(--header-height) - var(--mbn-height) - env(safe-area-inset-bottom, 0px) - 12px);
        max-height: calc(100dvh - var(--header-height) - var(--mbn-height) - env(safe-area-inset-bottom, 0px) - 12px);
        margin: 6px 0 0;
        padding: 0;
    }
    body.page-messages .container.message-page {
        padding-left: 10px;
        padding-right: 10px;
    }
    body.page-messages .message-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
        border-radius: 10px;
        height: 100%;
        min-height: 0;
    }
    body.page-messages .message-layout .conversation-list,
    body.page-messages .message-layout .chat-area {
        min-height: 0;
        height: 100%;
        max-height: 100%;
        overflow: hidden;
    }
    body.page-messages .message-layout .conversation-list { overflow-y: auto; }
    
    body.page-messages .message-layout.has-active-chat > .conversation-list { display: none; }
    body.page-messages .message-layout:not(.has-active-chat) > .chat-area { display: none; }
    body.page-messages .chat-back { display: inline-flex; }
    body.page-messages .chat-header {
        flex-wrap: nowrap;
        padding: 8px 10px;
    }
    body.page-messages .chat-header-actions {
        max-width: calc(100% - 120px);
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    body.page-messages .chat-header-actions::-webkit-scrollbar { display: none; }
    body.page-messages .chat-header-actions .btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    body.page-messages .chat-messages { padding: 12px; }
    body.page-messages .chat-input {
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        gap: 8px;
    }
    body.page-messages .chat-input .btn {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 40px;
    }
    .admin-layout { grid-template-columns: 1fr; }
    
    body.admin-body {
        overflow-x: hidden !important;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
    .admin-layout,
    .admin-content {
        min-width: 0;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    .admin-topbar {
        display: flex !important;
        align-items: center;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 4000;
        padding: 10px 12px;
        padding-top: calc(10px + env(safe-area-inset-top, 0px));
        background: #1c2028;
        color: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.15);
        pointer-events: auto !important;
    }
    .admin-menu-toggle {
        border: 1px solid rgba(255,255,255,0.35);
        background: #2a3140;
        color: #fff;
        border-radius: 10px;
        padding: 10px 14px;
        font-size: 15px;
        font-weight: 650;
        font-family: inherit;
        cursor: pointer;
        white-space: nowrap;
        min-height: 44px;
        min-width: 88px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
        position: relative;
        z-index: 4001;
        pointer-events: auto !important;
    }
    .admin-topbar-title {
        flex: 1;
        font-size: 14px;
        font-weight: 600;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        pointer-events: none;
    }
    .admin-topbar-home {
        color: #fff;
        font-size: 13px;
        text-decoration: none;
        opacity: 0.9;
        padding: 8px 6px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        z-index: 4001;
    }
    .admin-nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(18, 22, 30, 0.45);
        z-index: 4100;
        pointer-events: auto;
    }
    .admin-nav-overlay[hidden] { display: none !important; }
    .admin-sidebar {
        display: block !important;
        visibility: visible !important;
        position: fixed !important;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(280px, 86vw);
        z-index: 4200;
        transform: translateX(-105%);
        transition: transform 0.22s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 8px 0 24px rgba(0,0,0,0.2);
        pointer-events: auto !important;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }
    body.admin-nav-open .admin-sidebar {
        transform: translateX(0) !important;
    }
    body.admin-nav-open {
        overflow: hidden !important;
    }
    .admin-content {
        padding: 12px;
        padding-top: 8px;
        position: relative;
        z-index: 1;
        overflow-x: hidden;
    }
    .admin-page-title { font-size: 18px; }
    .admin-page-desc { font-size: 13px; margin-bottom: 14px; }
    .admin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 14px;
    }
    .stat-card { padding: 14px; }
    .stat-card .num { font-size: 22px; }
    .admin-content .card,
    .admin-content .table-wrap {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
    .admin-content .card {
        padding: 14px;
        margin-bottom: 12px;
    }
    
    .admin-content input[type="text"],
    .admin-content input[type="email"],
    .admin-content input[type="search"],
    .admin-content input[type="number"],
    .admin-content input[type="password"],
    .admin-content input[type="url"],
    .admin-content input[type="date"],
    .admin-content input:not([type]),
    .admin-content select,
    .admin-content textarea,
    .admin-content .admin-control {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
        font-size: 16px; 
    }
    .admin-content form {
        display: flex;
        flex-direction: column;
        gap: 10px;
        min-width: 0;
    }
    .admin-content .form-group {
        min-width: 0;
        width: 100%;
    }
    .admin-content .form-group label {
        display: block;
        margin-bottom: 6px;
        font-size: 13px;
        font-weight: 600;
    }
    .admin-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .admin-form-actions .btn {
        width: 100%;
    }
    .admin-content .btn,
    .admin-content button.btn,
    .admin-content a.btn,
    .admin-content button[type="submit"] {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        white-space: nowrap;
        min-height: 40px;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    .admin-content table .btn {
        margin: 2px 0;
    }
    
    .admin-content .table-wrap {
        margin: 0 -4px;
        padding: 0 4px;
    }
    .admin-content table {
        display: table;
        width: max-content;
        min-width: 100%;
        border-collapse: collapse;
    }
    .admin-content table th,
    .admin-content table td {
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 10px;
    }
    .admin-content td.admin-cell-wrap,
    .admin-content .admin-cell-wrap {
        white-space: normal !important;
        min-width: 140px;
        max-width: 220px;
    }
    .admin-content td[style*="white-space:nowrap"],
    .admin-content td.my-res-actions {
        white-space: nowrap !important;
    }
    .admin-content h2 {
        font-size: 18px;
        margin-bottom: 12px !important;
    }
    .admin-content .alert {
        font-size: 13px;
        padding: 10px 12px;
        word-break: break-word;
    }
    .site-warning-modal .site-warning-card {
        margin: 16px;
        max-width: calc(100vw - 32px);
    }
    .hero, .home-top { padding: 16px 0 8px; }
    .resource-grid,
    .author-resource-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .nav { display: none; }

    .card { padding: 14px; overflow: hidden; }
    .card-title { font-size: 16px; }

    .btn {
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 6px;
        min-width: 0;
        max-width: 100%;
        line-height: 1.35;
        white-space: nowrap;
    }
    .card form .btn,
    .card .btn-block {
        white-space: normal;
        text-align: center;
    }
    .btn-sm {
        padding: 3px 8px;
        font-size: 11px;
    }
    .header .btn-sm {
        padding: 6px 12px;
        font-size: 13px;
        min-height: 36px;
    }
    .header .logo {
        min-height: 44px;
        padding: 4px 0;
    }
    .header .user-menu .avatar {
        width: 36px;
        height: 36px;
    }
    .user-menu span { display: none; }

    .form-inline {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }
    .form-inline .btn {
        align-self: flex-start;
        width: auto;
    }
    .form-inline .avatar { align-self: flex-start; }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="file"],
    select,
    textarea {
        max-width: 100%;
        box-sizing: border-box;
        font-size: 14px;
    }
    input[type="file"] { font-size: 12px; }

    .search-bar input {
        padding: 8px 10px;
        font-size: 13px;
    }
    .search-bar button {
        padding: 8px 12px;
        font-size: 12px;
        flex-shrink: 0;
    }

    .category-tab {
        padding: 5px 10px;
        font-size: 11px;
    }
    .category-tabs { gap: 5px; margin-bottom: 8px; }

    .tab-nav {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 12px;
        scrollbar-width: none;
    }
    .tab-nav::-webkit-scrollbar { display: none; }
    .tab-nav a {
        padding: 6px 10px;
        font-size: 11px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .page-btn {
        padding: 4px 8px;
        font-size: 11px;
    }

    table .btn-sm {
        padding: 2px 6px;
        font-size: 10px;
    }
    table td { font-size: 12px; padding: 8px 6px; white-space: normal; }
    table td .btn { margin: 2px 2px 2px 0; vertical-align: middle; }

    .membership-card .btn,
    .membership-form .btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .resource-info { padding: 10px; }
    .resource-title { font-size: 13px; }

    .footer { padding: 12px 0; font-size: 11px; }
    .footer-sep { margin: 0 6px; }

    .author-card { flex-wrap: wrap; gap: 8px; }
    .author-card .btn { flex-shrink: 0; }

    .profile-header { padding: 16px 0; }
    .profile-info { flex-direction: column; align-items: flex-start; gap: 12px; }
    .profile-info > div { min-width: 0; max-width: 100%; }
    .profile-info h2 { font-size: 18px; word-break: break-word; }
    .profile-info p { font-size: 12px; word-break: break-word; }
    .profile-info .avatar { width: 56px; height: 56px; font-size: 22px; }
    .profile-stats { flex-wrap: wrap; gap: 12px; }

    .profile-page { max-width: 100%; overflow-x: hidden; }
    .profile-page .profile-tab-nav,
    .profile-tab-nav {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        overflow: visible !important;
        border-bottom: none;
        margin-bottom: 12px;
    }
    .profile-page .profile-tab-nav a,
    .profile-tab-nav a {
        text-align: center;
        padding: 7px 4px;
        font-size: 11px;
        line-height: 1.25;
        white-space: normal !important;
        min-width: 0 !important;
        width: auto !important;
        border: 1px solid var(--border);
        border-radius: 6px;
        margin-bottom: 0;
        border-bottom-color: var(--border);
        writing-mode: horizontal-tb !important;
    }
    .profile-page .profile-tab-nav a.active,
    .profile-tab-nav a.active {
        background: var(--primary-light);
        border-color: var(--primary);
        border-bottom-color: var(--primary);
    }

    .profile-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .profile-overview-grid .card { padding: 12px 6px; }
    .profile-overview-grid .card-icon { font-size: 22px; }
    .profile-overview-grid .card-label { font-size: 12px; margin-top: 4px; }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 150;
        height: calc(var(--mbn-height) + 8px + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: saturate(1.1) blur(8px);
        -webkit-backdrop-filter: saturate(1.1) blur(8px);
        border-top: 1px solid var(--line);
        padding:
            0
            max(4px, env(safe-area-inset-right, 0px))
            calc(8px + env(safe-area-inset-bottom, 0px))
            max(4px, env(safe-area-inset-left, 0px));
        box-shadow: 0 -4px 16px rgba(18, 22, 30, 0.06);
        pointer-events: auto;
        touch-action: manipulation;
        isolation: isolate;
        box-sizing: border-box;
        max-width: 100vw;
    }
    .mbn-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-height: var(--mbn-height);
        max-height: var(--mbn-height);
        padding: 8px 4px;
        color: var(--text-muted);
        text-decoration: none;
        border-radius: 8px;
        position: relative;
        min-width: 0;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        box-sizing: border-box;
    }
    .mbn-item:active {
        background: var(--primary-light);
    }
    .mbn-item.active {
        color: var(--brand);
        background: transparent;
        font-weight: 650;
    }
    .mbn-icon { font-size: 20px; line-height: 1; }
    .mbn-label {
        font-size: 13px;
        font-weight: 600;
        line-height: 1.2;
        color: inherit;
        letter-spacing: 0.01em;
    }
    .mbn-badge {
        position: absolute;
        top: 6px;
        right: max(4px, calc(50% - 26px));
        background: var(--brand);
        color: #fff;
        font-size: 10px;
        min-width: 16px;
        height: 16px;
        line-height: 16px;
        text-align: center;
        border-radius: 8px;
        padding: 0 4px;
    }

    .header .user-menu .btn { display: none; }
    .header .user-menu .header-admin-entry {
        display: inline-flex !important;
        align-items: center;
        min-height: 36px;
        padding: 6px 10px;
        font-size: 12px;
        font-weight: 650;
    }
    .header .user-menu span { display: none; }
    .contact-float {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        bottom: calc(var(--mbn-height, 64px) + env(safe-area-inset-bottom, 0px) + 12px);
        right: max(12px, env(safe-area-inset-right, 0px));
        left: auto;
        padding: 8px 12px;
        font-size: 11px;
        z-index: 140;
        pointer-events: auto;
        max-width: min(108px, calc(100vw - 24px));
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        transform: none !important;
    }

    body.page-resource .contact-float {
        display: none !important;
    }

    
    body.page-upload .contact-float {
        display: none !important;
    }

    
    body.page-upload {
        overflow-x: hidden;
        overscroll-behavior-x: none;
        touch-action: pan-y;
        width: 100%;
        max-width: 100vw;
    }
    body.page-upload .upload-page-wrap,
    body.page-upload .upload-page-card,
    body.page-upload #uploadForm {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }
    body.page-upload .upload-page-wrap {
        margin-top: 16px;
        padding-left: 14px;
        padding-right: 14px;
    }
    body.page-upload .spec-panel,
    body.page-upload .act-price-row,
    body.page-upload .formula-editor,
    body.page-upload .content-type-pick,
    body.page-upload .ns-select,
    body.page-upload .cover-picker,
    body.page-upload .cover-picker-grid {
        max-width: 100%;
        min-width: 0;
    }
    body.page-upload .formula-toolbar,
    body.page-upload .formula-num-row,
    body.page-upload .formula-import-row {
        flex-wrap: wrap;
        max-width: 100%;
    }
    body.page-upload input,
    body.page-upload select,
    body.page-upload textarea,
    body.page-upload .btn {
        max-width: 100%;
        box-sizing: border-box;
    }

    
    body:has(.upload-rules-overlay:not([hidden])) .mobile-bottom-nav,
    body:has(.upload-rules-overlay:not([hidden])) .contact-float,
    body.upload-rules-open .mobile-bottom-nav,
    body.upload-rules-open .contact-float {
        visibility: hidden !important;
        pointer-events: none !important;
    }

    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 14px;
    }
    .page-toolbar h2 { font-size: 18px; }
    .page-toolbar .btn { align-self: flex-start; }

    .certify-page {
        margin-top: 16px;
        margin-bottom: calc(24px + var(--mbn-height, 64px));
        padding-left: 14px;
        padding-right: 14px;
        max-width: 100%;
    }
    .certify-card {
        padding: 14px;
        overflow: visible;
    }
    body.page-certify .card {
        overflow: visible;
    }
    .certify-form select,
    .certify-form textarea,
    .certify-select {
        font-size: 16px; 
        line-height: 1.45;
    }
    .certify-form textarea {
        min-height: 110px;
    }
    .cert-app-head {
        gap: 8px;
    }
    .certify-page .btn-block {
        width: 100%;
        min-height: 44px;
    }
}

@media (max-width: 480px) {
    .container { padding: 0 10px; }
    .btn { padding: 4px 8px; font-size: 11px; }
    .btn-sm { padding: 2px 6px; font-size: 10px; }
    .search-bar button { padding: 7px 10px; font-size: 11px; }
    .footer-line { font-size: 10px; }
    .footer-sep { margin: 0 4px; }
}

.captcha-hint-text {
    font-size: 12px;
    color: var(--text-muted);
    margin: 8px 0 4px;
    padding: 8px 12px;
    border-radius: var(--radius);
    background: #fafafa;
    border: 1px solid var(--line);
}

.ns-slider-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(16, 18, 22, 0.58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    touch-action: none;
    overscroll-behavior: none;
}
.ns-slider-overlay.show { display: flex; }
.ns-slider-panel {
    position: relative;
    width: min(380px, 100%);
    padding: 28px 24px 22px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(28, 32, 40, 0.08);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 24px 48px rgba(16, 18, 22, 0.22);
    overflow: hidden;
}
.ns-slider-glow {
    pointer-events: none;
    position: absolute;
    inset: -40% -20% auto;
    height: 70%;
    background: radial-gradient(ellipse at 50% 0%, rgba(28, 32, 40, 0.06), transparent 70%);
}
.ns-slider-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #f3f4f6;
    font-size: 20px;
    line-height: 1;
    color: #5c5f66;
    cursor: pointer;
}
.ns-slider-close:hover { background: #e8eaed; color: #1c2028; }
.ns-slider-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 10px;
    position: relative;
    font-weight: 550;
}
.ns-slider-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 22px;
    padding: 0 6px;
    border-radius: 5px;
    background: #1c2028;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
}
.ns-slider-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 650;
    color: #1c2028;
    position: relative;
}
.ns-slider-desc {
    margin: 0 0 20px;
    font-size: 14px;
    color: #5c5f66;
    line-height: 1.55;
    position: relative;
}
.ns-slider-em {
    color: #1c2028;
    font-weight: 650;
    box-shadow: inset 0 -2px 0 #c0392b;
}
.ns-slider-track-wrap {
    position: relative;
    padding: 22px 0 10px;
}
.ns-slider-marks {
    position: absolute;
    left: 0;
    right: 0;
    top: 2px;
    height: 16px;
    pointer-events: none;
}
.ns-slider-mark {
    position: absolute;
    top: 0;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    border-radius: 3px;
    background: #d1d5db;
    border: 1px solid rgba(0,0,0,0.06);
}
.ns-slider-mark.is-decoy {
    opacity: 0.45;
    transform: scale(0.85);
}
.ns-slider-mark.is-real {
    background: #c0392b;
    border-color: #a93226;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.18);
}
.ns-slider-track {
    position: relative;
    height: 44px;
    border-radius: 12px;
    background: #f0f1f3;
    border: 1px solid #e2e4e8;
    overflow: hidden;
}
.ns-slider-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, #2a2f38, #1c2028);
    border-radius: 12px 0 0 12px;
    transition: none;
}
.ns-slider-knob {
    position: absolute;
    top: 3px;
    left: 0%;
    width: 38px;
    height: 38px;
    margin-left: 3px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #d8dbe0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.ns-slider-knob span {
    display: block;
    width: 14px;
    height: 2px;
    background: #9aa0a8;
    box-shadow: 0 -4px 0 #9aa0a8, 0 4px 0 #9aa0a8;
}
.ns-slider-knob:active { cursor: grabbing; }
.ns-slider-status {
    min-height: 20px;
    margin: 12px 0 10px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}
.ns-slider-status.is-err { color: #b91c1c; }
.ns-slider-refresh {
    display: block;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e2e4e8;
    border-radius: 10px;
    background: #fafafa;
    color: #374151;
    font-size: 13px;
    font-weight: 550;
    cursor: pointer;
}
.ns-slider-refresh:hover { background: #f3f4f6; }

html.ns-captcha-open,
html.ns-captcha-open body {
    overflow: hidden;
    overscroll-behavior: none;
    overscroll-behavior-x: none;
}
html.ns-captcha-open .ns-slider-overlay,
html.ns-captcha-open .ns-slider-overlay.show {
    touch-action: none;
    overscroll-behavior: none;
}

.ns-busy-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(16, 18, 22, 0.5);
    backdrop-filter: blur(4px);
}
.ns-busy-overlay.show { display: flex; }
.ns-busy-card {
    min-width: 240px;
    max-width: 90vw;
    padding: 28px 24px;
    border-radius: 14px;
    background: #fff;
    text-align: center;
    box-shadow: 0 20px 48px rgba(0,0,0,0.2);
}
.ns-busy-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 14px;
    border: 2px solid #e5e7eb;
    border-top-color: #1c2028;
    border-radius: 50%;
    animation: ns-spin 0.7s linear infinite;
}
.ns-busy-text {
    margin: 0;
    font-size: 14px;
    color: #1c2028;
    font-weight: 550;
}
@keyframes ns-spin {
    to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
    .ns-busy-spinner { animation: none; border-top-color: #9ca3af; }
}

.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 100090; align-items: center; justify-content: center; padding: 20px; display: none; box-sizing: border-box; }
.modal[style*="flex"],
.modal[style*="block"] {
    z-index: 100090 !important;
}
#aftersale-final-confirm-modal,
#aftersale-warn-modal,
#aftersale-closed-modal,
#aftersale-modal,
#as-evidence-modal {
    z-index: 100100 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: max(16px, env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px)) !important;
}
#aftersale-final-confirm-modal .modal-content,
#aftersale-warn-modal .modal-content,
#aftersale-modal .modal-content {
    margin: auto !important;
    max-height: min(86vh, 640px);
    overflow-y: auto;
    position: relative;
    z-index: 1;
}
.modal-content { max-width: 420px; width: 100%; max-height: min(90vh, 90dvh); overflow-y: auto; -webkit-overflow-scrolling: touch; box-sizing: border-box; }
@media (max-width: 640px) {
    .modal:not(.gift-modal) {
        align-items: flex-end;
        justify-content: stretch;
        padding: 0;
    }
    .modal:not(.gift-modal) .modal-content,
    .modal:not(.gift-modal) .card {
        width: 100%;
        max-width: 100%;
        max-height: min(92dvh, 92vh);
        margin: 0;
        border-radius: 16px 16px 0 0;
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    }
}

.name-admin { color: #f59e0b !important; font-weight: 700; }
.name-moderator { color: #38bdf8 !important; font-weight: 600; }
a.name-admin, a.name-moderator { text-decoration: none; }

.user-title-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    vertical-align: middle;
    line-height: 1.4;
}
.username-with-title { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }

.privacy-box h3 { font-size: 16px; margin: 12px 0 8px; }
.privacy-box h4 { font-size: 14px; margin: 14px 0 6px; color: var(--text-secondary); }
.privacy-box ul, .privacy-box ol { margin: 0 0 10px 18px; }
.privacy-box li { margin-bottom: 4px; }
.comment-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.comment-item:last-child { border-bottom: none; }

.resource-rating-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 18px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(18, 22, 30, 0.03);
    border: 1px solid rgba(18, 22, 30, 0.06);
}
.resource-rating-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.rr-score {
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -0.03em;
    color: var(--ink);
    line-height: 1;
}
.rr-stars-display,
.rr-stars-input {
    display: inline-flex;
    gap: 2px;
}
.rr-star-static,
.rr-star {
    font-size: 18px;
    line-height: 1;
    color: rgba(18, 22, 30, 0.18);
    background: none;
    border: 0;
    padding: 0;
    cursor: default;
}
.rr-star {
    cursor: pointer;
    transition: color .12s ease, transform .12s ease;
}
.rr-star:hover,
.rr-star.is-on,
.rr-star-static.is-on {
    color: #e2a100;
}
.rr-star:hover { transform: scale(1.08); }
.rr-meta,
.rr-action-label {
    font-size: 12px;
    color: var(--text-muted);
}
.resource-rating-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.rr-login {
    font-size: 13px;
    color: var(--stamp, #c41e3a);
    text-decoration: none;
}
.comment-rating {
    margin-top: 6px;
    font-size: 13px;
    letter-spacing: 1px;
    color: #e2a100;
}
.comment-rating-empty { color: rgba(18, 22, 30, 0.16); }

.announcement-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.announcement-box {
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: annIn 0.25s ease;
}
@keyframes annIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: none; }
}
.announcement-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.announcement-head h3 { margin: 0; font-size: 18px; }
.announcement-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0 4px;
}
.announcement-body {
    padding: 16px 0;
    overflow-y: auto;
    line-height: 1.7;
    font-size: 14px;
    color: var(--text-secondary);
}
.announcement-foot {
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    text-align: right;
}
.announcement-close:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.home-banner {
    --banner-bg: #191919;
    --banner-fg: #ffffff;
    overflow: hidden;
    background: var(--banner-bg);
    color: var(--banner-fg);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.home-banner-track {
    display: flex;
    width: max-content;
    animation: bannerScroll 28s linear infinite;
    white-space: nowrap;
}
.home-banner-text {
    padding: 10px 48px;
    font-size: 13px;
    letter-spacing: 0.02em;
}
@keyframes bannerScroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

.resource-cover.has-carousel .cover-slide,
.detail-cover.has-carousel .cover-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}
.resource-cover.has-carousel .cover-slide.is-active,
.detail-cover.has-carousel .cover-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}
.resource-cover.has-carousel .cover-slide {
    display: block;
    margin: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
}
.detail-cover {
    position: relative;
    overflow: hidden;
}
.detail-cover.has-carousel {
    min-height: 0;
}
.detail-cover.has-carousel .cover-preview-btn {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    padding: 0;
}

.staff-dm-box {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    background: #fafafa;
}
.staff-dm-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}
.staff-dm-desc {
    margin: 0 0 10px;
    font-size: 12px;
    color: var(--text-muted);
}
.staff-dm-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.staff-dm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    background: #fff;
}
.staff-dm-item:hover,
.staff-dm-item.is-active {
    border-color: #111;
}
.staff-dm-name { font-size: 13px; font-weight: 600; }
.staff-dm-role {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-muted);
}

.profile-app-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 640px;
    margin: 0 0 14px;
    padding: 16px 16px;
    text-decoration: none;
    color: #0f172a;
    border-radius: 12px;
    border: 1px solid #c7d2e0;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.04), transparent 42%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, var(--shadow);
    transition: transform 0.18s var(--ease-out), border-color 0.18s ease, box-shadow 0.18s ease;
}
.profile-app-banner:hover {
    transform: translateY(-1px);
    border-color: #94a3b8;
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.profile-app-banner:active { transform: translateY(0); }
.profile-app-banner__mark {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.04em;
    color: #fff;
    background: var(--primary, #1e293b);
}
.profile-app-banner__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}
.profile-app-checkupdate {
    display: block;
    max-width: 640px;
    width: 100%;
    margin: -6px 0 14px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.profile-app-checkupdate:hover { background: #f3f4f7; }
.profile-app-banner__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.profile-app-banner__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
}
.profile-app-banner__sub {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-app-banner__cta {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 650;
    color: #fff;
    background: var(--primary, #1e293b);
}
.app-dl-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-muted);
}
.app-dl-desc {
    font-size: 14px;
    line-height: 1.65;
    color: var(--ink);
    white-space: pre-wrap;
}

.profile-menu-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 640px;
}
.profile-menu-group {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.profile-menu-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 12px 14px;
    text-decoration: none;
    color: var(--ink);
    background: transparent;
    border-bottom: 1px solid var(--line);
    transition: background 0.15s var(--ease-out);
}
.profile-menu-row:last-child { border-bottom: none; }
.profile-menu-row:hover { background: #f3f4f7; color: var(--ink); }
.profile-menu-row:active { background: #eceef2; }
.pm-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 650;
    color: #3a4250;
    background: #e8ebf0;
}
.pm-mark--ink {
    background: var(--primary);
    color: #fff;
}
.pm-label {
    flex: 1;
    min-width: 0;
    font-size: 15px;
    font-weight: 500;
}
.pm-chevron {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid #b0b4be;
    border-bottom: 1.5px solid #b0b4be;
    transform: rotate(-45deg);
    flex-shrink: 0;
    opacity: 0.85;
}

.profile-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.profile-menu-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 12px 8px;
    text-align: center;
    text-decoration: none;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
}

.cover-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
    min-height: 88px;
    padding: 8px;
    border: 2px dashed transparent;
    border-radius: 10px;
    transition: border-color 0.15s, background 0.15s;
}
.cover-picker.is-dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.cover-add-slot.is-dragover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
}
.cover-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.cover-thumb {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f3f3f3;
}
.cover-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cover-thumb-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    color: #fff;
    cursor: pointer;
    line-height: 1;
}
.cover-thumb-tag {
    position: absolute;
    left: 4px;
    bottom: 4px;
    background: #111;
    color: #fff;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
}
.cover-add-slot {
    width: 88px;
    height: 88px;
    border: 1px dashed #cfcfcf;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    color: var(--text-muted);
    background: #fafafa;
}
.cover-add-plus { font-size: 28px; line-height: 1; color: #999; }
.cover-add-text { font-size: 12px; }

.detail-price-card {
    margin-top: 20px;
    padding: 18px !important;
}
.detail-price-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px 16px;
    margin-bottom: 14px;
}
.detail-price-head .price-tag {
    font-size: 22px;
    font-weight: 700;
}
.detail-price-head .price-tag.is-free { color: var(--success); }
.detail-price-head .ncoin-price {
    font-size: 14px;
    color: var(--text-secondary);
}
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.detail-btn-main {
    flex: 1 1 180px;
    min-height: 44px;
    font-size: 15px;
    padding: 0 18px;
}
.detail-btn-sub {
    flex: 0 1 auto;
    min-height: 40px;
    font-size: 13px;
    padding: 0 14px;
}
.detail-dl-tip {
    flex: 1 1 100%;
    margin: 0;
    padding: 10px 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #c62828;
    line-height: 1.5;
}
.detail-dl-tip a {
    color: #c62828;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.detail-privacy-tip {
    flex: 1 1 100%;
    margin: 0 0 4px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(28, 32, 40, 0.12);
    background: rgba(28, 32, 40, 0.05);
    font-size: 13px;
    line-height: 1.55;
    color: #1a1d24;
    font-weight: 600;
}
.detail-privacy-tip a {
    color: #1c2028;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 700;
}
.detail-btn-act {
    flex: 1 1 100%;
    min-height: 42px;
    margin-top: 2px;
}

.spec-pick-option {
    display: flex;
    align-items: center;
    gap: 10px;
}
.spo-thumb {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
    background: #f3f3f3;
    cursor: zoom-in;
}
.spo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.spo-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.author-bio {
    opacity: 0.85;
    font-size: 14px;
    margin: 8px 0 0;
    line-height: 1.55;
    max-width: 42rem;
}
.author-bio--empty,
.author-qq--empty {
    opacity: 0.55;
    font-style: italic;
}
.author-qq {
    opacity: 0.9;
    font-size: 13px;
    margin: 8px 0 0;
}

.btn.is-owned-disabled,
.btn.is-owned-disabled:disabled {
    background: #d1d5db !important;
    color: #6b7280 !important;
    border-color: #d1d5db !important;
    box-shadow: none !important;
    cursor: not-allowed;
    opacity: 1;
}
.spec-pick-option.is-owned {
    opacity: 0.92;
}

.upload-rules-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    padding-top: max(16px, env(safe-area-inset-top, 0px));
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    background: rgba(12, 14, 18, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.upload-rules-overlay[hidden] { display: none !important; }
.upload-rules-panel {
    width: 100%;
    max-width: 360px;
    min-width: 0;
    max-height: min(72vh, 72dvh, 480px);
    padding: 22px 20px 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 16px 40px rgba(0,0,0,0.22);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    margin: auto;
}
.upload-rules-panel h2 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 650;
    flex: 0 0 auto;
}
.upload-rules-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    word-break: break-word;
}
.upload-rules-body p { margin: 0 0 10px; }
.upload-rules-body p:last-child { margin-bottom: 0; }
.upload-rules-body strong { color: #b91c1c; }
.upload-rules-body a { color: var(--ink); text-decoration: underline; }
.upload-rules-panel .btn {
    flex: 0 0 auto;
    min-height: 44px;
    font-size: 15px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .upload-rules-overlay {
        align-items: center;
        justify-content: center;
        padding: 16px;
        padding-top: max(16px, env(safe-area-inset-top, 0px));
        padding-bottom: max(16px, calc(12px + var(--mbn-height, 64px) + env(safe-area-inset-bottom, 0px)));
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }
    .upload-rules-panel {
        width: 100%;
        max-width: min(360px, calc(100vw - 32px));
        min-width: 0;
        max-height: min(70dvh, 440px);
        height: auto;
        border-radius: 14px;
        border: 1px solid var(--line);
        box-shadow: 0 16px 40px rgba(0,0,0,0.22);
        padding: 18px 16px 16px;
        margin: 0;
    }
    .upload-rules-panel h2 {
        font-size: 17px;
        margin-bottom: 10px;
    }
    .upload-rules-body {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 14px;
    }
    .upload-rules-body p { margin-bottom: 10px; }
    .upload-rules-panel .btn {
        min-height: 48px;
        font-size: 16px;
        border-radius: var(--radius);
        touch-action: manipulation;
    }
}

@media (max-width: 768px) {
    .detail-cover {
        max-width: 180px;
        max-height: none;
        min-height: 0;
        aspect-ratio: 3 / 4;
    }
    .detail-cover .cover-preview-btn {
        max-height: none;
        width: 100%;
        height: 100%;
    }
    .detail-cover .cover-preview-btn img,
    .detail-cover img {
        object-fit: contain;
        object-position: center center;
    }
    .detail-layout {
        gap: 16px;
        margin-top: 16px;
    }
    .detail-price-card {
        padding: 14px !important;
    }
}
.detail-delete-form { display: inline-flex; margin: 0; }

.my-res-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

@media (max-width: 640px) {
    .profile-menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-btn-main { flex-basis: 100%; }
}

.download-page {
    max-width: 560px;
    margin: 24px auto 48px;
    padding-left: 16px;
    padding-right: 16px;
}
.download-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.download-panel-head {
    padding-bottom: 4px;
}
.download-panel-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}
.download-panel-sub {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-muted);
}
.download-panel-res {
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.45;
    word-break: break-word;
}
.notice-box {
    margin: 0;
    padding: 14px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fafafa;
    color: var(--ink);
    font-size: 14px;
    line-height: 1.75;
    max-height: min(48vh, 360px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    word-break: break-word;
}
.download-ack-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
    padding-top: 4px;
}
.download-ack-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 12px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink);
}
.download-ack-label input {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    accent-color: var(--brand);
}
.btn-cta {
    width: 100%;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 560;
    border-radius: var(--radius);
}
.download-spec-pick {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.download-spec-link {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
    min-height: 48px;
    white-space: normal;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .download-page {
        margin-top: 12px;
        margin-bottom: 72px;
        max-width: 100%;
    }
    .download-panel {
        padding: 16px 14px 14px;
        gap: 12px;
    }
    .download-panel-title { font-size: 18px; }
    .notice-box {
        max-height: min(42vh, 280px);
        font-size: 14px;
        padding: 12px;
        line-height: 1.7;
    }
    
    .download-page .btn-cta,
    .download-page .btn-cta-ghost,
    .download-page .btn-block,
    .btn.btn-cta,
    .detail-actions .detail-btn-main {
        padding: 12px 16px !important;
        font-size: 16px !important;
        min-height: 48px;
        border-radius: var(--radius) !important;
        white-space: normal;
        line-height: 1.35;
    }
    .download-page .btn-cta-ghost {
        font-size: 14px !important;
        min-height: 44px;
        padding: 10px 16px !important;
    }
}

:root {
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --dur-fast: 0.18s;
    --dur: 0.28s;
}

a,
.btn,
.nav a,
.mbn-item,
.category-select,
.ns-select-trigger,
.ns-select-option,
.profile-menu-row,
.profile-menu-item,
.staff-dm-item,
.conversation-item,
.tab-nav a,
.wallet-nav a,
.search-bar button {
    transition:
        color var(--dur-fast) var(--ease-out),
        background-color var(--dur-fast) var(--ease-out),
        border-color var(--dur-fast) var(--ease-out),
        opacity var(--dur-fast) var(--ease-out),
        box-shadow var(--dur-fast) var(--ease-out),
        transform var(--dur-fast) var(--ease-out);
}

.resource-card {
    transition:
        border-color var(--dur) var(--ease-out),
        transform var(--dur) var(--ease-out),
        box-shadow var(--dur) var(--ease-out),
        opacity var(--dur) var(--ease-out);
}
.resource-card:hover {
    transform: translateY(-3px);
}

.resource-cover img,
.resource-cover .cover-slide {
    transition: opacity 0.45s var(--ease-out);
}
.resource-card:hover .resource-cover img {
    transform: none;
}

.animate-in {
    animation: nsFadeUp var(--dur) var(--ease-out) both;
}

.resource-grid > .resource-card {
    animation: nsFadeUp 0.4s var(--ease-out) both;
}
.resource-grid > .resource-card:nth-child(1) { animation-delay: 0.02s; }
.resource-grid > .resource-card:nth-child(2) { animation-delay: 0.05s; }
.resource-grid > .resource-card:nth-child(3) { animation-delay: 0.08s; }
.resource-grid > .resource-card:nth-child(4) { animation-delay: 0.11s; }
.resource-grid > .resource-card:nth-child(5) { animation-delay: 0.14s; }
.resource-grid > .resource-card:nth-child(6) { animation-delay: 0.17s; }
.resource-grid > .resource-card:nth-child(7) { animation-delay: 0.2s; }
.resource-grid > .resource-card:nth-child(8) { animation-delay: 0.23s; }
.resource-grid > .resource-card:nth-child(n+9) { animation-delay: 0.26s; }

.home-top,
.home-toolbar,
.stats-card,
.profile-menu-group,
.download-panel {
    animation: nsFadeUp 0.36s var(--ease-out) both;
}
.profile-menu-group:nth-child(1) { animation-delay: 0.02s; }
.profile-menu-group:nth-child(2) { animation-delay: 0.06s; }
.profile-menu-group:nth-child(3) { animation-delay: 0.1s; }
.stats-card:nth-child(1) { animation-delay: 0.04s; }
.stats-card:nth-child(2) { animation-delay: 0.08s; }
.stats-card:nth-child(3) { animation-delay: 0.12s; }
.stats-card:nth-child(4) { animation-delay: 0.16s; }

@keyframes nsFadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.header {
    transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}

.announcement-overlay {
    animation: nsOverlayIn 0.25s var(--ease-out) both;
}
.announcement-box {
    animation: nsFadeUp 0.3s var(--ease-out) both;
}
@keyframes nsOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .resource-card:hover,
    .resource-card:hover .resource-cover img {
        transform: none;
    }
}

.grant-lead {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 16px;
    line-height: 1.6;
}
.grant-hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-muted);
}
.grant-hint.is-error,
.merchant-gift-hint.is-error {
    color: #b91c1c;
}
.grant-act-pick {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
@media (min-width: 640px) {
    .grant-act-pick {
        grid-template-columns: repeat(3, 1fr);
    }
}
.grant-act-option {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.grant-act-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.grant-act-option.is-active,
.grant-act-option:has(input:checked) {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}
.gao-title {
    font-size: 14px;
    font-weight: 650;
    color: var(--ink);
}
.gao-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}
.merchant-gift-overlay {
    z-index: 210;
}
.compensation-overlay {
    z-index: 215;
}
.merchant-gift-box,
.compensation-box {
    max-width: 480px;
}
.compensation-body-text {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary);
}
.compensation-reward {
    margin: 0 0 8px;
    font-size: 16px;
    color: var(--ink);
}
.merchant-gift-msg {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
}
.merchant-gift-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.merchant-gift-code {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg, #f6f7f9);
}
.merchant-gift-code-label {
    font-size: 12px;
    color: var(--text-muted);
}
.merchant-gift-code code {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink);
    word-break: break-all;
}
.merchant-gift-device {
    margin: 12px 0 0;
}
.merchant-gift-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.merchant-gift-hint {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--text-muted);
    min-height: 1.2em;
}

.talk-page { margin-top: 28px; margin-bottom: 40px; }
.talk-toolbar { align-items: flex-start; }
.talk-lead { margin: 6px 0 0; font-size: 13px; color: var(--text-muted); }
.talk-filter { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.talk-search { display: flex; gap: 8px; }
.talk-search input { min-width: 160px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.talk-feed { display: flex; flex-direction: column; gap: 12px; }
.talk-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(18,22,30,.1);
    border-radius: 14px;
    padding: 16px 18px;
    transition: border-color .15s ease, background .15s ease;
}
.talk-card:hover { border-color: rgba(18,22,30,.2); background: #fafbfc; }
.talk-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.talk-type-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    background: #1c2028;
    color: #f4f5f7;
}
.talk-type-tip { background: #2e5a3c; }
.talk-type-resale { background: #6b4f25; }
.talk-type-resource_share { background: #4a5060; }
.talk-card-time { font-size: 12px; color: var(--text-muted); }
.talk-card-title { font-size: 17px; margin: 0 0 6px; color: var(--ink); line-height: 1.35; }
.talk-card-excerpt { margin: 0; font-size: 14px; color: var(--text-secondary); line-height: 1.55; }
.talk-card-imgs { display: flex; gap: 8px; margin-top: 12px; }
.talk-card-imgs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; background: #eee; }
.talk-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 10px; }
.talk-author { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); text-decoration: none; font-weight: 600; }
.talk-avatar { width: 28px; height: 28px; font-size: 12px; }
.talk-meta { font-size: 12px; color: var(--text-muted); }
.talk-compose .form-hint { display: block; margin-top: 6px; color: var(--text-muted); font-size: 12px; }
.talk-type-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.talk-type-option { cursor: pointer; }
.talk-type-option input { position: absolute; opacity: 0; pointer-events: none; }
.talk-type-option span {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(18,22,30,.14);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    background: #fff;
}
.talk-type-option input:checked + span { background: #1c2028; color: #fff; border-color: #1c2028; }
.talk-compose-note { font-size: 12px; color: var(--text-muted); margin: 4px 0 14px; }
.talk-detail-title { font-size: 24px; margin: 8px 0 12px; line-height: 1.3; }
.talk-detail-author { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.talk-detail-body { font-size: 15px; line-height: 1.7; color: var(--ink); }
.talk-detail-imgs { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 16px; }
.talk-detail-imgs img { width: 100%; border-radius: 10px; display: block; background: #eee; }
.talk-attach {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f4f5f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
}
.talk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.talk-staff-hint { margin-top: 10px; font-size: 12px; color: var(--text-muted); }
.talk-comments { margin-top: 16px; }
.talk-comment-form textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 8px; box-sizing: border-box; }
.talk-reply-hint { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; color: var(--text-secondary); }
.talk-comment { padding: 14px 0; border-bottom: 1px solid var(--border); }
.talk-comment:last-child { border-bottom: 0; }
.talk-comment-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 6px; }
.talk-comment-replyto { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.talk-comment-body { font-size: 14px; line-height: 1.6; }
.talk-comment-actions { margin-top: 6px; display: flex; gap: 4px; }
.talk-comment:target { background: #f4f5f7; border-radius: 8px; padding-left: 8px; padding-right: 8px; }
@media (max-width: 640px) {
    .talk-filter { flex-direction: column; align-items: stretch; }
    .talk-search { width: 100%; }
    .talk-search input { flex: 1; min-width: 0; }
    .talk-detail-title { font-size: 20px; }
    .mobile-bottom-nav .mbn-label { font-size: 10px; }
    .mobile-bottom-nav .mbn-item { min-width: 0; padding: 0 2px; }
}

.custom-plaza {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}
.custom-plaza .lottery-hub-head {
    max-width: 720px;
}
.custom-plaza .wallet-nav {
    max-width: 100%;
    flex-wrap: wrap;
}
.custom-seller-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    max-width: 100%;
    justify-content: start;
}
.custom-seller-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 100%;
}
@media (min-width: 900px) {
    .custom-seller-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.custom-plaza-filters {
    max-width: 640px;
    margin-bottom: 14px;
}
.custom-seller-head { display: flex; align-items: center; gap: 10px; }
.custom-seller-intro {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
    flex: 1;
}
.custom-order-list { display: flex; flex-direction: column; }
.custom-order-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}
.custom-order-row:last-child { border-bottom: 0; }
.custom-order-meta { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.custom-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.custom-thumbs img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}
.custom-file-list { margin: 0; padding-left: 18px; font-size: 14px; }
.custom-timeline { display: flex; flex-direction: column; gap: 12px; }
.custom-timeline-item { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.custom-timeline-item:last-child { border-bottom: 0; }
.custom-timeline-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.custom-timeline-body { font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.custom-actions .form-group { margin-bottom: 10px; }

.co-page { max-width: 640px; }
.co-card { margin-bottom: 12px; }
.co-meta { margin: 0 0 8px; font-size: 13px; color: var(--text-secondary); }
.co-req { margin: 0; white-space: pre-wrap; line-height: 1.65; font-size: 14px; }
.co-pkg-line {
    margin: 12px 0 0;
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 8px;
}
.co-pkg-line.is-skip {
    color: #166534;
    background: #f0fdf4;
}
.co-actions-card .co-primary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.co-pay-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    align-items: center;
}
.co-pay-select {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
}
.co-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}
.co-more {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.co-link {
    border: 0;
    background: none;
    padding: 0;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}
.co-link:hover { color: var(--primary); }
.co-link-danger:hover { color: #dc2626; }
.co-msg-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.co-msg-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-sizing: border-box;
    resize: vertical;
}
.co-modal-btns {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}
.modal[id^="co-modal-"][hidden] { display: none !important; }
.modal[id^="co-modal-"]:not([hidden]) { display: flex; }
.co-countdown-card { text-align: center; }
.co-countdown-label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.co-countdown {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.co-dl-list { display: flex; flex-direction: column; gap: 8px; }
.co-dl-btn {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 420px;
    min-height: 48px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.co-accept-btn {
    margin-top: 4px;
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

.checkout-sheet-head-simple {
    padding-right: 48px;
}
.checkout-coupon-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 6px;
}
.checkout-coupon-opt {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    padding: 12px 14px;
    border: 1px solid var(--border, #d8dce4);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    font: inherit;
    color: var(--ink);
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.checkout-coupon-opt-title {
    display: block;
    font-size: 14px;
    font-weight: 650;
}
.checkout-coupon-opt small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--text-muted);
}
.checkout-coupon-opt.is-active {
    border-color: var(--primary, #b0102a);
    box-shadow: 0 0 0 1px var(--primary, #b0102a);
    background: #fff8f8;
}
.checkout-coupon-opt:hover {
    border-color: var(--primary, #b0102a);
}
body:has(.checkout-sheet:not([hidden])) .mobile-bottom-nav {
    visibility: hidden;
    pointer-events: none;
}

.detail-buy-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(251, 251, 252, 0.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-sizing: border-box;
}
.detail-buy-sticky-inner {
    max-width: 560px;
    margin: 0 auto;
}
.detail-buy-sticky-inner.is-split {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.detail-buy-sticky-inner.is-split .detail-buy-sticky-cta {
    flex: 1;
    min-width: 0;
}
.detail-buy-sticky-cta {
    width: 100%;
    min-height: 46px;
    font-weight: 700;
    font-size: 15px;
}
.act-sheet-input {
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--border, #d8dce4);
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
}
body:has(.act-sheet:not([hidden])) .mobile-bottom-nav {
    visibility: hidden;
    pointer-events: none;
}
body:has(.detail-buy-sticky) .detail-page,
body:has(.detail-buy-sticky) .container.detail-page {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 720px) {
    body:has(.mobile-bottom-nav) .detail-buy-sticky {
        bottom: calc(var(--mbn-stack, 78px) + env(safe-area-inset-bottom, 0px));
        padding-bottom: 10px;
    }
    body:has(.mobile-bottom-nav):has(.detail-buy-sticky) .detail-page,
    body:has(.mobile-bottom-nav):has(.detail-buy-sticky) .container.detail-page {
        padding-bottom: calc(var(--mbn-stack, 78px) + 72px + env(safe-area-inset-bottom, 0px));
    }
}

.buy-sheet {
    position: fixed;
    inset: 0;
    z-index: 12100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    box-sizing: border-box;
}
.buy-sheet[hidden] { display: none !important; }
.buy-sheet-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 22, 30, 0.45);
}
.buy-sheet-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    max-height: min(88dvh, 640px);
    display: flex;
    flex-direction: column;
    background: #fbfbfc;
    border: 1px solid #d8dce4;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -12px 40px rgba(18, 22, 30, 0.14);
    animation: buySheetIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
    box-sizing: border-box;
    overflow: hidden;
}
@keyframes buySheetIn {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .buy-sheet-panel { animation: none; }
}
.buy-sheet-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted, #8b919a);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
.buy-sheet-close:hover { background: rgba(0, 0, 0, 0.05); color: var(--ink); }
.buy-sheet-head {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 18px 48px 14px 16px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    flex-shrink: 0;
}
.buy-sheet-cover {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--line, #e5e7eb);
    background: #f3f4f6;
    display: block;
}
.buy-sheet-cover.is-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-muted);
}
.buy-sheet-head-meta {
    min-width: 0;
    flex: 1;
}
.buy-sheet-head-meta h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.buy-sheet-price {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 750;
    color: var(--primary, #b0102a);
    font-variant-numeric: tabular-nums;
}
.buy-sheet-coupon-hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}
.buy-sheet-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 16px 8px;
    min-height: 0;
}
.buy-sheet-label {
    display: block;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.buy-sheet-specs .buy-spec-row,
.buy-sheet .spec-pick-option.buy-spec-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    margin: 0;
}
.buy-sheet .spo-thumb {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    flex: 0 0 auto;
}
.buy-sheet .spo-thumb.is-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: default;
}
.buy-sheet .spo-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.buy-sheet .spo-name {
    font-size: 14px;
    font-weight: 650;
    color: var(--ink);
    line-height: 1.35;
    grid-column: auto;
}
.buy-sheet .spo-fmt {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.3;
    grid-column: auto;
}
.buy-sheet .spo-owned-tag {
    display: inline-block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    background: #eef0f3;
    border-radius: 4px;
    padding: 1px 6px;
    width: fit-content;
}
.buy-sheet .spo-price {
    flex: 0 0 auto;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    grid-column: auto;
    grid-row: auto;
    white-space: nowrap;
}
.buy-sheet-foot {
    flex-shrink: 0;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border, #e5e7eb);
    background: #fff;
}
.buy-sheet-foot .btn {
    min-height: 46px;
    font-weight: 700;
}
.buy-sheet-foot-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.45;
}
body.buy-sheet-open {
    overflow: hidden;
}
body.buy-sheet-open .mobile-bottom-nav,
body:has(.buy-sheet:not([hidden])) .mobile-bottom-nav {
    visibility: hidden;
    pointer-events: none;
}
@media (min-width: 721px) {
    .buy-sheet {
        align-items: center;
        padding: 24px;
    }
    .buy-sheet-panel {
        border-radius: 14px;
        max-height: min(82vh, 620px);
    }
    .buy-sheet-foot {
        padding-bottom: 14px;
    }
}

