:root{--ink:#25232a;--muted:#77717d;--line:#e9e4e8;--paper:#fbfaf8;--white:#fff;--accent:#c26986;--accent-dark:#a64e6c;--accent-soft:#f8eaf0;--sage:#eaf3ee;--shadow:0 18px 55px rgba(48,35,43,.10)}*{box-sizing:border-box}body{margin:0;font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);background:var(--paper)}button,input,textarea,select{font:inherit}.hidden{display:none!important}.eyebrow,.step-label{font-size:12px;font-weight:800;letter-spacing:.12em;color:var(--accent);text-transform:uppercase}.muted{color:var(--muted);line-height:1.7}.login-shell{min-height:100vh;display:grid;grid-template-columns:minmax(420px,1.2fr) minmax(380px,.8fr);background:radial-gradient(circle at 18% 18%,#f7e9ee 0,transparent 32%),#f8f4f1}.login-brand{display:flex;flex-direction:column;justify-content:center;padding:8vw;position:relative}.brand-mark,.mini-mark{display:grid;place-items:center;background:var(--ink);color:#fff;font-weight:900}.brand-mark{width:64px;height:64px;border-radius:21px;transform:rotate(-5deg);margin-bottom:42px}.login-brand h1{font-family:Georgia,"Songti SC",serif;font-size:clamp(42px,5vw,72px);line-height:1.18;margin:12px 0 28px;letter-spacing:-.04em}.brand-copy{max-width:610px;font-size:18px;line-height:1.8;color:#615b63}.feature-row{display:flex;gap:12px;margin-top:30px}.feature-row span{padding:9px 14px;border:1px solid rgba(37,35,42,.12);border-radius:999px;font-size:13px;background:rgba(255,255,255,.5)}.login-card{align-self:center;margin:7vw;max-width:480px;background:rgba(255,255,255,.9);border:1px solid rgba(255,255,255,.8);border-radius:28px;padding:44px;box-shadow:var(--shadow);backdrop-filter:blur(16px)}.cat-badge{font-size:36px;margin-bottom:28px}.login-card h2{font-size:30px;margin:8px 0 12px}.login-card label,.source-panel label{display:block;font-size:13px;font-weight:700;margin-top:20px}.login-card input,.source-panel input,.source-panel select{width:100%;margin-top:9px;padding:14px 15px;border:1px solid var(--line);border-radius:12px;background:#fff;outline:none}.login-card input:focus,.source-panel input:focus,.source-panel select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.primary-button,.secondary-button,.text-button,.mode-option{border:0;cursor:pointer}.primary-button{width:100%;padding:15px 20px;border-radius:13px;background:var(--accent);color:#fff;font-weight:800;box-shadow:0 8px 18px rgba(194,105,134,.22);transition:.2s}.primary-button:hover{background:var(--accent-dark);transform:translateY(-1px)}.primary-button:disabled{background:#cfc9cc;box-shadow:none;cursor:not-allowed;transform:none}.login-card .primary-button{margin-top:28px}.form-error{min-height:20px;color:#b64254;font-size:13px}.security-tip{text-align:center;color:#99919b;font-size:12px;margin:15px 0 0}.workspace{min-height:100vh}.topbar{height:68px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.88);backdrop-filter:blur(14px);position:sticky;top:0;z-index:20}.topbar-brand,.topbar-actions{display:flex;align-items:center;gap:12px}.mini-mark{width:34px;height:34px;border-radius:11px}.desktop-label{font-size:12px;color:var(--muted);padding-left:12px;border-left:1px solid var(--line)}.save-state{font-size:12px;color:#65746b;background:var(--sage);padding:7px 11px;border-radius:999px}.user-badge{font-size:13px}.text-button{background:transparent;color:var(--muted)}.work-grid{display:grid;grid-template-columns:420px 1fr;min-height:calc(100vh - 68px)}.source-panel{padding:38px 32px;border-right:1px solid var(--line);background:#fff;position:sticky;top:68px;height:calc(100vh - 68px);overflow:auto}.source-panel h2{margin:8px 0 6px;font-size:25px}.mode-switch{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:22px}.mode-option{text-align:left;padding:13px;background:#f7f5f4;border:1px solid transparent;border-radius:13px;font-weight:700}.mode-option small{display:block;color:var(--muted);font-weight:400;margin-top:4px}.mode-option.active{background:var(--accent-soft);border-color:#e7bdcb;color:var(--accent-dark)}.textarea-wrap{margin-top:20px;border:1px solid var(--line);border-radius:15px;overflow:hidden;background:#fff}.textarea-wrap:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}textarea{display:block;width:100%;height:260px;padding:16px;border:0;outline:0;resize:vertical;line-height:1.65}.textarea-footer{display:flex;justify-content:space-between;padding:10px 14px;background:#faf8f7;color:var(--muted);font-size:11px;border-top:1px solid var(--line)}.textarea-footer strong{color:var(--ink)}.generate-button{margin-top:18px;display:flex;justify-content:space-between}.secondary-button{padding:12px 16px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);font-weight:700}.source-panel>.secondary-button{width:100%;margin-top:10px}.result-panel{padding:42px;min-width:0}.empty-result{height:calc(100vh - 152px);display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:var(--muted)}.empty-result h2{color:var(--ink);margin:28px 0 4px}.empty-result p{max-width:480px;line-height:1.7}.empty-orbit{width:110px;height:110px;border:1px dashed #d8c4cb;border-radius:50%;display:grid;place-items:center;animation:spin 10s linear infinite}.empty-orbit span{display:grid;place-items:center;width:56px;height:56px;border-radius:20px;background:var(--accent-soft);color:var(--accent);font-size:24px;animation:spin 10s linear reverse infinite}@keyframes spin{to{transform:rotate(360deg)}}.result-toolbar{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.result-toolbar h2{font-family:Georgia,"Songti SC",serif;font-size:34px;margin:6px 0;outline:none}.result-toolbar h2:focus{background:#fff;border-radius:6px;box-shadow:0 0 0 5px #fff}.toolbar-buttons{display:flex;gap:10px}.compact{width:auto;padding:11px 16px;white-space:nowrap}.stream-status{display:grid;grid-template-columns:auto 1fr auto;gap:13px;align-items:center;margin:24px 0;padding:15px 18px;background:#fff;border:1px solid var(--line);border-radius:15px}.pulse-dot{width:10px;height:10px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 6px var(--accent-soft);animation:pulse 1.5s infinite}@keyframes pulse{50%{box-shadow:0 0 0 10px transparent}}.stream-status strong{font-size:13px}.stream-status b{font-size:12px}.progress-track{height:4px;background:#eee9eb;border-radius:3px;margin-top:7px;overflow:hidden}.progress-track div{width:0;height:100%;background:var(--accent);transition:width .4s}.days-container{display:flex;flex-direction:column;gap:18px}.day-card{background:#fff;border:1px solid var(--line);border-radius:20px;padding:22px;box-shadow:0 4px 20px rgba(50,40,45,.04)}.day-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.day-number{font-size:12px;font-weight:800;color:var(--accent);letter-spacing:.08em}.day-title{font-size:20px;font-weight:800;border:0;background:transparent;outline:0;width:75%;padding:6px}.delete-day,.delete-item{border:0;background:transparent;color:#a59da2;cursor:pointer}.item-card{display:grid;grid-template-columns:90px 42px 1fr auto;gap:12px;align-items:start;padding:15px 0;border-top:1px solid #f0ecee}.item-time,.item-title,.item-description,.item-location{border:0;background:transparent;outline:0;width:100%}.item-time{font-weight:800;padding:7px}.item-icon{font-size:23px;text-align:center;padding-top:4px}.item-title{font-weight:800;font-size:15px;padding:4px}.item-description,.item-location{color:var(--muted);font-size:12px;padding:3px 4px}.item-card input:focus{background:#faf6f7;border-radius:6px}.add-item{margin-top:14px;border:1px dashed #d9ced3;background:#fbf8f9;color:var(--accent-dark);padding:10px;border-radius:10px;width:100%;cursor:pointer}.toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,20px);opacity:0;background:var(--ink);color:#fff;padding:12px 18px;border-radius:11px;font-size:13px;pointer-events:none;transition:.25s;z-index:100}.toast.show{opacity:1;transform:translate(-50%,0)}@media(max-width:900px){.login-shell{grid-template-columns:1fr}.login-brand{display:none}.login-card{margin:10vh auto;width:calc(100% - 32px)}.work-grid{grid-template-columns:1fr}.source-panel{position:static;height:auto;border-right:0;border-bottom:1px solid var(--line)}.result-panel{padding:26px 18px}.topbar{padding:0 14px}.desktop-label,.save-state{display:none}.result-toolbar{flex-direction:column}.item-card{grid-template-columns:70px 34px 1fr}}

/* 保存按钮位于左侧解析按钮下方，新增天数位于日期卡片之间。 */
.source-save-button { margin-top:24px; }
.generate-button { position:relative; justify-content:center; }
.generate-button span { position:absolute; right:20px; }
.days-container { gap:0; }
.day-insert { height:58px; display:flex; align-items:center; gap:12px; padding:0 16px; }
.day-insert span { height:1px; flex:1; background:var(--line); }
.day-insert button { border:1px solid #e4ccd5; background:var(--paper); color:var(--accent-dark); border-radius:999px; padding:8px 15px; font-size:12px; font-weight:700; cursor:pointer; transition:.18s; }
.day-insert button:hover { background:var(--accent-soft); border-color:#dcaabd; transform:translateY(-1px); }
.empty-days { min-height:300px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:48px 24px; border:1px dashed #dccfd4; border-radius:20px; background:#fff; text-align:center; }
.empty-days-icon { width:52px; height:52px; display:grid; place-items:center; margin-bottom:16px; border-radius:16px; background:var(--accent-soft); color:var(--accent-dark); font-size:28px; }
.empty-days strong { font-size:18px; }
.empty-days p { margin:8px 0 22px; color:var(--muted); font-size:13px; }
.empty-days button { border:0; border-radius:12px; padding:12px 22px; background:var(--accent); color:#fff; font-weight:800; cursor:pointer; box-shadow:0 8px 18px rgba(194,105,134,.22); }
.empty-days button:hover { background:var(--accent-dark); transform:translateY(-1px); }
/* 所有品牌标识统一使用小程序原始 Logo 图片。 */
.brand-mark,
.mini-mark,
.cat-badge {
  display:block;
  object-fit:contain;
  background:none;
}

/* 每日卡片同时展示 DAY 编号、自然日期和星期。 */
.day-header { display:flex; justify-content:space-between; align-items:center; gap:18px; }
.day-heading { display:flex; align-items:center; gap:10px; min-width:170px; }
.day-number { white-space:nowrap; }
.day-date { color:var(--muted); font-size:13px; white-space:nowrap; }
.day-title { flex:1; width:auto; min-width:160px; }
.delete-day { white-space:nowrap; }

@media(max-width:1100px) {
  .day-header { align-items:flex-start; flex-wrap:wrap; gap:8px 14px; }
  .day-heading { min-width:auto; }
  .day-title { order:3; flex-basis:100%; }
}

@media print {
  .pdf-day-date { margin-top:1.5mm; color:#77717d; font-size:9.5pt; }
}
.brand-mark { overflow:hidden; }
.mini-mark { flex:0 0 34px; }
.cat-badge { width:52px; height:52px; border-radius:16px; margin-bottom:28px; }

.download-pdf-button { align-self:flex-start; min-width:110px; color:var(--accent-dark); background:#fff; }
.download-pdf-button:disabled { color:#aaa3a7; background:#f1eeee; cursor:not-allowed; }
.pdf-document { display:none; }

@media print {
  @page { size:A4; margin:14mm 13mm 16mm; }
  * { -webkit-print-color-adjust:exact !important; print-color-adjust:exact !important; }
  body { background:#fff; color:#25232a; }
  #loginView, #workspaceView, #toast { display:none !important; }
  .pdf-document { display:block !important; font-family:"Microsoft YaHei","PingFang SC","Noto Sans CJK SC",sans-serif; }
  .pdf-header { padding:1mm 2mm 8mm; border-bottom:1px solid #e7dfe2; }
  .pdf-brand-row { display:flex; align-items:center; justify-content:space-between; gap:10mm; min-height:23mm; padding-bottom:5mm; border-bottom:1px solid #eee9eb; }
  .pdf-brand-lockup { display:flex; align-items:center; gap:3.5mm; min-width:0; }
  .pdf-logo { width:14mm; height:14mm; flex:0 0 14mm; object-fit:cover; border-radius:3.5mm; }
  .pdf-brand-lockup strong { display:block; color:#25232a; font-size:13pt; line-height:1.2; }
  .pdf-brand-lockup small { display:block; margin-top:1.5mm; color:#8d858d; font-size:7.5pt; letter-spacing:.02em; }
  .pdf-qr-lockup { display:flex; align-items:center; justify-content:flex-end; gap:3mm; flex:0 0 auto; text-align:right; }
  .pdf-qr-lockup strong { display:block; color:#a64e6c; font-size:9pt; line-height:1.3; }
  .pdf-qr-lockup small { display:block; margin-top:1mm; color:#8d858d; font-size:7pt; white-space:nowrap; }
  .pdf-qr { width:22mm; height:22mm; flex:0 0 22mm; object-fit:cover; }
  .pdf-header h1 { margin:6mm 0 2.5mm; font-size:25pt; line-height:1.25; }
  .pdf-meta { display:flex; gap:8px; color:#77717d; font-size:10pt; }
  .pdf-meta span { color:#c3b8bd; }
  .pdf-day { padding:8mm 2mm 3mm; }
  .pdf-day + .pdf-day { break-before:page; page-break-before:always; }
  .pdf-day-header { display:grid; grid-template-columns:24mm 1fr; gap:4mm; align-items:start; padding-bottom:4mm; border-bottom:2px solid #c26986; }
  .pdf-day-number { color:#c26986; font-size:10pt; font-weight:800; letter-spacing:.08em; }
  .pdf-day-header h2 { margin:0; font-size:17pt; line-height:1.3; }
  .pdf-day-header p { margin:2mm 0 0; color:#77717d; font-size:9.5pt; line-height:1.6; }
  .pdf-item { display:grid; grid-template-columns:24mm 9mm 1fr; gap:4mm; padding:5mm 0; border-bottom:1px solid #eee9eb; break-inside:avoid; page-break-inside:avoid; }
  .pdf-item-time { padding-top:1mm; font-size:10.5pt; font-weight:800; }
  .pdf-item-icon { font-size:16pt; line-height:1; }
  .pdf-item-content h3 { margin:0 0 1.5mm; font-size:11.5pt; }
  .pdf-item-content p { margin:0; color:#5f5961; font-size:9.5pt; line-height:1.6; white-space:pre-wrap; }
  .pdf-item-meta { display:flex; flex-wrap:wrap; gap:3mm 6mm; margin-top:2mm; color:#77717d; font-size:8.5pt; }
  .pdf-item-tips { margin-top:2mm; padding:2.5mm 3mm; border-radius:2mm; background:#faf2f5; color:#7d4054; font-size:8.5pt; line-height:1.5; }
  .pdf-empty-day { padding:12mm 0; color:#99919b; text-align:center; font-size:10pt; }
  .pdf-footer { margin-top:7mm; padding-top:3mm; border-top:1px solid #eee9eb; color:#aaa3a7; font-size:8pt; text-align:center; }
}
