:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --ink: #15233c;
  --muted: #526382;
  --line: #dce3ef;
  --white: #fff;
  --blue: #2757dd;
  --navy: #0c1832;
  --gold: #ffd181;
  --radius: 20px;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 25px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 1rem; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 3px solid #587df0; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.15rem); line-height: 1.16; letter-spacing: -.045em; }
h2 { font-size: 1.22rem; line-height: 1.35; letter-spacing: -.025em; }
p { line-height: 1.6; }
.shell { width: min(1168px, calc(100% - 48px)); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow { color: var(--blue); font-size: .84rem; font-weight: 750; letter-spacing: .045em; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 100%; background: #7d9ffc; vertical-align: .08em; }
.dot.gold { background: #ffcb76; }
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-inner { min-height: 72px; display: flex; gap: 34px; align-items: center; }
.brand { display: inline-flex; gap: 11px; align-items: center; color: inherit; font-weight: 850; font-size: 1.32rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-icon { display: grid; grid-auto-flow: column; place-content: center; align-items: end; gap: 3px; width: 35px; height: 35px; border-radius: 11px; background: #295ce8; }
.brand-icon i { height: 10px; width: 4px; border-radius: 3px; background: #c5d4ff; }
.brand-icon i:nth-child(2) { height: 15px; background: #edf2ff; }
.brand-icon i:nth-child(3) { height: 20px; background: #fff; }
.topbar nav { display: flex; gap: 28px; margin-left: auto; }
.topbar nav a { color: #3c4d69; font-size: .92rem; font-weight: 650; white-space: nowrap; }
.button { min-height: 43px; padding: 8px 15px; border: 1px solid transparent; border-radius: 10px; display: inline-flex; justify-content: center; align-items: center; gap: 6px; line-height: 1.3; font-weight: 680; white-space: nowrap; }
.button:hover { text-decoration: none; }
.button.small { min-height: 37px; padding: 7px 11px; font-size: .88rem; }
.outline { background: #fff; border-color: var(--line); color: #304260; }
.outline:hover:not(:disabled) { background: #f0f4ff; border-color: #b5c7f2; color: #1946c0; }
.primary { color: #fff; background: var(--blue); }
.primary:hover:not(:disabled) { background: #1945c6; }
.danger { background: #fff7f6; color: #a82127; border-color: #f5d1d1; }
.front-main { padding-block: 40px 48px; }
.front-intro { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.front-intro h1 { margin-top: 8px; }
.pill { display: inline-flex; align-items: center; padding: 5px 11px; color: #3452a3; background: #e8eeff; border: 1px solid #d8e3ff; border-radius: 100px; font-size: .78rem; font-weight: 650; white-space: nowrap; }
.summary-grid, .detail-grid { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(290px, 1fr); gap: 18px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 20px #1b326008; }
.feature {
  color: #fff;
  padding: 25px 28px;
  border: 1px solid #263b66;
  border-radius: var(--radius);
  background:
    radial-gradient(ellipse at 90% 0%, #3c5bba77, transparent 58%),
    radial-gradient(circle at 80% 32%, transparent 49%, #7594dc32 50%, transparent 51%),
    linear-gradient(118deg, #101b39, #17294d 70%, #223e79);
  box-shadow: 0 10px 27px #182e6220;
}
.feature-head, .feature-foot, .section-head, .admin-head, .record-actions, .dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.feature-date, .issue, .feature-foot { color: #c8d6f5; }
.feature-date { font-size: .88rem; }
.issue { margin-top: 6px; font-size: .94rem; }
.ball-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.feature .ball-row { margin-block: 23px 22px; gap: clamp(4px, 1vw, 12px); }
.ball { width: 32px; height: 32px; border: 1px solid #c9d8f8; border-radius: 50%; background: #eaf0ff; color: #244489; display: inline-grid; place-items: center; font-size: .91rem; font-weight: 790; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.ball.bonus { background: #fff0cb; border-color: #ecc873; color: #6a3d05; }
.feature .ball { width: clamp(31px, 5vw, 58px); height: clamp(31px, 5vw, 58px); font-size: clamp(.9rem, 2.7vw, 1.53rem); border: 2px solid #bad0ff; background: #f6f9ff; box-shadow: 0 4px 15px #010c3c38, inset 0 -4px #c7d9ff6b; }
.feature .ball.bonus { background: #ffe09d; border-color: #ffc56d; box-shadow: 0 4px 15px #010c3c38, inset 0 -4px #df9d3c30; }
.plus { opacity: .65; font-weight: 680; font-size: .85rem; }
.feature-foot { justify-content: start; padding-top: 14px; border-top: 1px solid #a9bdf238; font-size: .83rem; }
.feature-foot a { margin-left: auto; color: #e5edff; font-weight: 650; }
.feature-foot .dot { margin-right: 4px; }
.time-panel { padding: 24px; }
.time-head { display: flex; align-items: center; gap: 10px; }
.time-icon { background: #e9efff; color: #2956d9; font-weight: 850; border-radius: 10px; display: grid; place-items: center; font-size: 1.3rem; width: 35px; height: 35px; }
.time-panel .muted { margin-top: 9px; font-size: .94rem; }
.countdown { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.countdown div { display: grid; place-items: center; min-width: 48px; padding: 6px 5px; flex: 1; border-radius: 11px; background: #edf2ff; color: #213f8d; }
.countdown strong { font-size: 1.8rem; font-variant-numeric: tabular-nums; letter-spacing: -.04em; line-height: 1.14; }
.countdown span { font-size: .8rem; color: #516797; }
.countdown b { color: #86a0de; }
.time-note { margin-top: 13px; color: var(--muted); font-size: .83rem; }
.sync-status { margin: 2px 0 0; font-size: .8rem; }
.carousel { margin-block: 18px; display: flex; align-items: center; gap: 14px; padding: 13px 17px; min-height: 76px; border: 1px solid #d9e4fd; border-radius: 15px; background: linear-gradient(110deg, #f1f5ff, #fff); }
.carousel-icon { display: grid; flex: none; place-items: center; width: 37px; height: 37px; border-radius: 11px; background: #dbe6ff; color: #2757dd; font-size: 1.18rem; }
.carousel-image { flex: none; width: clamp(90px, 26vw, 210px); height: 92px; object-fit: cover; border-radius: 11px; border: 1px solid var(--line); }
.carousel-content { flex: 1; min-width: 0; }
.carousel h2 { font-size: 1rem; margin-bottom: 2px; overflow-wrap: anywhere; }
.carousel p { font-size: .87rem; color: var(--muted); overflow-wrap: anywhere; }
.carousel-controls { display: flex; align-items: center; color: var(--muted); gap: 7px; font-size: .81rem; white-space: nowrap; }
.carousel-controls button { min-width: 34px; min-height: 34px; border: 1px solid #d1dff9; border-radius: 9px; color: #244695; background: #f8faff; font-size: 1.26rem; line-height: 1; }
.detail-grid { align-items: start; margin-top: 18px; }
.history, .notice { overflow: hidden; }
.section-head { padding: 21px 23px 13px; }
.section-head .muted { margin-top: 4px; font-size: .89rem; }
.notice .eyebrow { margin-bottom: 5px; }
.filters { display: flex; align-items: end; gap: 9px; padding: 4px 23px 16px; border-bottom: 1px solid var(--line); }
label { display: grid; gap: 5px; color: #465673; font-size: .88rem; font-weight: 670; }
input, textarea { width: 100%; min-width: 0; color: var(--ink); padding: 9px 10px; background: #fff; border: 1px solid #cbd6e9; border-radius: 10px; line-height: 1.3; }
input::placeholder { color: #647391; }
textarea { min-height: 105px; resize: vertical; }
.filters label { flex: 1; min-width: 0; max-width: 240px; }
.history-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, auto); align-items: center; gap: 10px; padding: 12px 23px; }
.history-row + .history-row { border-top: 1px solid #edf0f7; }
.history-row time { display: block; margin-top: 3px; font-size: .83rem; color: var(--muted); }
.history-row .ball-row { gap: 5px; }
.notice-item { margin: 0 23px; padding: 13px 0; border-top: 1px solid var(--line); }
.notice-item summary { cursor: pointer; font-weight: 690; overflow-wrap: anywhere; }
.notice-item summary::marker { color: var(--blue); }
.notice-item time { display: block; margin-top: 5px; color: var(--muted); font-size: .84rem; }
.notice-item p { margin-top: 9px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-item:last-child { padding-bottom: 20px; }
.pagination { border-top: 1px solid var(--line); padding: 12px 22px; display: flex; align-items: center; justify-content: end; gap: 10px; color: var(--muted); font-size: .88rem; }
.empty { padding: 22px; color: var(--muted); }
.empty button { margin-inline-start: 10px; }
.footer { display: flex; justify-content: space-between; gap: 12px; padding-block: 18px 29px; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer span:first-child { color: var(--ink); font-weight: 700; }
.flash { margin: 0 0 14px; padding: 9px 12px; border-radius: 9px; background: #e8f7ef; color: #205c3e; white-space: pre-wrap; }
.flash.error, .fatal { background: #fff0f0; color: #9e212b; }
.fatal { margin: 20px; padding: 15px; border-radius: 10px; }
.admin-body { min-height: 100vh; }
.access-shell { display: grid; min-height: 100vh; place-items: center; padding: 20px; background: radial-gradient(ellipse at 25% 5%, #dee8ff, transparent 60%), var(--bg); }
.access-card { padding: 32px; width: min(430px, 100%); }
.access-card h1 { font-size: 1.9rem; margin-top: 21px; }
.access-card p { margin-top: 9px; }
.access-card form { margin-block: 20px; display: grid; gap: 13px; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; min-height: 100vh; height: 100%; max-height: 100vh; overflow: auto; padding: 23px 18px; background: #12213f; color: #f3f6ff; display: flex; flex-direction: column; align-items: start; }
.sidebar .brand { margin: 2px 9px 27px; }
.sidebar nav { display: grid; width: 100%; gap: 6px; }
.sidebar button { text-align: left; display: flex; gap: 12px; align-items: center; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 10px 12px; color: #d0dbf3; font-weight: 670; white-space: nowrap; }
.sidebar button span { color: #a3bafd; font-size: 1.02rem; }
.sidebar button:hover, .sidebar button[aria-current="page"] { border-color: #3b5894; background: #263b68; color: #fff; }
.sidebar-exit { margin-top: auto; padding: 13px 12px 4px; color: #cedbfb; }
.admin-main { width: min(1170px, 100%); margin-inline: auto; padding: 32px 29px; }
.admin-head { margin-bottom: 22px; }
.admin-head h1 { margin-top: 5px; font-size: clamp(1.65rem, 3vw, 2.42rem); }
.admin-head .eyebrow { margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.stat { padding: 17px; color: var(--ink); text-align: left; }
.stat:hover { border-color: #9eb5ed; background: #f8faff; }
.stat span { color: var(--muted); font-size: .89rem; }
.stat strong { display: block; margin-top: 5px; font-size: 2rem; font-variant-numeric: tabular-nums; letter-spacing: -.035em; }
.tool-panel { padding: 19px; }
.tool-panel h2 { margin-bottom: 8px; }
.tool-panel p + p { margin-top: 7px; }
.tool-panel form { max-width: 450px; display: grid; gap: 13px; }
.tool-panel .primary { justify-self: start; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th, .admin-table td { padding: 11px 9px; border-bottom: 1px solid var(--line); }
.admin-table th { color: var(--muted); font-size: .86rem; }
.admin-table td { font-size: .92rem; overflow-wrap: anywhere; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .record-actions { justify-content: flex-end; gap: 5px; }
.table-wrap { overflow: auto; }
.result-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px; margin-top: 12px; }
.result-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.result-filters input { width: min(180px, 43vw); }
.admin-pagination { padding-inline: 0; }
.result-toolbar select { color: var(--ink); border: 1px solid #cbd6e9; background-color: #fff; border-radius: 9px; min-height: 37px; padding: 5px 8px; font: inherit; }
.batch-selection { display: flex; align-items: center; gap: 9px; font-size: .88rem; }
.admin-table .record-check { width: 43px; text-align: center; }
.record-check input { width: 17px; height: 17px; accent-color: var(--blue); cursor: pointer; }
.audit-list { list-style: none; padding: 0; margin: 10px 0; }
.audit-item { border-top: 1px solid var(--line); padding: 11px 0; }
.audit-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.audit-meta time { font-size: .83rem; font-variant-numeric: tabular-nums; }
.audit-item strong, .audit-item p { overflow-wrap: anywhere; }
.audit-item details { margin-top: 5px; font-size: .88rem; }
.audit-item summary { color: var(--blue); cursor: pointer; }
.audit-item p { white-space: pre-wrap; margin: 5px 0 0; }
.access-settings { margin-top: 14px; }
.access-settings p { margin: 6px 0 11px; }
.password-settings { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.password-settings summary { color: var(--blue); cursor: pointer; font-weight: 650; }
.password-settings form { margin-top: 10px; max-width: 460px; }
.status-label { display: inline-flex; white-space: nowrap; border-radius: 8px; padding: 3px 7px; background: #eef3fe; color: #37568f; font-size: .82rem; }
.status-label.inactive { background: #f1f2f5; color: #56647a; }
.banner-thumbnail { display: block; width: 76px; height: 42px; object-fit: cover; border: 1px solid var(--line); border-radius: 7px; }
.banner-preview { display: block; width: 100%; max-height: 180px; object-fit: contain; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.upload-field { display: grid; gap: 8px; padding: 10px 0; }
.upload-field p { margin: 0; font-size: .88rem; }
.upload-field .button { justify-self: start; }
dialog { color: var(--ink); width: min(535px, calc(100% - 30px)); max-height: 90vh; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 16px 75px #081f5370; }
dialog::backdrop { background: #0c18328a; }
.dialog-head { margin-bottom: 15px; }
.form-grid { display: grid; gap: 12px; }
.check-row { display: flex; align-items: center; gap: 9px; }
.check-row input { width: auto; }
.dialog-actions { display: flex; justify-content: end; margin-top: 16px; }
#editor-error { margin-top: 13px; }
.import-picker { margin-top: 14px; }
.import-preview { margin-top: 13px; padding: 12px; border: 1px solid #c8ddcf; border-radius: 10px; background: #f2fbf5; }
.import-preview ul { margin: 7px 0 0; padding-left: 1.35em; }
.import-preview p { margin: 5px 0 0; }
#import-message { margin-top: 13px; }

@media (max-width: 850px) {
  .shell { width: min(100% - 34px, 1168px); }
  .summary-grid, .detail-grid { grid-template-columns: minmax(0, 1.55fr) minmax(243px, 1fr); gap: 12px; }
  .feature, .time-panel { padding: 18px; }
  .section-head, .filters, .history-row { padding-inline: 17px; }
  .history-row { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 163px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
}

@media (max-width: 640px) {
  .shell { width: calc(100% - 26px); }
  .topbar-inner { min-height: auto; padding-block: 12px 8px; gap: 9px; flex-wrap: wrap; justify-content: space-between; }
  .topbar nav { order: 3; width: 100%; margin: 1px 0 0; justify-content: space-between; gap: 8px; padding: 5px 0; }
  .front-main { padding-top: 23px; }
  .front-intro { margin-bottom: 16px; }
  .front-intro h1 { font-size: clamp(1.55rem, 7vw, 2.2rem); }
  .summary-grid, .detail-grid { grid-template-columns: 1fr; }
  .feature .ball { width: clamp(28px, 10vw, 45px); height: clamp(28px, 10vw, 45px); }
  .feature .ball-row { gap: 5px; }
  .feature-head { flex-wrap: wrap; }
  .carousel { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: 10px; }
  .carousel-icon { width: 29px; height: 29px; }
  .carousel-image { width: clamp(74px, 23vw, 100px); height: 65px; }
  .carousel-controls { grid-column: 2; justify-self: end; gap: 5px; }
  .carousel-controls button { min-width: 34px; }
  .filters { flex-wrap: wrap; }
  .filters label:first-child { flex-basis: 90px; }
  .filters label:nth-child(2) { flex-basis: 115px; }
  .admin-layout { display: block; }
  .sidebar { position: static; min-height: 0; max-height: none; padding: 11px; gap: 10px; }
  .sidebar .brand { margin: 0; }
  .sidebar nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .sidebar button { padding: 8px 5px; gap: 4px; font-size: .84rem; }
  .sidebar-exit { padding: 0; margin: 0; font-size: .9rem; }
  .admin-main { padding: 16px 10px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .stat { padding: 8px; }
  .stat span { font-size: .79rem; }
  .tool-panel { padding: 12px; }
}
