.cal-app{display:grid;grid-template-columns:336px minmax(0,1fr);gap:20px;align-items:start;max-width:100%}
.cal-controls{background:var(--card,#fff);border:1px solid var(--border,#e4dfd5);border-radius:12px;padding:16px;box-shadow:var(--shadow-sm,0 1px 2px rgba(0,0,0,.06));display:flex;flex-direction:column;gap:12px;min-width:0;max-width:100%}
.ctrl-group{display:flex;flex-direction:column;gap:6px;min-width:0}
.ctrl-group.is-hidden{display:none}
.ctrl-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.ctrl-date-row{grid-template-columns:92px minmax(0,1fr)}
.ctrl-row:has([data-start]){grid-template-columns:1.25fr 1fr}
.ctrl-row:has([data-paper]){grid-template-columns:1fr}
[data-field="week"],[data-field="blankType"]{grid-column:1/-1}
.ctrl-label{font-size:12px;font-weight:600;color:var(--muted,#52525b);letter-spacing:.02em}
.ctrl-hint{font-weight:400;color:var(--muted,#71717a)}
.ctrl-select,.ctrl-input{width:100%;min-height:38px;padding:6px 10px;font-family:inherit;font-size:14px;color:var(--ink,#18181b);background:#fff;border:1px solid var(--border-strong,#cfc8bc);border-radius:8px}
.ctrl-select:focus,.ctrl-input:focus{outline:2px solid var(--accent,#1f513f);outline-offset:1px;border-color:var(--accent,#1f513f)}
.month-stepper{display:grid;grid-template-columns:30px minmax(0,1fr) 30px;gap:4px}
.step-btn{min-height:38px;border:1px solid var(--border-strong,#cfc8bc);background:var(--bg,#f7f4ef);color:var(--ink,#18181b);border-radius:8px;font-size:18px;line-height:1;cursor:pointer}
.step-btn:hover{border-color:var(--accent,#1f513f);color:var(--accent,#1f513f)}
.seg-grid{display:grid;gap:3px;background:var(--bg,#f7f4ef);padding:3px;border-radius:9px;border:1px solid var(--border,#e4dfd5)}
.seg-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.seg-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.seg-btn{min-height:34px;padding:5px 4px;border:0;border-radius:7px;background:transparent;color:var(--muted,#52525b);font-family:inherit;font-size:12px;font-weight:500;cursor:pointer;white-space:nowrap}
.seg-btn:hover{color:var(--ink,#18181b)}
.seg-btn.is-active{background:#fff;color:var(--accent,#1f513f);font-weight:600;box-shadow:0 1px 2px rgba(24,24,27,.08)}
.theme-pills{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.theme-pill{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:6px 8px;border:1px solid var(--border,#e4dfd5);border-radius:8px;background:#fff;color:var(--ink,#18181b);font-family:inherit;font-size:12px;font-weight:500;cursor:pointer;text-align:left;white-space:nowrap}
.theme-pill:hover{border-color:var(--accent,#1f513f)}
.theme-pill.is-active{border-color:var(--accent,#1f513f);background:var(--accent-soft,#eaf2ee);color:var(--accent,#1f513f);font-weight:600}
.swatch{width:12px;height:12px;border-radius:3px;flex-shrink:0;border:1px solid rgba(0,0,0,.18)}
.sw-classic{background:#18181b}.sw-editorial{background:#c26a3d}.sw-botanical{background:#1f513f}.sw-pastel{background:#8b7cb3}.sw-large{background:#000;border-width:2px}
.check-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.check-item{display:inline-flex;align-items:center;gap:7px;font-size:13px;color:var(--ink,#18181b);cursor:pointer}
.check-item input{width:16px;height:16px;accent-color:var(--accent,#1f513f);margin:0}
.cal-preview-pane{display:flex;flex-direction:column;gap:12px;min-width:0;max-width:100%}
.cal-toolbar{background:var(--card,#fff);border:1px solid var(--border,#e4dfd5);border-radius:12px;padding:12px 14px;box-shadow:var(--shadow-sm,0 1px 2px rgba(0,0,0,.06));display:flex;flex-direction:column;gap:10px;max-width:100%}
.cal-toolbar-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.meta-badge{font-size:12px;font-weight:600;color:var(--accent,#1f513f);background:var(--accent-soft,#eaf2ee);padding:3px 10px;border-radius:999px}
.meta-note{font-size:12px;color:var(--muted,#52525b)}
.cal-toolbar-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.btn-accent-soft{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border-radius:12px;border:1px solid #b9d4c7;background:var(--accent-soft,#eaf2ee);color:var(--accent,#1f513f);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer}
.btn-accent-soft:hover{background:#dceae3;border-color:var(--accent,#1f513f)}
.btn-subtle.is-hidden,.btn-accent-soft.is-hidden{display:none}
.cal-status{min-height:20px;font-size:13px;color:var(--accent,#1f513f);font-weight:500}
.cal-status:empty{display:none}
.cal-event-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:#fff;border:1px solid var(--accent,#1f513f);border-radius:10px;padding:10px 12px;box-shadow:var(--shadow-sm,0 1px 2px rgba(0,0,0,.06))}
.cal-event-bar.is-hidden{display:none}
.cal-event-date{font-size:13px;font-weight:700;color:var(--accent,#1f513f);white-space:nowrap}
.cal-event-input{flex:1;min-width:160px;min-height:36px;padding:6px 10px;border:1px solid var(--border-strong,#cfc8bc);border-radius:8px;font-family:inherit;font-size:13px;color:var(--ink,#18181b)}
.cal-event-btn{min-height:36px;padding:6px 12px;border-radius:8px;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer;border:1px solid var(--border-strong,#cfc8bc);background:#fff;color:var(--ink,#18181b)}
.cal-event-btn-save{background:var(--accent,#1f513f);border-color:var(--accent,#1f513f);color:#fff}
.cal-event-tip{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:12px;color:var(--muted,#52525b);padding:0 2px}
.cal-event-tip.is-hidden{display:none}
.cal-clear-btn{border:0;background:transparent;color:var(--accent-2,#c26a3d);font-family:inherit;font-size:12px;font-weight:600;cursor:pointer;padding:2px 4px;text-decoration:underline}
.cal-clear-btn.is-hidden{display:none}
.cal-paper-stage{background:#eae5dc;border:1px solid var(--border-strong,#cfc8bc);border-radius:14px;padding:18px;display:flex;justify-content:center;overflow:hidden;max-width:100%}
.cal-preview-single{width:100%;display:flex;justify-content:center;min-width:0}
.cal-batch-print-container{display:none}
.cal-sheet{position:relative;width:100%;background:#fff;color:#18181b;box-shadow:0 8px 24px rgba(24,24,27,.12);border:1px solid #dcd6cb;padding:18px 20px 14px;display:flex;flex-direction:column;font-family:'Inter',-apple-system,sans-serif;--sh-ink:#18181b;--sh-muted:#71717a;--sh-border:#d4d4d8;--sh-accent:#18181b;--sh-header-bg:#fff;--sh-th-bg:#f4f4f5;--sh-hol:#b91c1c;--sh-hol-bg:#fef2f2;--sh-title-font:'Inter',-apple-system,sans-serif}
.cal-sheet.paper-letter.orient-landscape{aspect-ratio:11/8.5;max-width:760px}
.cal-sheet.paper-letter.orient-portrait{aspect-ratio:8.5/11;max-width:580px}
.cal-sheet.paper-a4.orient-landscape{aspect-ratio:297/210;max-width:760px}
.cal-sheet.paper-a4.orient-portrait{aspect-ratio:210/297;max-width:560px}
.cal-crop-mark{position:absolute;width:9px;height:9px;border-color:#b8b0a3;border-style:solid;pointer-events:none}
.cal-crop-tl{top:6px;left:6px;border-width:1px 0 0 1px}.cal-crop-tr{top:6px;right:6px;border-width:1px 1px 0 0}
.cal-crop-bl{bottom:6px;left:6px;border-width:0 0 1px 1px}.cal-crop-br{bottom:6px;right:6px;border-width:0 1px 1px 0}
.cal-sheet.theme-classic{--sh-ink:#111;--sh-muted:#6b7280;--sh-border:#d1d5db;--sh-accent:#111;--sh-header-bg:#fff;--sh-th-bg:#f8f9fa;--sh-hol:#111;--sh-hol-bg:#f3f4f6}
.cal-sheet.theme-editorial{--sh-ink:#27201a;--sh-muted:#786a5e;--sh-border:#dfd4c5;--sh-accent:#9f4421;--sh-header-bg:#f7f1e7;--sh-th-bg:#fbf7f1;--sh-hol:#a8431e;--sh-hol-bg:#fdf1ea;--sh-title-font:'Newsreader',Georgia,serif}
.cal-sheet.theme-botanical{--sh-ink:#1a2821;--sh-muted:#5a7063;--sh-border:#cddbd2;--sh-accent:#1f513f;--sh-header-bg:#ebf3ee;--sh-th-bg:#f4f8f5;--sh-hol:#1f513f;--sh-hol-bg:#e7f1eb;--sh-title-font:'Newsreader',Georgia,serif}
.cal-sheet.theme-pastel{--sh-ink:#2a2438;--sh-muted:#6f6685;--sh-border:#ddd7ec;--sh-accent:#5e4b8b;--sh-header-bg:#f3effa;--sh-th-bg:#f8f6fc;--sh-hol:#9d4e78;--sh-hol-bg:#fcf0f6}
.cal-sheet.theme-large{--sh-ink:#000;--sh-muted:#333;--sh-border:#222;--sh-accent:#000;--sh-header-bg:#fff;--sh-th-bg:#e5e7eb;--sh-hol:#000;--sh-hol-bg:#f3f4f6}
.sh-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:7px 12px;border-radius:6px;background:var(--sh-header-bg);border-bottom:2px solid var(--sh-accent);margin-bottom:8px}
.sh-head-left{display:flex;flex-direction:column;gap:2px}
.sh-custom-title{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.08em;color:var(--sh-accent)}
.sh-title{font-family:var(--sh-title-font);font-size:23px;font-weight:700;line-height:1.15;color:var(--sh-ink);margin:0}
.theme-large .sh-title{font-size:28px}
.sh-year-tag{font-size:13px;font-weight:600;color:var(--sh-muted)}
.sh-body{flex:1;display:flex;gap:10px;min-height:0}
.sh-body.notes-bottom{flex-direction:column}
.sh-main{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0}
.sh-dow-row{display:grid;border:1px solid var(--sh-border);border-bottom:0;background:var(--sh-th-bg)}
.sh-dow-cell{padding:4px 4px;font-size:12px;font-weight:600;text-align:center;color:var(--sh-ink);border-right:1px solid var(--sh-border)}
.sh-dow-cell:last-child{border-right:0}
.sh-grid{flex:1;display:grid;border:1px solid var(--sh-border);min-height:0}
.sh-wk-cell{background:var(--sh-th-bg);color:var(--sh-muted);font-size:12px;font-weight:600;display:flex;align-items:flex-start;justify-content:center;padding-top:5px;border-right:1px solid var(--sh-border);border-bottom:1px solid var(--sh-border)}
.sh-day-cell{position:relative;padding:4px 5px;border-right:1px solid var(--sh-border);border-bottom:1px solid var(--sh-border);display:flex;flex-direction:column;gap:2px;min-width:0;overflow:hidden}
.sh-day-cell.is-editable{cursor:pointer}
.sh-day-cell.is-editable:hover{box-shadow:inset 0 0 0 1.5px var(--sh-accent)}
.sh-day-cell.is-selected{box-shadow:inset 0 0 0 2px var(--sh-accent)}
.sh-day-cell.is-adj{background:#fafafa}
.sh-day-cell.is-adj .sh-day-num{color:#b4b4bd;font-weight:400}
.sh-day-cell.has-hol{background:var(--sh-hol-bg)}
.sh-day-num{font-size:13px;font-weight:600;line-height:1.1;color:var(--sh-ink)}
.theme-large .sh-day-num{font-size:18px;font-weight:700}
.sh-hol-label{font-size:12px;line-height:1.15;font-weight:600;color:var(--sh-hol);white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.sh-ev-label{font-size:12px;line-height:1.15;color:var(--sh-ink);background:rgba(31,81,63,.08);border-left:2px solid var(--sh-accent);padding:1px 3px;border-radius:2px;white-space:normal;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.sh-lines{flex:1;display:flex;flex-direction:column;justify-content:space-evenly;margin-top:3px;min-height:12px}
.theme-large .sh-lines{margin-top:5px}
.theme-large .sh-day-cell.has-hol .sh-lines .sh-line:first-child{display:none}
.sh-line{border-bottom:1px solid var(--sh-border);opacity:.6;height:1px}
.sh-notes{border:1px solid var(--sh-border);border-radius:6px;padding:8px 10px;display:flex;flex-direction:column;gap:6px;background:#fff}
.sh-body:not(.notes-bottom) .sh-notes{width:19%;min-width:108px}
.sh-body.notes-bottom .sh-notes{height:15%;min-height:66px}
.sh-notes-head{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:var(--sh-accent);border-bottom:1px solid var(--sh-border);padding-bottom:4px}
.sh-notes-lines{flex:1;display:flex;flex-direction:column;justify-content:space-evenly}
.sh-notes-line{border-bottom:1px solid var(--sh-border);height:1px}
.sh-year-grid{flex:1;display:grid;gap:6px;min-height:0}
.sh-year-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}
.sh-year-grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr))}
.sh-q-grid{flex:1;display:grid;gap:10px;min-height:0}
.sh-q-grid.q-land{grid-template-columns:repeat(3,minmax(0,1fr))}
.sh-q-grid.q-port{grid-template-columns:1fr;grid-template-rows:repeat(3,minmax(0,1fr))}
.sh-q-month{border:1px solid var(--sh-border);border-radius:6px;padding:8px;display:flex;flex-direction:column;gap:6px;min-width:0}
.sh-q-title{font-family:var(--sh-title-font);font-size:15px;font-weight:700;color:var(--sh-accent);border-bottom:1px solid var(--sh-border);padding-bottom:4px}
.sh-q-hols{margin-top:auto;font-size:12px;color:var(--sh-muted);border-top:1px solid var(--sh-border);padding-top:4px;line-height:1.35}
.sh-mini-month{border:1px solid var(--sh-border);border-radius:5px;padding:4px 5px;display:flex;flex-direction:column;gap:2px;min-width:0;overflow:hidden}
.sh-mini-title{font-family:var(--sh-title-font);font-size:12px;font-weight:700;color:var(--sh-accent);border-bottom:1px solid var(--sh-border);padding-bottom:1px}
.sh-mini-table{width:100%;border-collapse:collapse;table-layout:fixed;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.sh-mini-table th,.sh-mini-table td{text-align:center;padding:1px 0;line-height:1.2;font-size:12px}
.sh-mini-table th{color:var(--sh-muted);font-weight:600}
.sh-mini-table td.is-hol{color:var(--sh-hol);font-weight:700;background:var(--sh-hol-bg);border-radius:3px}
.sh-weekly-wrap{flex:1;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border:1px solid var(--sh-border);min-height:0}
.orient-portrait .sh-weekly-wrap{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr))}
.sh-wday{border-right:1px solid var(--sh-border);border-bottom:1px solid var(--sh-border);padding:6px;display:flex;flex-direction:column;gap:4px;min-width:0}
.sh-wday-head{display:flex;justify-content:space-between;align-items:baseline;border-bottom:1px solid var(--sh-border);padding-bottom:3px}
.sh-wday-name{font-size:12px;font-weight:700;color:var(--sh-accent)}
.sh-wday-date{font-size:12px;color:var(--sh-muted)}
.sh-wslot{font-size:12px;color:var(--sh-muted);border-bottom:1px solid var(--sh-border);padding:2px 0;flex:1}
.sh-priorities{border:1px solid var(--sh-border);border-radius:6px;padding:8px 10px;margin-bottom:8px;background:var(--sh-th-bg)}
.sh-prio-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:6px}
.sh-prio-item{border-bottom:1px solid var(--sh-border);font-size:12px;color:var(--sh-muted);padding-bottom:4px}
.sh-blank-line{display:inline-block;width:190px;border-bottom:2px solid var(--sh-ink);height:22px;vertical-align:bottom}
.sh-foot{margin-top:6px;display:flex;justify-content:space-between;align-items:center;font-size:12px;color:var(--sh-muted)}
@media print{.cal-event-bar,.cal-event-tip{display:none !important}.sh-day-cell.is-selected{box-shadow:none !important}}
@media (max-width:960px){.cal-app{grid-template-columns:1fr}}
@media (max-width:640px){.cal-controls{padding:14px}.ctrl-row,.ctrl-date-row,.theme-pills,.check-grid{grid-template-columns:1fr}.seg-5{grid-template-columns:repeat(3,minmax(0,1fr))}.cal-toolbar-actions{flex-direction:column;align-items:stretch}.cal-toolbar-actions button{width:100%}.cal-paper-stage{padding:10px}.cal-sheet{padding:12px;aspect-ratio:auto !important;min-height:380px}.sh-body{flex-direction:column}.sh-body:not(.notes-bottom) .sh-notes{width:100%;min-width:0;height:auto;min-height:72px}.sh-title{font-size:18px}.sh-day-cell{padding:3px 2px}.sh-year-grid.cols-4,.sh-year-grid.cols-3{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto}.sh-q-grid.q-land{grid-template-columns:1fr}.sh-weekly-wrap{grid-template-columns:1fr}.sh-prio-list{grid-template-columns:1fr}}
