:root { --ink:#172036; --muted:#73809a; --line:#e8ecf3; --panel:#fff; --bg:#f4f7fb; --accent:#365cf5; }
* { box-sizing:border-box; }
body { margin:0; min-width:320px; color:var(--ink); background:radial-gradient(circle at 8% 3%,#e9efff 0,transparent 29%),var(--bg); font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif; }
button,input { font:inherit; }
button { cursor:pointer; }
.app-shell { width:min(1170px,calc(100% - 32px)); margin:clamp(22px,6vw,72px) auto; display:grid; grid-template-columns:minmax(0,1fr) 285px; gap:22px; align-items:start; }
.calendar-card,.legend-card { background:rgba(255,255,255,.92); border:1px solid rgba(222,228,239,.9); border-radius:22px; box-shadow:0 18px 50px rgba(35,53,94,.08); }
.calendar-card { padding:28px; }
.toolbar,.legend-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.eyebrow { margin:0 0 4px; color:#8b97ae; font-size:12px; font-weight:700; letter-spacing:.08em; }
h1,h2 { margin:0; letter-spacing:-.04em; } h1 { font-size:27px; } h2 { font-size:18px; }
.month-control { display:flex; align-items:center; gap:8px; }
.icon-button { position:relative; width:34px; height:34px; border:1px solid var(--line); border-radius:10px; background:white; color:#50607c; font-size:25px; line-height:1; }
.icon-button:hover { color:var(--accent); border-color:#cdd7ff; }
.icon-button[data-tooltip]::after { position:absolute; z-index:10; bottom:-33px; left:50%; width:max-content; padding:6px 8px; transform:translate(-50%,-3px); border-radius:6px; color:#fff; background:#25314a; box-shadow:0 5px 13px rgba(27,39,67,.16); content:attr(data-tooltip); font-size:11px; font-weight:650; line-height:1; opacity:0; pointer-events:none; transition:opacity .1s ease,transform .1s ease; }.icon-button[data-tooltip]:hover::after,.icon-button[data-tooltip]:focus-visible::after { transform:translate(-50%,0); opacity:1; }
.month-picker input { width:126px; height:34px; padding:0 8px; color:#26344d; border:1px solid var(--line); border-radius:10px; background:#fff; font-weight:650; }
.weekdays,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.weekdays { margin-top:26px; border-bottom:1px solid var(--line); }
.weekdays span { padding:0 0 12px; color:#8894aa; font-size:12px; font-weight:700; text-align:center; }
.calendar-grid { border-left:1px solid var(--line); }
.day-cell { position:relative; min-height:var(--day-height,112px); padding:10px 8px 7px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); background:#fff; transition:background .15s,box-shadow .15s; }
.day-cell.is-outside { background:#fafbfc; } .day-cell.is-outside .day-number { color:#b5bdca; }
.day-cell.is-today { background:linear-gradient(145deg,#f4f7ff,#fff); }
.day-cell.drag-target { background:#edf1ff; box-shadow:inset 0 0 0 2px #a5b5ff; }
.day-number { display:flex; width:24px; height:24px; align-items:center; justify-content:center; color:#34415a; border-radius:50%; font-size:13px; font-weight:700; }
.is-today .day-number { color:#fff; background:var(--accent); }
.chips { display:flex; flex-direction:column; gap:4px; margin-top:7px; }
.more-tags { margin-top:1px; padding-left:3px; color:#7b889f; font-size:10px; font-weight:700; }
.day-cell.has-overflow .tag-chip.is-collapsed { display:none; }
.day-cell.has-overflow:hover { z-index:2; box-shadow:0 8px 20px rgba(48,65,104,.14),inset 0 0 0 1px #dce4ff; }
.day-cell.has-overflow:hover .tag-chip.is-collapsed { display:flex; }
.day-cell.has-overflow:hover .more-tags { display:none; }
.tag-chip { display:flex; min-width:0; height:22px; align-items:center; overflow:hidden; color:#26344d; border-radius:6px; background:var(--chip-bg); font-size:11px; font-weight:700; user-select:none; touch-action:none; }
.chip-name { min-width:0; flex:1; overflow:hidden; padding:0 5px; text-overflow:ellipsis; white-space:nowrap; }.chip-remove { display:grid; width:18px; height:18px; flex:none; place-items:center; margin-right:2px; padding:0; border:0; border-radius:5px; color:#607088; background:rgba(255,255,255,.68); font-size:14px; line-height:1; opacity:0; transition:opacity .14s; }.tag-chip:hover .chip-remove { opacity:1; }.chip-remove:hover { color:#d24c5f; background:#fff; }
.tag-drag-ghost { position:fixed; z-index:20; display:flex; align-items:center; gap:6px; max-width:150px; height:30px; padding:0 9px; border:1px solid rgba(255,255,255,.8); border-radius:8px; color:#31405a; background:var(--chip-bg); box-shadow:0 10px 25px rgba(38,51,87,.2); font-size:12px; font-weight:750; pointer-events:none; transform:translate(12px,12px); }.tag-drag-ghost::before { width:8px; height:8px; flex:none; content:""; border-radius:50%; background:var(--tag-color); }.tag-drag-ghost span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.tag-drag-plus { display:grid; width:16px; height:16px; flex:none; place-items:center; border-radius:50%; color:#fff; background:var(--accent); font-size:14px; line-height:1; }
.legend-card { padding:22px; position:sticky; top:20px; }
.tag-count { display:grid; width:27px; height:27px; place-items:center; border-radius:50%; color:#516178; background:#edf1f7; font-size:12px; font-weight:800; }
.legend-list { display:flex; flex-direction:column; gap:8px; margin-top:20px; }
.manage-tags { width:100%; margin-top:16px; padding:9px; border:1px solid #dfe5ef; border-radius:9px; color:#56657d; background:#fff; font-size:12px; font-weight:750; }.manage-tags:hover { color:var(--accent); border-color:#bdcaff; background:#f7f8ff; }
.legend-item { display:flex; align-items:flex-start; gap:9px; padding:9px 8px; border-radius:9px; color:#415069; background:#fafbfe; font-size:13px; font-weight:650; }.legend-content { min-width:0; flex:1; }.legend-name-row { display:flex; align-items:center; gap:7px; }.legend-name { min-width:0; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.legend-add-trigger { display:grid; width:20px; height:20px; flex:none; place-items:center; padding:0; border:0; border-radius:6px; color:var(--accent); background:#e9edff; font-size:16px; line-height:1; }.legend-add-trigger[hidden] { display:none; }.legend-add-trigger:hover { color:#fff; background:var(--accent); }.legend-dates { display:block; margin-top:3px; color:#8390a5; font-size:11px; font-weight:600; line-height:1.45; }.legend-add { display:flex; gap:5px; margin-top:7px; }.legend-add[hidden] { display:none; }.legend-add input { width:100%; min-width:0; height:25px; padding:0 6px; border:1px solid #dfe5ef; border-radius:6px; color:#526079; font-size:10px; outline:none; }.legend-add input:focus { border-color:#9eafff; }.legend-add button { height:25px; flex:none; padding:0 8px; border:0; border-radius:6px; color:#fff; background:var(--accent); font-size:10px; font-weight:700; }
.legend-dot { width:10px; height:10px; flex:none; border-radius:50%; background:var(--tag-color); box-shadow:0 0 0 4px var(--tag-bg); }
.legend-empty { padding:18px 0; color:#8994a9; font-size:13px; line-height:1.6; }
.tips { display:flex; gap:8px; margin-top:24px; padding:12px; border-radius:12px; color:#66758f; background:#f3f6fa; font-size:12px; line-height:1.55; }
.tips p { margin:0; }.tip-icon { color:var(--accent); font-size:17px; font-weight:800; }
.editor-backdrop { position:fixed; z-index:5; inset:0; background:rgba(15,25,50,.2); backdrop-filter:blur(2px); }
.tag-editor { position:fixed; z-index:6; top:50%; left:50%; width:min(410px,calc(100% - 32px)); padding:26px; transform:translate(-50%,-50%); border:1px solid #e5eaf4; border-radius:20px; background:white; box-shadow:0 25px 70px rgba(26,39,73,.2); }
.editor-close { position:absolute; top:13px; right:14px; width:30px; height:30px; border:0; border-radius:50%; color:#748199; background:#f3f5f8; font-size:21px; line-height:1; }
.assigned-tags,.existing-tags { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0 20px; }
.assigned-tag,.existing-tag { display:inline-flex; align-items:center; gap:6px; padding:7px 9px; border:1px solid transparent; border-radius:8px; background:var(--chip-bg); color:#3d4b62; font-size:12px; font-weight:700; }
.assigned-tag button { display:grid; width:16px; height:16px; place-items:center; padding:0; border:0; border-radius:50%; color:#758196; background:rgba(255,255,255,.75); }
.existing-tag { border-color:#e8edf5; background:#fff; }.existing-tag:hover { border-color:var(--tag-color); background:var(--tag-bg); }
.tag-swatch { width:8px; height:8px; border-radius:50%; background:var(--tag-color); }
.field-label { margin:0; color:#6f7d94; font-size:12px; font-weight:750; }
.new-tag-row { display:flex; gap:8px; margin-top:8px; }.new-tag-row input { min-width:0; flex:1; height:38px; padding:0 11px; border:1px solid #dce3ef; border-radius:9px; outline:none; }.new-tag-row input:focus { border-color:#8ca1ff; box-shadow:0 0 0 3px #e8ecff; }
.new-tag-row button { padding:0 15px; border:0; border-radius:9px; color:#fff; background:var(--accent); font-weight:700; }.editor-note { margin:15px 0 0; color:#94a0b2; font-size:11px; line-height:1.5; }
.manager-list { display:flex; flex-direction:column; gap:9px; margin-top:18px; max-height:55vh; overflow:auto; }.manager-row { display:flex; align-items:center; gap:8px; padding:7px; border:1px solid #e5eaf2; border-radius:10px; }.manager-row input { min-width:0; flex:1; height:31px; padding:0 7px; border:1px solid transparent; border-radius:6px; color:#334158; font-size:13px; font-weight:650; outline:none; }.manager-row input:focus { border-color:#afbcff; background:#f6f8ff; }.manager-action { height:30px; padding:0 8px; border:0; border-radius:6px; color:#56657d; background:#f1f4f8; font-size:11px; font-weight:700; }.manager-action.delete { color:#d34b5d; background:#fff0f2; }.manager-empty { color:#8994a9; font-size:13px; }
.settings-button { margin-top:8px; }.setting-row,.setting-select { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-top:22px; padding:14px 0; border-top:1px solid #edf0f5; color:#44526a; }.setting-row strong,.setting-select strong { display:block; font-size:13px; }.setting-row small,.setting-select small { display:block; max-width:230px; margin-top:4px; color:#8b97aa; font-size:11px; line-height:1.45; }.setting-row input { width:18px; height:18px; accent-color:var(--accent); }.setting-select input[type="number"] { width:68px; height:34px; padding:0 7px; border:1px solid #dce3ef; border-radius:8px; color:#4b5b74; background:white; font-size:13px; }
.toast { position:fixed; z-index:9; bottom:24px; left:50%; padding:10px 15px; transform:translate(-50%,20px); border-radius:10px; color:#fff; background:#27334c; box-shadow:0 10px 25px rgba(18,28,50,.2); font-size:13px; opacity:0; pointer-events:none; transition:.2s; }.toast.show { transform:translate(-50%,0); opacity:1; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media (max-width:850px) { .app-shell { grid-template-columns:1fr; }.legend-card { position:static; }.legend-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:570px) { .app-shell { width:100%; margin:0; gap:12px; }.calendar-card,.legend-card { border-radius:0; border-right:0; border-left:0; }.calendar-card { padding:18px 10px; }.toolbar { align-items:flex-start; }.toolbar h1 { font-size:23px; }.month-control { gap:3px; }.month-picker input { width:118px; }.day-cell { min-height:calc(var(--day-height,112px) - 18px); padding:7px 3px; }.chips { gap:3px; margin-top:4px; }.tag-chip { height:18px; font-size:9px; }.chip-name { padding:0 2px; }.more-tags { font-size:8px; }.weekdays { margin-top:18px; }.legend-list { grid-template-columns:1fr 1fr; } }
