:root {
    --bg: #f6f2eb;
    --bg-soft: #fbf8f3;
    --bg-panel: rgba(255, 255, 255, 0.88);
    --bg-panel-strong: rgba(255, 255, 255, 0.96);
    --bg-dark: #102a2c;
    --bg-dark-soft: #17373a;
    --line: rgba(16, 42, 44, 0.1);
    --line-strong: rgba(16, 42, 44, 0.18);
    --text: #163237;
    --text-soft: #607377;
    --text-muted: #7f8f92;
    --primary: #15424a;
    --primary-strong: #0d3137;
    --accent: #c58a3a;
    --accent-strong: #a86c1a;
    --success: #0f7b57;
    --warning: #b26b00;
    --danger: #b23b2f;
    --shadow-sm: 0 14px 32px rgba(17, 32, 34, 0.08);
    --shadow-md: 0 22px 54px rgba(17, 32, 34, 0.11);
    --shadow-lg: 0 34px 80px rgba(17, 32, 34, 0.16);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(197, 138, 58, 0.16), transparent 26%),
        radial-gradient(circle at 85% 10%, rgba(21, 66, 74, 0.14), transparent 23%),
        linear-gradient(180deg, #fcf8f3 0%, var(--bg) 40%, #efe7dc 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(21, 66, 74, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21, 66, 74, 0.026) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.28), transparent 88%);
}

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

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

button,
input,
select,
textarea {
    font: inherit;
}

textarea {
    min-height: 120px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.96);
    resize: vertical;
}

.shell-container {
    width: min(1200px, calc(100vw - 40px));
    margin: 0 auto;
}

.shell-body {
    min-height: 100vh;
}

.shell-header {
    position: sticky;
    top: 0;
    z-index: 30;
    transition: box-shadow 0.24s ease, background-color 0.24s ease;
}

.shell-header.is-scrolled {
    box-shadow: 0 18px 44px rgba(10, 26, 29, 0.18);
}

.shell-header__top {
    background: linear-gradient(90deg, rgba(10, 33, 35, 0.92), rgba(22, 54, 57, 0.9));
    color: rgba(246, 240, 229, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.shell-header__meta,
.shell-header__bar,
.shell-footer__grid,
.filter-bar,
.shell-actions,
.section-heading,
.admin-topbar,
.page-actions,
.table-actions,
.pair-list,
.shell-auth-links,
.shell-notice__inner,
.shell-meta-list {
    display: flex;
    gap: 16px;
    align-items: center;
}

.shell-header__meta,
.shell-header__bar,
.section-heading,
.admin-topbar {
    justify-content: space-between;
}

.shell-header__meta {
    min-height: 44px;
    font-size: 0.9rem;
}

.shell-meta-list {
    flex-wrap: wrap;
    color: rgba(246, 240, 229, 0.8);
}

.shell-meta-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(197, 138, 58, 0.18);
    color: #fff2df;
    font-weight: 600;
}

.shell-header__bar {
    position: relative;
    padding: 18px 0;
    background: rgba(255, 250, 243, 0.78);
    backdrop-filter: blur(16px);
}

.shell-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.shell-brand strong,
.shell-brand small {
    display: block;
}

.shell-brand strong,
.hero-panel h1,
.section-heading h1,
.section-heading h2,
.card h1,
.card h2,
.card h3,
.admin-topbar h1,
.auth-card h1,
.admin-login-panel h1 {
    font-family: "Source Han Serif SC", "Noto Serif SC", "Songti SC", serif;
    letter-spacing: 0.02em;
}

.shell-brand strong {
    font-size: 1.14rem;
}

.shell-brand small {
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 0.78rem;
}

.shell-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), #1f5963);
    color: #fff;
    font-size: 1.12rem;
    font-weight: 700;
    box-shadow: 0 14px 26px rgba(21, 66, 74, 0.22);
}

.shell-nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(21, 66, 74, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    cursor: pointer;
}

.shell-nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--primary);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.shell-nav-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    justify-content: space-between;
    min-width: 0;
}

.shell-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.shell-auth-links {
    flex-wrap: wrap;
    justify-content: flex-end;
    font-size: 0.93rem;
}

.shell-nav a,
.shell-auth-links a,
.admin-nav a {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    color: rgba(22, 50, 55, 0.84);
    transition: color 0.22s ease, background-color 0.22s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.shell-nav a:hover,
.shell-auth-links a:hover,
.admin-nav a:hover {
    color: var(--primary);
    background: rgba(21, 66, 74, 0.06);
    transform: translateY(-1px);
}

.shell-nav a.is-active,
.shell-auth-links a.is-active,
.admin-nav a.is-active {
    background: linear-gradient(135deg, rgba(21, 66, 74, 0.94), rgba(38, 86, 92, 0.92));
    color: #fff;
    box-shadow: 0 12px 24px rgba(21, 66, 74, 0.16);
}

.shell-notice {
    background: linear-gradient(90deg, rgba(197, 138, 58, 0.18), rgba(255, 255, 255, 0.12));
    border-top: 1px solid rgba(21, 66, 74, 0.06);
    border-bottom: 1px solid rgba(21, 66, 74, 0.06);
}

.shell-notice__inner {
    min-height: 50px;
    color: var(--primary);
}

.shell-notice__label {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(197, 138, 58, 0.16);
    color: var(--accent-strong);
    font-size: 0.86rem;
    font-weight: 700;
}

.shell-main {
    min-height: calc(100vh - 220px);
    padding-bottom: 40px;
}

.shell-hero {
    padding: 36px 0 22px;
}

.hero-layout,
.content-split,
.shell-reading {
    display: grid;
    gap: 24px;
}

.hero-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.88fr);
    align-items: stretch;
}

.shell-reading {
    grid-template-columns: minmax(0, 1.85fr) minmax(280px, 0.92fr);
}

.content-split {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.95fr);
}

.hero-panel,
.hero-aside,
.card,
.table-card,
.admin-login-panel,
.auth-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    background: var(--bg-panel);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(18px);
}

.hero-panel::before,
.hero-aside::before,
.card::before,
.table-card::before,
.admin-login-panel::before,
.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), transparent 46%);
}

.hero-panel,
.hero-aside {
    padding: 36px;
}

.hero-panel {
    background:
        radial-gradient(circle at top right, rgba(197, 138, 58, 0.16), transparent 34%),
        linear-gradient(145deg, rgba(255, 251, 244, 0.97), rgba(244, 237, 228, 0.92));
}

.hero-aside {
    background:
        radial-gradient(circle at top left, rgba(197, 138, 58, 0.16), transparent 28%),
        linear-gradient(180deg, rgba(17, 47, 52, 0.98), rgba(20, 57, 62, 0.95));
    color: #f5eee4;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: var(--accent-strong);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-kicker::before,
.section-kicker::before {
    content: "";
    width: 28px;
    height: 1px;
    background: currentColor;
}

.hero-aside .section-kicker,
.shell-footer .section-kicker {
    color: #f1c68d;
}

.hero-panel h1 {
    margin: 0;
    font-size: clamp(2.45rem, 4.1vw, 4.2rem);
    line-height: 1.04;
}

.hero-panel p,
.hero-aside p,
.section-heading p,
.card p,
.meta {
    line-height: 1.8;
}

.hero-panel p {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--text-soft);
    font-size: 1.04rem;
}

.hero-points,
.shell-list,
.shell-links,
.admin-nav,
.stack-form,
.stack-list,
.aside-stack,
.surface-stack {
    display: grid;
    gap: 14px;
}

.hero-point {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-point strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

.metric-row,
.grid {
    display: grid;
    gap: 18px;
}

.metric-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 28px;
}

.metric-card {
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.84);
    box-shadow: var(--shadow-sm);
}

.metric-card strong {
    display: block;
    color: var(--primary);
    font-size: 2rem;
    line-height: 1;
}

.metric-card span {
    display: block;
    margin-top: 8px;
    color: var(--text-soft);
}

.shell-section {
    padding: 24px 0 36px;
}

.section-heading {
    margin-bottom: 24px;
}

.section-heading h1,
.section-heading h2,
.card h1,
.card h2,
.card h3 {
    margin: 0;
}

.section-heading p {
    margin: 8px 0 0;
    max-width: 680px;
    color: var(--text-soft);
}

.section-heading > a {
    color: var(--primary);
    font-weight: 700;
}

.section-heading > a:hover {
    color: var(--accent-strong);
}

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

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

.card,
.table-card,
.admin-login-panel,
.auth-card {
    padding: 26px;
}

.card {
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(197, 138, 58, 0.28);
}

.card--article {
    padding: 32px;
}

.pair-list {
    flex-wrap: wrap;
    margin: 16px 0 18px;
    color: var(--text-soft);
    font-size: 0.94rem;
}

.pair-list--stack {
    display: grid;
    gap: 10px;
}

.meta {
    color: var(--text-muted);
    font-size: 0.93rem;
}

.richtext {
    position: relative;
    z-index: 1;
    line-height: 1.95;
    color: var(--text);
}

.richtext > :first-child {
    margin-top: 0;
}

.richtext > :last-child {
    margin-bottom: 0;
}

.richtext h1,
.richtext h2,
.richtext h3,
.richtext h4 {
    margin: 1.4em 0 0.72em;
    color: var(--primary-strong);
    line-height: 1.3;
}

.richtext p {
    margin: 0 0 1em;
}

.richtext p,
.richtext div,
.richtext li {
    max-width: 100%;
}

.richtext ul,
.richtext ol {
    margin: 1em 0;
    padding-left: 1.4em;
}

.richtext li + li {
    margin-top: 0.36em;
}

.richtext blockquote {
    margin: 1.4em 0;
    padding: 14px 18px;
    border-left: 4px solid rgba(197, 138, 58, 0.7);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    background: rgba(197, 138, 58, 0.08);
    color: var(--text-soft);
}

.richtext img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.richtext table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.richtext table td,
.richtext table th {
    padding: 10px 12px;
    border: 1px solid var(--line);
}

.richtext a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: rgba(197, 138, 58, 0.55);
    text-underline-offset: 0.18em;
}

.richtext hr {
    margin: 26px 0;
    border: none;
    border-top: 1px solid rgba(21, 66, 74, 0.1);
}

.filter-bar,
.page-actions,
.shell-actions {
    flex-wrap: wrap;
}

.filter-bar {
    margin-bottom: 22px;
    padding: 16px;
    border: 1px solid rgba(21, 66, 74, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
}

.filter-bar input,
.filter-bar select,
.stack-form input,
.stack-form select,
.inline-form input {
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.97);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.filter-bar input:focus,
.filter-bar select:focus,
.stack-form input:focus,
.stack-form select:focus,
textarea:focus,
.inline-form input:focus {
    outline: none;
    border-color: rgba(197, 138, 58, 0.62);
    box-shadow: 0 0 0 4px rgba(197, 138, 58, 0.14);
    transform: translateY(-1px);
}

.stack-form label {
    display: grid;
    gap: 8px;
}

.stack-form > .meta:first-of-type {
    margin-top: -4px;
}

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

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

.form-grid-span {
    grid-column: 1 / -1;
}

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

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent), #deab63);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(197, 138, 58, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(197, 138, 58, 0.28);
    filter: saturate(1.04);
}

.button:disabled,
.button.is-loading {
    cursor: wait;
    opacity: 0.88;
    transform: none;
}

.button--secondary {
    background: linear-gradient(135deg, var(--primary), #27616a);
    box-shadow: 0 14px 28px rgba(21, 66, 74, 0.2);
}

.button--ghost {
    background: rgba(21, 66, 74, 0.08);
    color: var(--primary);
    box-shadow: none;
    border: 1px solid rgba(21, 66, 74, 0.12);
}

.button--full {
    width: 100%;
}

.shell-footer {
    padding: 42px 0 46px;
    background:
        radial-gradient(circle at top right, rgba(197, 138, 58, 0.16), transparent 24%),
        linear-gradient(180deg, #10292b 0%, #0c1f21 100%);
    color: #ece5d8;
}

.shell-footer__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: flex-start;
}

.shell-footer h3 {
    margin: 0 0 12px;
}

.shell-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.shell-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shell-links a,
.shell-list a {
    color: inherit;
    opacity: 0.92;
}

.shell-links a:hover,
.shell-list a:hover {
    color: #f3c98f;
    opacity: 1;
}

.shell-flash,
.shell-error,
.empty-state,
.surface-muted {
    padding: 14px 16px;
    border-radius: var(--radius-md);
}

.shell-flash {
    margin-top: 18px;
    background: rgba(15, 123, 87, 0.12);
    color: #0d5b42;
    border: 1px solid rgba(15, 123, 87, 0.18);
}

.shell-error {
    margin-top: 18px;
    background: rgba(178, 59, 47, 0.1);
    color: #8f251c;
    border: 1px solid rgba(178, 59, 47, 0.16);
}

.empty-state,
.surface-muted {
    background: rgba(243, 237, 227, 0.82);
    color: #4c5d61;
    border: 1px solid rgba(21, 66, 74, 0.08);
}

.empty-state strong {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 1rem;
}

.empty-state p {
    margin: 0;
}

.admin-body,
.admin-login-body {
    background:
        radial-gradient(circle at top left, rgba(106, 155, 131, 0.12), transparent 25%),
        linear-gradient(180deg, #edf1ec 0%, #e5ebe3 100%);
}

.admin-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    padding: 28px 22px;
    background:
        linear-gradient(180deg, rgba(15, 38, 31, 0.98), rgba(23, 60, 49, 0.96)),
        radial-gradient(circle at top right, rgba(197, 138, 58, 0.22), transparent 28%);
    color: #f4f0e8;
    box-shadow: 18px 0 40px rgba(17, 31, 25, 0.14);
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand strong,
.admin-brand small {
    display: block;
}

.admin-brand strong {
    font-size: 1.06rem;
    color: #fff;
}

.admin-brand small {
    margin-top: 4px;
    color: rgba(244, 240, 232, 0.72);
}

.admin-content {
    padding: 28px;
}

.admin-topbar {
    margin-bottom: 20px;
    padding: 18px 22px;
    border: 1px solid rgba(21, 66, 74, 0.08);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-sm);
}

.admin-topbar p {
    margin: 6px 0 0;
    color: var(--text-soft);
}

.admin-nav {
    margin-bottom: 20px;
}

.admin-nav a {
    color: rgba(244, 240, 232, 0.86);
}

.admin-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.admin-nav a.is-active {
    background: linear-gradient(135deg, rgba(197, 138, 58, 0.94), rgba(166, 111, 34, 0.9));
    color: #fff;
}

.admin-login-panel {
    width: min(440px, calc(100vw - 32px));
    margin: 11vh auto;
}

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

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(21, 66, 74, 0.08);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--primary);
    font-size: 0.84rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

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

.text-link {
    padding: 0;
    border: none;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-weight: 700;
}

.text-link:hover {
    color: var(--accent-strong);
}

.text-link--danger {
    color: var(--danger);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.status-pill--success {
    background: rgba(15, 123, 87, 0.12);
    color: var(--success);
}

.status-pill--warning {
    background: rgba(178, 107, 0, 0.12);
    color: var(--warning);
}

.status-pill--muted {
    background: rgba(21, 66, 74, 0.08);
    color: var(--text-soft);
}

.empty-cell {
    text-align: center;
    color: var(--text-soft);
}

.stat {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary);
}

.inline-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.inline-form--stretch {
    width: 100%;
    margin-top: 10px;
}

.media-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 16px;
    background: #edf1ec;
}

.summary-total {
    margin-top: 16px;
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--primary);
}

.table-input {
    width: 90px;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.96);
}

.auth-card,
.admin-login-panel,
.card,
.table-card,
.hero-panel,
.hero-aside {
    animation: rise-in 0.55s ease both;
}

.auth-card .shell-links {
    margin-top: 20px;
    grid-template-columns: 1fr;
}

.page-actions {
    margin: 22px 0;
}

.pagination-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
}

.pagination-summary {
    color: var(--text-soft);
    font-size: 0.94rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(21, 66, 74, 0.1);
    color: var(--primary);
}

.pagination .page-item.is-active .page-link {
    background: linear-gradient(135deg, var(--accent), #deab63);
    color: #fff;
    border-color: transparent;
}

.pagination .page-item.is-disabled .page-link {
    opacity: 0.45;
}

.pagination svg {
    width: 1rem;
    height: 1rem;
}

.shell-backtop {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 25;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--primary), #24545d);
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.08em;
    cursor: pointer;
    box-shadow: 0 18px 34px rgba(21, 66, 74, 0.26);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.shell-backtop.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.shell-actions--compact {
    justify-content: space-between;
}

@keyframes rise-in {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1160px) {
    .shell-header__bar {
        gap: 16px;
        align-items: flex-start;
    }

    .shell-nav-panel {
        gap: 14px;
        flex-direction: column;
        align-items: stretch;
    }

    .shell-auth-links {
        justify-content: flex-start;
    }
}

@media (max-width: 960px) {
    .grid--2,
    .grid--3,
    .shell-reading,
    .admin-layout,
    .metric-row,
    .shell-footer__grid,
    .content-split,
    .form-grid--2,
    .hero-layout,
    .shell-links {
        grid-template-columns: 1fr;
    }

    .shell-header__meta,
    .section-heading,
    .admin-topbar,
    .shell-footer__grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .shell-header__bar {
        align-items: center;
    }

    .shell-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .shell-nav-panel {
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        display: none;
        padding: 16px;
        border: 1px solid rgba(21, 66, 74, 0.08);
        border-radius: 22px;
        background: rgba(255, 251, 245, 0.98);
        box-shadow: var(--shadow-md);
    }

    .shell-nav-panel.is-open {
        display: grid;
    }

    .shell-nav,
    .shell-auth-links {
        justify-content: flex-start;
    }

    .shell-nav {
        width: 100%;
    }

    .shell-nav a,
    .shell-auth-links a {
        width: 100%;
        justify-content: flex-start;
    }

    .admin-sidebar {
        padding-bottom: 20px;
    }

    .admin-content {
        padding: 18px;
    }
}

@media (max-width: 640px) {
    .shell-container {
        width: min(100vw - 20px, 1200px);
    }

    .shell-header__meta {
        gap: 10px;
    }

    .hero-panel,
    .hero-aside,
    .card,
    .table-card,
    .auth-card,
    .admin-login-panel {
        padding: 20px;
        border-radius: 24px;
    }

    .hero-panel h1 {
        font-size: 2.16rem;
    }

    .button {
        width: 100%;
    }

    .shell-actions,
    .page-actions,
    .shell-actions--compact {
        width: 100%;
    }

    .shell-actions--compact > * {
        width: 100%;
    }

    .shell-backtop {
        right: 16px;
        bottom: 18px;
    }
}

.module-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.module-switcher__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid rgba(24, 61, 48, 0.14);
    border-radius: 999px;
    color: var(--ink);
    background: rgba(255, 251, 245, 0.82);
    transition: all 0.2s ease;
}

.module-switcher__item.is-active,
.module-switcher__item:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

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

.compact-form {
    gap: 14px;
}

.table-card--compact {
    margin-top: 18px;
}

.inline-edit-form,
.inline-edit-grid {
    display: grid;
    gap: 10px;
    align-items: center;
}

.inline-edit-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

.inline-edit-grid {
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) auto;
}

.field-hint {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.84rem;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.meta-grid__item {
    padding: 16px 18px;
    border: 1px solid rgba(24, 61, 48, 0.08);
    border-radius: 18px;
    background: rgba(255, 251, 245, 0.82);
}

.meta-grid__item span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.84rem;
}

.meta-grid__item strong {
    font-size: 1rem;
    color: var(--ink);
}

.table-text {
    max-width: 320px;
    white-space: normal;
}

.content-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.content-list li + li {
    margin-top: 8px;
}

.media-preview {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid rgba(24, 61, 48, 0.08);
}

.card--warning {
    border: 1px solid rgba(184, 126, 27, 0.22);
    background: linear-gradient(135deg, rgba(255, 249, 235, 0.95), rgba(255, 255, 255, 0.98));
}

@media (max-width: 900px) {
    .admin-grid--2,
    .meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .inline-edit-form,
    .inline-edit-grid {
        grid-template-columns: 1fr;
    }
}

/* ── 首图路径输入组 ── */
.input-with-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

.input-with-actions input[type="text"] {
    flex: 1;
    min-width: 0;
}

/* ── 媒体选择器 Modal 文件网格 ── */
.media-picker-item {
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    padding: .5rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    overflow: hidden;
}

.media-picker-item:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}

.media-picker-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.media-picker-icon {
    font-size: 2rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-picker-name {
    font-size: .7rem;
    color: #6b7280;
    word-break: break-all;
    text-align: center;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
}

/* ── 产品详情封面图 ── */
.product-cover {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    display: block;
}

/* ── 首页轮播 Banner ── */
.site-banner {
    width: 100%;
    line-height: 0;
}

.site-banner .shell-container {
    position: relative;
    overflow: hidden;
}

.site-banner__track {
    display: flex;
    transition: transform .5s ease;
    will-change: transform;
}

.site-banner__track img {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.site-banner__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.35);
    color: #fff;
    border: none;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 2;
}

.site-banner__arrow:hover { background: rgba(0,0,0,.6); }
.site-banner__arrow--prev { left: 1rem; }
.site-banner__arrow--next { right: 1rem; }

.site-banner__dots {
    position: absolute;
    bottom: .75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: .4rem;
    z-index: 2;
}

.site-banner__dots button {
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    padding: 0;
    transition: background .2s;
}

.site-banner__dots button.is-active { background: #fff; }
