
:root {
    color-scheme: light;
    --background:#f2f6fd;
    --surface:#fff;
    --ink:#172f49;
    --muted:#516981;
    --line:#dbe7f3;
    --primary:#235f9f;
    --strong:#174d85;
    --pale:#e8f2ff;
    --aqua:#e3f6f3;
    --good:#17645a;
    --warn:#98601e;
    --red:#9e394e;
    --shadow:0 12px 32px #244f7a0d;
    font-family:"Microsoft YaHei UI","PingFang SC","Hiragino Maru Gothic ProN","Noto Sans CJK SC",system-ui,sans-serif;
    font-size:16px;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--background); color:var(--ink); min-width:280px; }
body.classic { --primary:#405a70; --strong:#263b4d; --pale:#eef4f8; --aqua:#eaf4f0; --background:#f5f7fa; }
a { color:var(--primary); text-decoration:none; }
a:hover { text-decoration:underline; }
button,input,select,textarea { font:inherit; }
button { cursor:pointer; }
button:disabled { cursor:default; }
h1,h2,h3,p { margin:0; }
h1 { font-size:clamp(1.55rem,3vw,2rem); font-weight:800; letter-spacing:.025em; }
h2 { font-size:1.13rem; font-weight:800; }
h3 { font-size:1rem; font-weight:750; }
:focus-visible { outline:3px solid #2d78c6; outline-offset:3px; }
.top { position:sticky; z-index:10; top:0; min-height:68px; padding:12px clamp(16px,3vw,38px); display:flex; align-items:center; gap:14px; background:#fafdfff5; border-bottom:1px solid var(--line); }
.brand { color:var(--ink); display:inline-flex; align-items:center; gap:10px; font-weight:800; font-size:clamp(1rem,2.4vw,1.21rem); line-height:1.35; }
.brand:hover { text-decoration:none; }
.brand-mark { display:grid; place-items:center; width:38px; height:38px; flex:0 0 38px; background:#e1f4f1; border-radius:15px; }
.annual { margin-left:auto; flex:none; background:#e3f0ff; color:var(--strong); border:1px solid #cde4fa; padding:6px 11px; border-radius:999px; font-size:.875rem; font-weight:750; }
.shell { display:grid; grid-template-columns:222px minmax(0,1fr); min-height:calc(100vh - 68px); }
.shell.only { display:block; }
.sidebar { background:#fafdff; border-right:1px solid var(--line); padding:24px 14px; position:sticky; top:68px; height:calc(100dvh - 68px); display:flex; flex-direction:column; justify-content:space-between; }
nav { display:grid; gap:7px; }
.nav-link { width:100%; display:flex; align-items:center; gap:10px; text-align:left; border:1px solid transparent; padding:11px 13px; color:var(--muted); background:transparent; border-radius:13px; font-weight:700; }
.nav-link:hover { background:#eef5fc; }
.nav-link[aria-current="page"] { color:var(--strong); background:var(--pale); border-color:#d2e5fa; }
.nav-icon { width:23px; text-align:center; }
#sidebar-bottom { display:grid; gap:13px; border-top:1px solid var(--line); padding:16px 10px 0; overflow-wrap:anywhere; }
main { width:min(100%,1400px); min-width:0; padding:clamp(18px,3.5vw,44px); margin:0 auto; }
.menu { display:none !important; }
.icon-button { display:inline-grid; place-items:center; min-width:38px; min-height:38px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--strong); font-weight:800; }
.page-head { display:flex; justify-content:space-between; gap:14px; align-items:center; margin-bottom:20px; flex-wrap:wrap; }
.page-head p { margin-top:7px; }
.panel { background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:20px; box-shadow:var(--shadow); }
.panel + .panel,.stack > * + * { margin-top:16px; }
.small { font-size:.875rem; }
.muted { color:var(--muted); }
.error { color:var(--red); font-size:.91rem; }
.good { color:var(--good); }
.empty,.loading { color:var(--muted); text-align:center; padding:32px 16px; }
.row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.split { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:42px; padding:8px 15px; border:1px solid transparent; border-radius:11px; color:white; background:var(--primary); font-weight:750; text-align:center; }
.btn:hover { background:var(--strong); text-decoration:none; }
.btn.secondary { color:var(--strong); background:#f0f6fd; border-color:#d4e4f5; }
.btn.secondary:hover { background:#e4effb; }
.btn.plain { color:var(--strong); background:white; border-color:var(--line); }
.btn.danger { color:var(--red); background:#fff1f3; border-color:#f4d7df; }
.btn:disabled { background:#e6edf4; color:#647990; border-color:#e1e9f1; }
.btn.compact { min-height:36px; padding:5px 11px; font-size:.875rem; }
input,select,textarea { width:100%; min-width:0; min-height:43px; color:var(--ink); border:1px solid #cbdbea; background:#fbfdff; border-radius:10px; padding:9px 11px; }
input::placeholder,textarea::placeholder { color:#657a90; }
textarea { resize:vertical; }
label.field { display:grid; gap:6px; font-weight:650; font-size:.9rem; }
label.check { display:flex; align-items:center; gap:8px; font-size:.875rem; }
input[type=checkbox] { width:18px; min-height:18px; accent-color:var(--primary); }
.actions { display:flex; gap:9px; flex-wrap:wrap; align-items:center; }
.password { display:flex; gap:7px; }
.password input { flex:1; }
.form-grid { display:grid; gap:14px; }
.two { grid-template-columns:repeat(2,minmax(0,1fr)); }
.full-row { grid-column:1/-1; }
select { appearance:none; padding-right:28px; background-image:linear-gradient(45deg,transparent 50%,#3d648a 50%),linear-gradient(135deg,#3d648a 50%,transparent 50%); background-size:5px 5px; background-position:calc(100% - 16px) 52%,calc(100% - 11px) 52%; background-repeat:no-repeat; }
.auth { max-width:950px; margin:clamp(12px,4vh,52px) auto; min-height:510px; display:grid; grid-template-columns:1.05fr 1fr; border-radius:24px; overflow:hidden; border:1px solid #cbdff5; box-shadow:0 24px 65px #1c47701a; background:#fff; }
.auth-art { min-height:450px; overflow:hidden; position:relative; background:radial-gradient(ellipse at 32% 26%,#f8fcff 2%,#dfedfa 50%,#b9d5ee 100%); }
.auth-art::before { position:absolute; z-index:1; inset:24px; border:1px solid #ffffffb0; border-radius:18px; content:""; pointer-events:none; }
.auth-art img { width:100%; height:100%; position:absolute; object-fit:cover; object-position:center 3%; mix-blend-mode:multiply; }
.auth-form { padding:clamp(25px,5vw,54px); display:flex; flex-direction:column; justify-content:center; gap:20px; }
.auth.simple { max-width:490px; display:block; min-height:auto; }
.mode-tabs { display:flex; gap:5px; padding:4px; border-radius:12px; background:#edf4fc; }
.mode-tabs button { flex:1; border:0; border-radius:9px; min-height:38px; background:transparent; color:var(--muted); font-weight:760; }
.mode-tabs button.active { background:white; color:var(--strong); box-shadow:0 2px 8px #2f5d8820; }
.link-btn { background:transparent; border:0; padding:0; color:var(--strong); font-size:.875rem; font-weight:650; text-align:left; }
.project-banner { display:grid; grid-template-columns:minmax(0,1fr) minmax(190px,305px); gap:18px; align-items:center; background:linear-gradient(110deg,#e6f2ff 0%,#fff 70%); }
.project-banner h1 { overflow-wrap:anywhere; }
.banner-meta { display:flex; gap:6px 10px; flex-wrap:wrap; overflow-wrap:anywhere; }
.pill { display:inline-flex; align-items:center; font-weight:680; padding:4px 8px; border-radius:999px; font-size:.875rem; color:var(--strong); background:#e3effc; white-space:nowrap; }
.pill.APPROVED { background:#e2f5ec; color:#216448; }
.pill.PENDING { background:#fff3dc; color:#84521a; }
.pill.IGNORED,.pill.VOIDED { background:#ebedf1; color:#566474; }
.score-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.score-card { min-width:0; border:1px solid var(--line); border-radius:15px; padding:16px; background:#fafcff; }
.score-card:nth-child(2) { background:#eaf4ff; border-color:#cfe4f9; }
.score-card:nth-child(3) { background:#eef8f8; border-color:#d2ebea; }
.score-number { display:block; font-size:clamp(1.27rem,3.5vw,2.35rem); letter-spacing:-.025em; font-weight:850; line-height:1.3; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.progress { height:8px; border:0; width:100%; border-radius:99px; overflow:hidden; background:#eaf1fa; }
.progress::-webkit-progress-bar { background:#eaf1fa; }
.progress::-webkit-progress-value { background:#397dc0; border-radius:99px; }
.progress::-moz-progress-bar { background:#397dc0; border-radius:99px; }
.score-locked { display:grid; gap:8px; }
.gift-section { margin-top:24px; }
.gift-section > h2 { margin-bottom:10px; }
.gift-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(216px,1fr)); gap:13px; }
.gift-card { display:grid; align-content:start; gap:11px; padding:14px; border:1px solid var(--line); background:#fff; border-radius:16px; box-shadow:var(--shadow); }
.gift-art { display:grid; place-items:center; height:100px; background:radial-gradient(ellipse at 50% 30%,#f3f9ff,#e2eefb); border-radius:12px; color:#315f8a; font-size:2.3rem; }
.gift-art img { width:78px; height:78px; object-fit:contain; }
.gift-art .gift-tile { position:relative; display:block; width:82px; height:82px; overflow:hidden; mix-blend-mode:multiply; }
.gift-art .gift-sprite { position:absolute; max-width:none; height:auto; }
.gift-art .gift-thumbnail { display:block; width:100%; height:100%; }
.gift-search { width:min(100%,360px); }
.more-gifts { margin-top:10px; }
.gift-card label { font-size:.875rem; }
.gift-card .inline-form { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:8px; align-items:end; }
.gift-card input { height:42px; }
.gift-add,.gift-undo { font-size:1.3rem; min-width:45px; }
.gift-price { color:var(--strong); font-weight:800; font-variant-numeric:tabular-nums; }
.admin-card h2,.section-title { margin-bottom:13px; }
.table-wrap { overflow:auto; border:1px solid var(--line); border-radius:12px; }
table { width:100%; border-collapse:collapse; text-align:left; font-size:.91rem; white-space:nowrap; }
th,td { padding:10px 12px; vertical-align:middle; border-bottom:1px solid #e6edf5; }
th { background:#eef5fc; color:var(--strong); font-weight:750; }
tr:last-child td { border-bottom:0; }
td.nickname { min-width:190px; }
td.review-project { max-width:180px; white-space:normal; overflow-wrap:anywhere; }
.review-search { align-items:flex-end; }
.review-search .field { flex:1 1 185px; max-width:340px; }
td.remarks { white-space:normal; min-width:180px; overflow-wrap:anywhere; }
.date-picker .row > * { flex:1 1 68px; }
.date-picker { display:grid; gap:8px; }
.pagination { display:flex; align-items:center; justify-content:flex-end; gap:9px; margin-top:12px; }
dialog { width:min(calc(100% - 28px),510px); padding:22px; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:18px; box-shadow:0 24px 80px #123b6660; }
dialog::backdrop { background:#15355477; }
.dialog-content { margin-top:15px; }
.celebration { text-align:center; display:grid; gap:12px; justify-items:center; }
.celebration img { width:180px; height:205px; object-fit:cover; object-position:center 22%; border-radius:22px; }
.toast { position:fixed; z-index:30; bottom:22px; left:50%; transform:translateX(-50%); max-width:calc(100% - 30px); padding:12px 17px; border-radius:12px; background:#184b79; color:white; box-shadow:0 8px 24px #1a4d7a44; font-weight:700; }
@media(max-width:850px) {
    .shell { grid-template-columns:172px minmax(0,1fr); }
    .gift-grid { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); }
}
@media(max-width:650px) {
    .top { min-height:60px; gap:7px; padding:8px 10px; }
    .brand-mark { display:none; }
    .annual { font-size:.73rem; padding:4px 6px; }
    .shell { display:block; min-height:calc(100vh - 60px); }
    .menu { display:inline-grid !important; }
    .shell.only .sidebar { display:none; }
    .sidebar { display:none; }
    .sidebar.open { position:fixed; display:flex; top:60px; bottom:0; left:0; width:min(82vw,245px); z-index:9; height:auto; box-shadow:12px 0 36px #123b6644; }
    main { padding:15px 12px 28px; }
    .auth { margin:0 auto; grid-template-columns:1fr; }
    .auth-art { min-height:170px; max-height:210px; }
    .auth-art img { object-position:center 1%; }
    .auth-form { padding:22px 16px; }
    .project-banner,.two { grid-template-columns:1fr; }
    .score-grid { gap:6px; }
    .score-card { padding:9px 7px; }
    .score-card .small { font-size:.78rem; }
    .score-number { font-size:clamp(1.02rem,5vw,1.46rem); }
    .gift-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
    .gift-card { padding:10px; gap:8px; }
    .gift-art { height:74px; }
    .gift-art img { width:58px; height:58px; }
    .gift-art .gift-tile { transform:scale(.82); }
    .gift-add,.gift-undo { min-width:34px; padding:7px; }
    .panel { padding:13px 12px; }
}
@media(max-width:340px) {
    .gift-grid { grid-template-columns:1fr; }
}
