.cp-app{display:grid;grid-template-columns:300px 1fr;gap:0 24px;align-items:start}
.cp-main{grid-column:2;display:grid;gap:14px;align-content:start}
.cp-ctl{grid-column:1}
.cp-bar{display:flex;align-items:center;gap:10px;min-height:48px}
.cp-bar-hint{margin:0;flex:1;font-size:13px;color:var(--muted)}
.cp-ctl{background:var(--paper);border:1px solid var(--line);border-radius:var(--r);padding:16px;display:grid;gap:16px;box-shadow:var(--sh1)}
.cp-f{display:grid;gap:6px}
.cp-l{font-size:12px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.cp-ctl select,.cp-ctl input[type=text],.cp-ctl input[type=date]{font:inherit;font-size:16px;min-height:44px;border:1px solid var(--line);border-radius:8px;padding:0 12px;background:#fff;color:var(--ink);width:100%}
.cp-seg{display:flex;background:#F1E7D3;border-radius:10px;padding:3px;gap:3px}
.cp-seg button{flex:1;min-height:40px;border:0;border-radius:8px;background:transparent;font:inherit;font-size:14px;color:var(--ink);cursor:pointer}
.cp-seg button[aria-pressed=true]{background:var(--paper);box-shadow:var(--sh1);font-weight:600}
.cp-sw{display:flex;gap:10px;align-items:center}
.cp-acbox{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.cp-acname{margin:0;font:600 13px/1.2 Inter,sans-serif;color:var(--ink)}
.cp-sw button{width:36px;height:36px;border-radius:50%;border:2px solid var(--paper);cursor:pointer;box-shadow:0 0 0 1px var(--line);transition:transform .12s}
.cp-sw button[aria-pressed=true]{box-shadow:0 0 0 2px var(--ink);transform:scale(1.08)}
.cp-chk{display:flex;align-items:center;gap:8px;font-size:14px;min-height:44px}
.cp-chk input{width:20px;height:20px}
.cp-go{min-height:48px;flex:0 0 auto;min-width:230px;padding:0 22px;border:0;border-radius:10px;background:var(--ac-3,#8F3F1E);color:#fff;font:600 16px Inter,sans-serif;cursor:pointer;transition:filter .12s}
.cp-go:hover{filter:brightness(1.18)}
.cp-ghost{min-height:44px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink);font:600 14px Inter,sans-serif;cursor:pointer}
.cp-hint{font-size:13px;color:var(--muted);margin:0}
.cp-view{display:flex;justify-content:center}
.cp-sheet{container-type:inline-size;display:grid;grid-template-rows:minmax(0,1fr);width:100%;max-width:820px;background:var(--paper);border:1px solid var(--line);border-radius:6px;box-shadow:var(--sh2);overflow:hidden}
.cp-sheet[data-p=letter][data-o=portrait]{aspect-ratio:8.5/11}
.cp-sheet[data-p=letter][data-o=landscape]{aspect-ratio:11/8.5}
.cp-sheet[data-p=a4][data-o=portrait]{aspect-ratio:210/297}
.cp-sheet[data-p=a4][data-o=landscape]{aspect-ratio:297/210}
.cp-in{padding:4.5cqw;display:flex;flex-direction:column;min-height:0;color:var(--ink)}
.cp-hd{display:flex;justify-content:space-between;align-items:baseline;gap:2cqw;border-bottom:.7cqw solid var(--ac);padding-bottom:1cqw}
.cp-hd h2{font:700 5.4cqw/1.1 Fraunces,Georgia,serif;margin:0;color:var(--ink)}
.cp-hd span{font:600 2.6cqw/1 Inter,sans-serif;color:var(--ac-3);white-space:nowrap}
.cp-sub{margin:1cqw 0 0;font-size:2.4cqw;color:var(--muted)}
.cp-dows{display:grid;grid-template-columns:repeat(7,1fr);gap:.8cqw;background:var(--ac-2);border-radius:1cqw;padding:1.1cqw .4cqw;margin:2cqw 0 1cqw}
.cp-dows div{text-align:center;font:600 1.7cqw Inter,sans-serif;letter-spacing:.08em;text-transform:uppercase;color:var(--ac-3)}
.cp-days{flex:1;min-height:0;display:grid;grid-template-columns:repeat(7,1fr);gap:.8cqw}
.cp-c{border:.2cqw solid #BCA781;border-radius:.8cqw;padding:.6cqw .9cqw;background:#fff;min-height:0;overflow:hidden}
.cp-c b{font:600 2cqw Inter,sans-serif}
.cp-c i{display:block;font:600 1.4cqw/1.2 Inter,sans-serif;color:var(--ac-3);margin-top:.3cqw}
.cp-e{background:transparent;border-color:transparent}
.cp-we{background:var(--ac-2)}
.cp-h{box-shadow:inset 0 0 0 .22cqw var(--ac);border-color:var(--ac)}
.cp-h b{color:var(--ac-3)}
.cp-mark{margin:1.4cqw 0 0;text-align:right;font:400 1.3cqw Inter,sans-serif;color:var(--ac)}
.cp-wk{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:minmax(0,1fr);gap:1.2cqw;margin-top:2cqw}
.cp-sheet[data-o=landscape] .cp-wk{grid-template-columns:repeat(4,1fr)}
.cp-box{border:.2cqw solid #BCA781;border-radius:1cqw;padding:1cqw 1.4cqw;background:#fff;display:flex;flex-direction:column;min-height:0;overflow:hidden}
.cp-box b{font:600 2.2cqw Inter,sans-serif;color:var(--ac-3)}
.cp-ln{flex:1;min-height:0;background:repeating-linear-gradient(to bottom,transparent 0,transparent 3.2cqw,#DCCDB2 3.2cqw,#DCCDB2 3.4cqw)}
.cp-dy{flex:1;min-height:0;display:grid;grid-template-columns:1.25fr 1fr;gap:2.4cqw;margin-top:2cqw}
.cp-sched{display:grid;grid-auto-rows:minmax(0,1fr);border-top:.2cqw solid #BCA781;min-height:0}
.cp-hr{display:flex;align-items:flex-end;border-bottom:.2cqw solid #BCA781;font:400 1.7cqw Inter,sans-serif;color:var(--muted);min-height:0}
.cp-hr span{width:7cqw;padding-bottom:.4cqw}
.cp-side{display:flex;flex-direction:column;gap:1.6cqw;min-height:0}
.cp-side .cp-box{flex:1}
.cp-side .cp-box:nth-child(1){flex:.8}
.cp-side .cp-box:nth-child(2){flex:1.7}
.cp-td{display:flex;align-items:center;gap:1cqw;border-bottom:.2cqw solid #DCCDB2;flex:1;min-height:0;font:400 1.8cqw Inter,sans-serif;color:var(--muted)}
.cp-td u{width:1.8cqw;height:1.8cqw;border:.25cqw solid var(--ac);border-radius:.4cqw;flex:none}
.cp-meta{display:flex;gap:2cqw;margin:2cqw 0 1.4cqw;font:400 1.9cqw Inter,sans-serif;color:var(--muted)}
.cp-meta span{flex:1;border-bottom:.2cqw solid var(--ac-2);padding-bottom:.3cqw}
.cp-hb{display:grid;gap:1.4cqw;align-content:start;margin-top:1cqw}
.cp-notes{flex:1;min-height:0;margin-top:1.8cqw}
.cp-dot{aspect-ratio:1;border:.3cqw solid var(--ac);border-radius:50%;display:flex;align-items:center;justify-content:center;font:600 1.9cqw Inter,sans-serif;color:var(--ac-3);background:#fff}
/* 形态选择器 */
.cp-fmts{display:flex;flex-wrap:wrap;gap:6px}
.cp-fmts button{flex:1 1 44%;min-height:36px;border:1px solid var(--line);border-radius:8px;background:#fff;font:inherit;font-size:13px;color:var(--ink);cursor:pointer;padding:0 6px}
.cp-fmts button[aria-pressed=true]{background:var(--ac-2,#F8E4D7);border-color:var(--ac,#B4532A);font-weight:600}
/* 导出 */
.cp-dlrow{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0 0 12px;font-size:13px;color:var(--muted)}
.cp-dlink{border:0;background:none;padding:0;font:inherit;color:var(--accent-d);text-decoration:underline;cursor:pointer}
/* 双月 / 全年 / 月历+笔记 */
.cp-twowrap{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr;gap:2.4cqw}
.cp-yearwrap{flex:1;min-height:0;display:grid;grid-template-columns:repeat(4,1fr);grid-template-rows:repeat(3,minmax(0,1fr));gap:1.2cqw}
.cp-sheet[data-o=portrait] .cp-yearwrap{grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(4,minmax(0,1fr))}
.cp-sheet[data-o=portrait] .cp-twowrap{grid-template-columns:1fr;grid-template-rows:1fr 1fr}
.cp-mb{display:flex;flex-direction:column;min-height:0;border:.2cqw solid #B9A47F;border-radius:.8cqw;padding:.8cqw;background:#fff}
.cp-mbhd{display:flex;justify-content:space-between;align-items:baseline;border-bottom:.4cqw solid var(--ac);padding-bottom:.3cqw;margin-bottom:.5cqw}
.cp-mbhd b{font:700 2.2cqw Fraunces,Georgia,serif}
.cp-mbhd span{font:600 1.4cqw Inter,sans-serif;color:var(--ac-3)}
.cp-cdows{display:grid;grid-template-columns:repeat(7,1fr);gap:.2cqw;margin-bottom:.3cqw}
.cp-cdows span{text-align:center;font:600 1.1cqw Inter,sans-serif;color:var(--ac-3);text-transform:uppercase}
.cp-twowrap .cp-mbhd b{font-size:2.6cqw}
.cp-twowrap .cp-cdows span{font-size:1.35cqw}
.cp-twowrap .cp-n b{font-size:1.95cqw}
.cp-yearwrap .cp-mbhd b{font-size:1.9cqw}
.cp-yearwrap .cp-cdows span{font-size:.95cqw}
.cp-yearwrap .cp-n b{font-size:1.2cqw}
.cp-yearwrap .cp-mbhd{padding-bottom:.2cqw;margin-bottom:.35cqw}
.cp-cgrid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(7,1fr);grid-auto-rows:minmax(0,1fr);gap:.2cqw}
.cp-n{display:flex;align-items:flex-start;justify-content:flex-end;border:.15cqw solid #C6B392;border-radius:.4cqw;padding:0 .2cqw;background:#fff;min-height:0;overflow:hidden}
.cp-n b{font:600 1.15cqw/1.1 Inter,sans-serif}
.cp-n.we{background:var(--ac-2)}
.cp-n.h{box-shadow:inset 0 0 0 .16cqw var(--ac)}
.cp-n.h b{color:var(--ac-3)}
.cp-n.e{background:transparent;border-color:transparent}
.cp-nwt{flex:1;min-height:0;display:grid;grid-template-columns:1.55fr 1fr;gap:2cqw}
.cp-sheet[data-o=portrait] .cp-nwt{grid-template-columns:1fr;grid-template-rows:1.6fr 1fr}
.cp-col{display:flex;flex-direction:column;min-height:0}
@media(max-width:800px){
.cp-app{display:flex;flex-direction:column;align-items:stretch}
.cp-main{order:1;gap:0}
.cp-ctl{order:2}
.cp-bar{position:sticky;top:0;z-index:6;background:var(--bg);padding:8px 0;margin:0 0 10px;box-shadow:0 8px 12px -10px rgba(59,47,42,.45);flex-wrap:wrap}
.cp-view{margin:0 0 14px}
.cp-bar-hint{display:none}
.cp-go{flex:1 1 160px;min-width:0;padding:0 12px}
.cp-ghost{flex:0 1 auto}
.cp-dlrow{margin:0 0 10px}
}
@media(max-width:640px){
.cp-ctl{padding:12px;gap:12px;grid-template-columns:1fr 1fr}
.cp-ctl>.cp-f{grid-column:1/-1;gap:4px}
.cp-ctl>.cp-f.cp-half{grid-column:auto}
.cp-ctl .cp-l{font-size:11px}
.cp-ctl select,.cp-ctl input[type=text],.cp-ctl input[type=date]{min-height:40px;font-size:15px;padding:0 10px;border-radius:7px}
.cp-seg{padding:2px;gap:2px;border-radius:8px}
.cp-seg button{min-height:34px;font-size:13px;border-radius:7px}
.cp-chk{min-height:36px;font-size:13.5px}
.cp-sw button{width:32px;height:32px}
.cp-fmts button{min-height:34px;font-size:12.5px;flex:1 1 46%}
.cp-ctl>.cp-chk{grid-column:1/-1}
.cp-ctl>.cp-hint{grid-column:1/-1;font-size:12px;line-height:1.45}
.cp-go{min-height:46px;font-size:15px}
.cp-ghost{min-height:46px;font-size:13px;padding:0 12px}
}
@media print{#cp-print{-webkit-print-color-adjust:exact;print-color-adjust:exact}body>*:not(#cp-print){display:none!important}html,body{background:#fff!important}#cp-print .cp-sheet{max-width:none;border:0;border-radius:0;box-shadow:none;background:var(--paper)}#cp-print .cp-sheet[data-p=letter][data-o=portrait]{width:8.5in;height:11in}#cp-print .cp-sheet[data-p=letter][data-o=landscape]{width:11in;height:8.5in}#cp-print .cp-sheet[data-p=a4][data-o=portrait]{width:210mm;height:297mm}#cp-print .cp-sheet[data-p=a4][data-o=landscape]{width:297mm;height:210mm}}