:root {
    --ink: #102033;
    --muted: #637083;
    --paper: #f6f8fb;
    --deep: #071933;
    --blue: #1664ff;
    --cyan: #2fd5ff;
    --orange: #ff8a2a;
    --line: #dde5ef;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
    color: var(--ink);
    background: #fff;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.admin-toolbar {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 50;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    max-width: calc(100vw - 36px);
}
.admin-toolbar span,
.admin-toolbar a,
.inline-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 6px;
    background: #102033;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(16,32,51,.2);
}
.admin-toolbar span { background: #ff8a2a; }
.quick-edit-btn {
    border: 0;
    cursor: pointer;
    font-family: inherit;
}
.inline-edit {
    background: var(--blue);
    margin-left: 12px;
    vertical-align: middle;
}
.quick-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: stretch;
    justify-content: flex-end;
    background: rgba(7,17,31,.42);
}
.quick-modal.open { display: flex; }
.quick-panel {
    width: min(520px, 100%);
    height: 100%;
    background: #fff;
    color: var(--ink);
    overflow: auto;
    box-shadow: -20px 0 50px rgba(16,32,51,.24);
}
.quick-head {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 22px;
}
.quick-head button,
.quick-actions button {
    border: 0;
    border-radius: 6px;
    min-height: 38px;
    padding: 0 14px;
    cursor: pointer;
    font-family: inherit;
}
.quick-form { display: grid; gap: 16px; padding: 22px; }
.quick-form label { display: grid; gap: 7px; font-weight: 700; }
.quick-form input,
.quick-form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
}
.quick-form textarea { min-height: 120px; line-height: 1.7; resize: vertical; }
.quick-actions { display: flex; gap: 10px; }
.quick-actions button[type="submit"] { background: var(--blue); color: #fff; }
.quick-cancel { background: #edf2f7; color: var(--ink); }
.quick-msg { color: var(--blue); margin: 0; }
.image-field {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}

.visual-edit-mode [data-inline-key] {
    cursor: text;
    outline: 1px dashed rgba(22, 100, 255, .35);
    outline-offset: 3px;
    border-radius: 4px;
}
.visual-edit-mode [data-inline-key]:hover { background: rgba(22, 100, 255, .08); }
.visual-edit-mode [data-inline-key].is-editing {
    background: #fff7e8;
    outline: 2px solid var(--orange);
}
.text-edit-bar {
    position: absolute;
    z-index: 120;
    display: none;
    width: min(360px, calc(100vw - 24px));
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: 0 16px 42px rgba(16,32,51,.24);
}
.text-edit-bar.open { display: grid; }
.text-edit-head,
.text-edit-controls,
.text-edit-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.text-edit-bar textarea {
    width: 100%;
    min-height: 92px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
    line-height: 1.6;
    resize: vertical;
}
.text-edit-bar button {
    border: 0;
    border-radius: 5px;
    min-height: 30px;
    padding: 0 10px;
    cursor: pointer;
    font-family: inherit;
    background: #edf2f7;
}
.text-edit-actions button:first-child { background: var(--blue); color: #fff; }
.text-edit-bar label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
}
.text-edit-bar input[type="number"] {
    width: 64px;
    min-height: 30px;
    border: 0;
    border-radius: 5px;
    padding: 0 6px;
}
.text-edit-bar input[type="color"] {
    width: 34px;
    height: 30px;
    border: 0;
    padding: 0;
    background: transparent;
}
.text-edit-bar [data-text-msg] {
    min-height: 18px;
    margin: 0;
    color: var(--blue);
    font-size: 13px;
}
.visual-edit-mode [data-inline-key].is-editing { background: rgba(255,138,42,.12); }
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.media-item {
    border: 1px solid #e0e6ef;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}
.media-item img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 6px;
    background: #eef2f7;
    margin-bottom: 8px;
}
.media-item input {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 5px;
    padding: 7px;
    font-size: 12px;
}
.card { position: relative; }
.card-edit {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    margin: 0;
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
    box-shadow: 0 10px 24px rgba(16,32,51,.22);
}
.nav-editor { display: grid; gap: 14px; }
.nav-edit-row {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
}
.nav-row-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 800;
}
.nav-edit-row.dragging,
.nav-child-row.dragging {
    opacity: .45;
    outline: 2px dashed var(--blue);
}
.nav-child-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
    align-items: end;
    padding: 10px;
    border-radius: 6px;
    background: #fff;
    margin-top: 8px;
}
.nav-child-row button,
[data-add-nav],
[data-add-child],
[data-remove-nav] {
    border: 0;
    border-radius: 5px;
    min-height: 34px;
    padding: 0 10px;
    cursor: pointer;
    font-family: inherit;
}
[data-add-nav],
[data-add-child] { background: #e8f1ff; color: var(--blue); }
[data-remove-nav],
[data-remove-child] { background: #fee4e2; color: #b42318; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}
.nav {
    max-width: 1180px;
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: .02em;
    font-size: 22px;
}
.brand img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 50%;
}
.brand span { color: var(--blue); }
.nav-links { display: flex; gap: 24px; font-size: 15px; color: #24364d; }
.nav-links a:hover { color: var(--blue); }
.language-select {
    min-width: 66px;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 8px;
    color: #24364d;
    background: #fff;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.nav-item { position: relative; display: flex; align-items: center; min-height: 44px; }
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    display: none;
    min-width: 150px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(16,32,51,.14);
}
.nav-item:hover .nav-dropdown { display: grid; gap: 4px; }
.nav-dropdown a { padding: 8px 10px; border-radius: 5px; white-space: nowrap; }
.nav-dropdown a:hover { background: var(--paper); }
.nav-edit-button {
    border: 0;
    border-radius: 6px;
    background: var(--blue);
    color: #fff;
    min-height: 32px;
    padding: 0 10px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
}

.hero {
    min-height: 560px;
    color: #fff;
    background:
        radial-gradient(circle at 78% 20%, rgba(47,213,255,.24), transparent 28%),
        radial-gradient(circle at 22% 18%, rgba(255,138,42,.18), transparent 24%),
        linear-gradient(135deg, #071933 0%, #102a58 58%, #071933 100%);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}
.hero:after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(135deg, rgba(7,25,51,.92), rgba(16,42,88,.76)),
        linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: auto, 64px 64px, 64px 64px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent);
}
.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    margin: 0 auto;
    padding: 118px 24px 96px;
}
.eyebrow { color: var(--cyan); font-weight: 700; margin-bottom: 18px; }
.hero h1 { font-size: clamp(42px, 6vw, 78px); margin: 0 0 18px; line-height: 1.05; }
.hero p { max-width: 680px; color: rgba(255,255,255,.82); font-size: 22px; line-height: 1.7; margin: 0 0 34px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 6px;
    font-weight: 700;
    background: var(--orange);
    color: #fff;
}
.btn.secondary { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); }

.section { padding: 76px 24px; }
.page-section-stack {
    display: flex;
    flex-direction: column;
}
.visual-edit-mode [data-page-section],
.visual-edit-mode [data-sort-id] {
    position: relative;
}
.section-drag-handle {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 4;
    min-height: 32px;
    border: 0;
    border-radius: 6px;
    padding: 0 10px;
    background: #102033;
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: grab;
    box-shadow: 0 10px 24px rgba(16,32,51,.18);
}
.visual-edit-mode [data-page-section].dragging,
.visual-edit-mode [data-sort-id].dragging {
    opacity: .55;
    outline: 2px dashed var(--blue);
    outline-offset: -8px;
}
.front-sort-status {
    max-width: 1180px;
    margin: 0 auto 10px;
    padding: 8px 24px 0;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}
.section.alt { background: var(--paper); }
.container { max-width: 1180px; margin: 0 auto; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 30px; }
.section-head h2 { font-size: 34px; margin: 0 0 8px; }
.section-head p { color: var(--muted); margin: 0; line-height: 1.7; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(16,32,51,.12); }
.card-media { aspect-ratio: 16 / 10; background: linear-gradient(135deg, #dfe8f5, #f7faff); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transform-origin: center; }
.card-body { padding: 22px; }
.card h3 { margin: 0 0 10px; font-size: 21px; }
.meta { color: var(--blue); font-size: 14px; margin-bottom: 10px; }
.summary { color: var(--muted); line-height: 1.75; margin: 0; }

.feature-band {
    background: var(--deep);
    color: #fff;
}
.feature-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature {
    border-top: 3px solid var(--orange);
    background: #fff;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 24px;
    border-radius: 8px;
}
.feature h3 { margin: 0 0 10px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.7; }
.feature-band .feature { background: rgba(255,255,255,.07); border-left: 0; border-right: 0; border-bottom: 0; }
.feature-band .feature p { color: rgba(255,255,255,.76); }
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.info-tile {
    min-height: 190px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.info-kicker {
    width: fit-content;
    margin-bottom: 18px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e8f1ff;
    color: var(--blue);
    font-size: 12px;
    font-weight: 800;
}
.info-tile h3 { margin: 0 0 10px; font-size: 22px; }
.info-tile p { margin: 0; color: var(--muted); line-height: 1.75; }

.page-hero { background: var(--deep); color: #fff; padding: 78px 24px; }
.page-hero h1 { max-width: 1180px; margin: 0 auto 12px; font-size: 46px; }
.page-hero p { max-width: 1180px; margin: 0 auto; color: rgba(255,255,255,.78); font-size: 18px; }
.article { max-width: 860px; margin: 0 auto; line-height: 1.9; font-size: 17px; }
.article img { border-radius: 8px; margin: 20px 0; }
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 34px;
    align-items: start;
}
.detail-media {
    position: sticky;
    top: 96px;
    overflow: hidden;
    border-radius: 8px;
    background: #eaf0f8;
    box-shadow: 0 22px 50px rgba(16,32,51,.16);
}
.detail-media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transform-origin: center;
}
.detail-copy { padding-top: 8px; }
.detail-copy h2 {
    margin: 14px 0 12px;
    font-size: 34px;
    line-height: 1.22;
}
.detail-copy .lead {
    margin: 0 0 22px;
    color: #46566f;
    font-size: 19px;
    line-height: 1.75;
}
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.detail-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 5px;
    background: #e8f1ff;
    color: var(--blue);
    font-size: 13px;
    font-weight: 800;
}
.detail-edit {
    margin: 14px 0 0;
    width: fit-content;
}
.contact-box {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 30px;
    padding: 34px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}
.member-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 22px;
    align-items: start;
}
.member-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 26px;
}
.member-card.full { grid-column: 1 / -1; }
.member-main { min-height: 280px; }
.member-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}
.member-head img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--paper);
}
.member-head h2,
.member-card h3 { margin: 0 0 8px; }
.member-head p,
.member-card p { color: var(--muted); line-height: 1.75; }
.member-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 18px;
}
.member-form.compact { grid-template-columns: 1fr; }
.member-form label {
    display: grid;
    gap: 7px;
    font-weight: 700;
}
.member-form input,
.member-form select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
}
.member-form button {
    align-self: end;
    min-height: 42px;
    border: 0;
    border-radius: 6px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.member-logout {
    display: inline-flex;
    margin-top: 18px;
    color: var(--muted);
    font-size: 14px;
}
.member-link {
    padding: 10px 12px;
    border: 1px dashed var(--line);
    border-radius: 6px;
    background: var(--paper);
    word-break: break-all;
}
.member-qr {
    width: 180px;
    height: 180px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
    margin: 14px 0 8px;
}
.pc-login-box {
    display: grid;
    justify-items: start;
    gap: 12px;
    margin-top: 18px;
}
.pc-login-qr {
    width: 244px;
    height: 244px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}
.pc-login-qr img {
    width: 220px;
    height: 220px;
    object-fit: contain;
}
.pc-login-box button {
    min-height: 38px;
    border: 0;
    border-radius: 6px;
    padding: 0 14px;
    background: #e8f1ff;
    color: var(--blue);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.clean-list {
    padding-left: 18px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.9;
}
.hint { color: var(--muted); line-height: 1.7; }
.error { color: #b42318; }
.notice-text { color: #027a48; font-weight: 800; }
.site-footer { background: #07111f; color: rgba(255,255,255,.72); padding: 34px 24px; }
.footer-inner { max-width: 1180px; margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 860px) {
    .nav { height: auto; padding: 16px; align-items: flex-start; gap: 12px; flex-direction: column; }
    .nav-links { width: 100%; flex-direction: column; align-items: stretch; gap: 6px; }
    .nav-item {
        width: 100%;
        min-height: auto;
        display: grid;
        gap: 6px;
        align-items: stretch;
    }
    .nav-item > a {
        min-height: 38px;
        display: flex;
        align-items: center;
        padding: 0 10px;
        border-radius: 6px;
        background: rgba(22, 100, 255, .06);
    }
    .nav-dropdown {
        position: static;
        display: grid;
        min-width: 0;
        width: 100%;
        gap: 4px;
        margin: 0 0 4px;
        padding: 6px 0 6px 14px;
        border: 0;
        border-left: 2px solid var(--line);
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }
    .nav-dropdown a {
        min-height: 34px;
        display: flex;
        align-items: center;
        white-space: normal;
        background: #fff;
        border: 1px solid var(--line);
    }
    .language-select { width: 100%; }
    .pc-login-qr { width: 220px; height: 220px; }
    .pc-login-qr img { width: 198px; height: 198px; }
    .hero-inner { padding: 84px 20px 76px; }
    .grid, .feature-list, .contact-box, .info-grid, .detail-layout, .member-layout, .member-form { grid-template-columns: 1fr; }
    .detail-media { position: static; }
    .section-head { display: block; }
    .footer-inner { flex-direction: column; }
}
