:root,
html[data-theme="light"] {
    color-scheme: light;
    --np-canvas: #f4f6f5;
    --np-surface: #ffffff;
    --np-surface-2: #e9eeec;
    --np-ink: #18201e;
    --np-muted: #66736f;
    --np-border: #d8e0dd;
    --np-accent: #24786d;
    --np-accent-soft: #dceee9;
    --np-on-accent: #ffffff;
    --np-danger: #b44949;
    --np-shadow: 0 8px 28px rgba(24, 32, 30, 0.08);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --np-canvas: #111614;
    --np-surface: #1a211f;
    --np-surface-2: #232c29;
    --np-ink: #e7ece9;
    --np-muted: #9ba8a3;
    --np-border: #34403c;
    --np-accent: #75c5b5;
    --np-accent-soft: #203b35;
    --np-on-accent: #10201c;
    --np-danger: #e27b7b;
    --np-shadow: 0 8px 28px rgba(0, 0, 0, 0.24);
}

html {
    min-height: 100%;
    background: var(--np-canvas);
}

body.mobile-page {
    min-height: 100dvh;
    margin: 0;
    background: var(--np-canvas);
    color: var(--np-ink);
    font-family: "MiSans", "HarmonyOS Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.mobile-page,
.mobile-page * {
    box-sizing: border-box;
}

.mobile-page img {
    display: block;
    max-width: 100%;
}

.mobile-page a {
    color: inherit;
    text-decoration: none;
}

.mobile-page button,
.mobile-page input,
.mobile-page select {
    font: inherit;
}

.mobile-page button {
    color: inherit;
}

.mobile-page :focus-visible {
    outline: 2px solid var(--np-accent);
    outline-offset: 2px;
}

.mobile-page #footer {
    display: none !important;
}

.mp-shell {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 0 16px;
}

.mp-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding-top: env(safe-area-inset-top);
    border-bottom: 1px solid var(--np-border);
    background: var(--np-canvas);
}

.mp-topbar__inner {
    display: flex;
    width: min(100%, 1120px);
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 auto;
    padding: 7px 16px;
}

.mp-topbar__title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.mp-topbar__title h1,
.mp-topbar__title strong {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: var(--np-ink);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid var(--np-border);
    border-radius: 8px;
    background: var(--np-surface);
    color: var(--np-accent);
    font-size: 17px;
    font-weight: 700;
}

.mp-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
}

.mp-icon-btn {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--np-muted);
    cursor: pointer;
}

.mp-icon-btn--outlined {
    border-color: var(--np-border);
    background: var(--np-surface);
}

.mp-icon-btn:active {
    transform: scale(0.97);
}

.mp-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mp-theme-icon--moon {
    display: none;
}

html[data-theme="dark"] .mp-theme-icon--moon {
    display: block;
    fill: currentColor;
    stroke: none;
}

html[data-theme="dark"] .mp-theme-icon--sun {
    display: none;
}

.mp-section {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--np-border);
}

.mp-section__head {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.mp-section__head h2 {
    margin: 0;
    color: var(--np-ink);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
}

.mp-section__head > a,
.mp-section__head > button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    border: 0;
    background: transparent;
    color: var(--np-muted);
    font-size: 13px;
    cursor: pointer;
}

.mp-cover {
    position: relative;
    display: block;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid var(--np-border);
    border-radius: 8px;
    background: var(--np-surface-2);
}

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

.mp-tag {
    display: inline-flex;
    max-width: 160px;
    align-items: center;
    padding: 1px 7px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--np-surface-2);
    color: var(--np-muted);
    font-size: 11px;
    line-height: 1.65;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mp-tag--accent {
    background: var(--np-accent-soft);
    color: var(--np-accent);
}

.mp-score {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 3px;
    color: var(--np-accent);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.mp-score svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

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

.mp-empty {
    margin: 0;
    padding: 22px 0;
    color: var(--np-muted);
    font-size: 13px;
    text-align: center;
}

.mp-primary-btn,
.mp-secondary-btn {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.mp-primary-btn {
    border: 1px solid var(--np-accent);
    background: var(--np-accent);
    color: var(--np-on-accent);
}

.mp-secondary-btn {
    border: 1px solid var(--np-border);
    background: var(--np-surface);
    color: var(--np-ink);
}

.mp-primary-btn:active,
.mp-secondary-btn:active {
    transform: translateY(1px);
}

.mp-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: flex;
    align-items: stretch;
    padding: 6px max(8px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--np-border);
    background: var(--np-surface);
    box-shadow: 0 -8px 24px rgba(24, 32, 30, 0.06);
}

html[data-theme="dark"] .mp-bottom-nav {
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
}

.mp-bottom-nav__item {
    display: flex;
    min-width: 0;
    min-height: 50px;
    flex: 1 1 0;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--np-muted);
    font-size: 11px;
    cursor: pointer;
}

.mp-bottom-nav__item .mp-icon {
    width: 21px;
    height: 21px;
}

.mp-bottom-nav__item.is-active {
    background: var(--np-accent-soft);
    color: var(--np-accent);
    font-weight: 700;
}

.mp-bottom-nav__item:active {
    transform: scale(0.98);
}

.mp-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    background: rgba(17, 22, 20, 0.48);
}

.mp-sheet-backdrop.is-open {
    display: block;
}

.mp-sheet {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 61;
    max-height: min(78dvh, 680px);
    overflow-y: auto;
    padding: 18px 16px max(18px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--np-border);
    border-radius: 12px 12px 0 0;
    background: var(--np-surface);
    box-shadow: var(--np-shadow);
    transform: translateY(105%);
}

.mp-sheet.is-open {
    transform: translateY(0);
}

.mp-sheet__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mp-sheet__head h2 {
    margin: 0;
    font-size: 18px;
}

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

@media (min-width: 600px) {
    .mp-shell,
    .mp-topbar__inner {
        padding-right: 24px;
        padding-left: 24px;
    }
}

@media (min-width: 1024px) {
    .mp-shell,
    .mp-topbar__inner {
        padding-right: 32px;
        padding-left: 32px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    body.mobile-page,
    .mp-topbar,
    .mp-icon-btn,
    .mp-cover,
    .mp-bottom-nav,
    .mp-sheet {
        transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 220ms ease;
    }

    .mp-icon-btn,
    .mp-primary-btn,
    .mp-secondary-btn,
    .mp-bottom-nav__item {
        transition: transform 120ms ease, background-color 180ms ease, color 180ms ease;
    }
}

@media (hover: hover) {
    .mp-icon-btn:hover,
    .mp-section__head > a:hover,
    .mp-section__head > button:hover {
        color: var(--np-accent);
    }

    .mp-icon-btn:hover {
        background: var(--np-surface-2);
    }

    .mp-bottom-nav__item:hover {
        background: var(--np-surface-2);
        color: var(--np-ink);
    }
}
