:root{color-scheme:light;--paper:#f7f8f2;--card:#fff;--ink:#233329;--muted:#526159;--line:#dce4d9;--green:#285d43;--seed:#e4eee1;--soft:#edf3e8;--warm:#f8edda;--shadow:0 3px 14px #16392309;--red:#a7373a;--blue:#325e94;--ochre:#80510d;font:100%/1.55 "Pretendard","Noto Sans KR",system-ui,sans-serif}
*{box-sizing:border-box}
body{margin:0;background:var(--paper);color:var(--ink)}
h1,h2,h3,p{margin:0}
a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}
button{cursor:pointer}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #438c62;outline-offset:2px;z-index:1}
[hidden]{display:none!important}
.skip:not(:focus){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.skip:focus{position:fixed;z-index:10;background:white;padding:10px}
.wrap{width:min(1200px,calc(100% - 48px));margin-inline:auto}
.top{background:var(--card);border-bottom:1px solid var(--line)}
.top-inner{display:flex;align-items:center;gap:24px;justify-content:space-between;min-height:70px}
.brand{display:inline-flex;align-items:center;gap:10px;font-size:1.18rem;white-space:nowrap;font-weight:650;letter-spacing:-.05em}
.brand strong,.green{color:var(--green)}
.top nav,.foot nav{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.top nav a,.foot nav a{color:var(--muted);font-size:.9rem}
.top nav a:hover,.foot nav a:hover,.prose a:hover{text-decoration:underline}
.button{display:inline-flex;min-height:39px;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:11px;padding:8px 13px;background:var(--card);font-size:.875rem;font-weight:650;line-height:1.2;white-space:nowrap}
.button:hover{background:var(--soft)}
.primary{background:var(--green);color:white;border-color:var(--green)}
.primary:hover{background:#1f4c36}
.hero{margin:30px 0 24px;padding:30px 36px;background:var(--seed);border:1px solid var(--line);border-radius:22px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.hero h1{font-size:clamp(1.8rem,4vw,2.65rem);line-height:1.15;letter-spacing:-.065em}
.hero p{margin-top:9px;color:var(--muted);word-break:keep-all}
.hero-links{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}
.hero-icon{width:130px;flex:0 0 130px}
.workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,310px);align-items:start;gap:18px}
.card{background:var(--card);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
.calendar{padding:18px;min-width:0}
.cal-head,.cal-nav,.side-title,.legend{display:flex;justify-content:space-between;align-items:center;gap:8px}
.cal-nav{margin:15px 0 10px}
.seg{display:flex;padding:3px;background:var(--soft);border-radius:11px}
.seg button,.stepper button{border:0;border-radius:8px;background:transparent;min-height:36px;min-width:44px;padding:2px 10px}
.seg button[aria-pressed=true]{background:white;color:var(--green);font-weight:750;box-shadow:0 1px 4px #23332916}
.stepper{display:flex;align-items:center;gap:8px}
.stepper button{background:var(--soft);font-size:1.45rem;line-height:1}
.stepper h2{font-size:1.35rem;letter-spacing:-.045em;text-align:center}
.filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px 13px;margin-bottom:12px;font-size:.82rem;color:var(--muted)}
.filters label,.check{display:flex;align-items:center;gap:5px}
input[type=checkbox]{accent-color:var(--green);height:16px;width:16px}
.jump{margin-inline-start:auto}
input:not([type=checkbox]),select,textarea{padding:7px 9px;border:1px solid var(--line);background:white;border-radius:9px;min-width:0}
.weekdays,.day-grid,.mini-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.weekdays{background:var(--soft);border-radius:9px 9px 0 0;text-align:center;padding:7px 0;font-size:.82rem;font-weight:750}
.day-grid{border-left:1px solid var(--line);border-top:1px solid var(--line)}
.cell{display:flex;flex-direction:column;align-items:flex-start;gap:2px;min-height:92px;min-width:0;text-align:left;border:0;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:white;padding:6px;overflow:hidden}
.cell:hover{background:var(--paper)}
.cell.selected{background:var(--soft);box-shadow:inset 0 0 0 2px #739879}
.cell.muted-day{background:#f9faf7;color:#586860}
.day-head{display:flex;align-items:center;gap:4px}
.day-head strong{font-size:.95rem;min-width:19px;text-align:center}
.current .day-head strong{background:var(--green);color:white;border-radius:5px}
.hand-dot{height:6px;width:6px;background:#ae7929;border-radius:50%}
.cell small{font-size:.67rem;color:var(--muted)}
.cell-fact,.entry-tag{font-size:.67rem;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;max-width:100%}
.entry-tag{border-radius:4px;padding:2px 3px;color:var(--ink)}
.red,.sun .day-head,.sun .cell-fact{color:var(--red)}
.blue-ink,.sat .day-head{color:var(--blue)}
.ochre{color:var(--ochre)}
.legend{justify-content:flex-start;flex-wrap:wrap;gap:6px 12px;margin-top:11px;font-size:.75rem}
.legend a{margin-inline-start:auto;text-decoration:underline;color:var(--muted)}
.year-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.mini{width:100%;background:var(--paper);border:1px solid var(--line);border-radius:10px;padding:8px}
.mini:hover{background:var(--seed)}
.mini-grid{margin-top:5px;font-size:.73rem;gap:1px;text-align:center}
.mini-grid b{color:var(--muted);font-size:.68rem}
.has-event{text-decoration:underline;text-decoration-color:var(--green);text-decoration-thickness:2px}
.side{display:grid;gap:14px}
.detail,.side-card{padding:16px}
.overline,.sub,#picked-lunar,.empty,#notice{font-size:.82rem;color:var(--muted)}
.detail h2{font-size:1.45rem;letter-spacing:-.045em;margin:2px 0}
#picked-facts{display:flex;gap:5px;flex-wrap:wrap;margin:8px 0}
.chip{background:var(--soft);border-radius:7px;padding:3px 7px;font-size:.75rem}
.side-title h3,.side-card h3{font-size:1rem}
.detail .side-title{padding-top:12px;border-top:1px solid var(--line);margin:12px 0 7px}
.manage{display:flex;gap:5px;flex-wrap:wrap;margin-top:8px}
#notice:not(:empty){margin-top:8px}
.entry,.dday{display:flex;align-items:flex-start;flex-direction:column;width:100%;text-align:left;border:1px solid var(--line);border-radius:9px;background:white;padding:7px 9px;margin:6px 0;overflow-wrap:anywhere}
.entry span,.entry small,.dday small{font-size:.75rem;color:var(--muted)}
.entry span{white-space:pre-wrap}
.dday{flex-direction:row;align-items:center;justify-content:space-between;gap:8px}
.dday small{display:block}
.dday b{color:var(--green);white-space:nowrap}
.sage{background:#e4eee1}.rose{background:#f6e1e5}.blue{background:#e1ecf9}.amber{background:#f8edda}.violet{background:#ece4f5}
.prose{padding:24px;margin:19px 0;overflow-wrap:break-word}
.prose h2,.prose h3{margin:14px 0 7px}
.prose h2:first-child{margin-top:0}
.prose p{margin:7px 0}
.prose a:not(.button){text-decoration:underline;color:var(--green)}
.prose section+section{margin-top:24px}
.month-links{display:flex;flex-wrap:wrap;gap:6px;margin:14px 0}
table{border-collapse:collapse;width:100%;font-size:.9rem}
th,td{padding:7px;border-bottom:1px solid var(--line);text-align:left}
thead{background:var(--soft)}
footer{margin-top:30px;border-top:1px solid var(--line)}
.foot{padding:22px 0;display:grid;gap:9px}
.foot p{font-size:.8rem;color:var(--muted)}
dialog{width:min(510px,calc(100% - 24px));max-height:calc(100% - 24px);padding:19px;border:1px solid var(--line);border-radius:17px;color:var(--ink)}
dialog::backdrop{background:#17291dc0}
form{display:grid;gap:12px}
form label{display:grid;gap:4px;font-size:.85rem;font-weight:600}
form details{border:1px solid var(--line);padding:9px;border-radius:9px}
form details .form-grid{margin:8px 0}
form summary{cursor:pointer}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.dialog-actions{display:flex;justify-content:flex-end;gap:8px}
#form-error{font-size:.83rem;color:var(--red)}
#conversion{font-size:.8rem;color:var(--muted)}
.print-sheet{display:none}
@media(max-width:900px){
 .workspace{grid-template-columns:minmax(0,1fr)}
 .side{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:650px){
 .wrap{width:calc(100% - 24px)}
 .top-inner{gap:8px 10px;min-height:0;padding:9px 0;flex-wrap:wrap}
 .top nav{order:3;width:100%;gap:6px 12px;padding:3px 0}
 .top nav a{font-size:.78rem}
 .brand img{width:33px;height:33px}
 .hero{border-radius:16px;padding:16px;margin:15px 0}
 .hero-icon{display:none}
 .hero p{font-size:.875rem}
 .calendar{padding:9px}
 .side{grid-template-columns:1fr}
 .stepper{gap:4px}
 .stepper h2{font-size:1.08rem}
 .stepper button{min-width:32px;padding:2px 6px}
 .cell{padding:3px;min-height:70px;gap:1px}
 .cell-fact,.entry-tag{font-size:.58rem}
 .cell small{font-size:.62rem}
 .year-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .jump{margin-inline-start:0}
 .prose{padding:16px}
}
@page{size:A4 landscape;margin:11mm}
@media print{
 body{background:#fff}
 body>*{display:none!important}
 body>.print-sheet{display:block!important;color:black;print-color-adjust:exact;-webkit-print-color-adjust:exact}
 .print-sheet h1{font-size:20pt;margin:0 0 4mm}
 .print-sheet .cell{min-height:22mm;break-inside:avoid;box-shadow:none}
 .print-sheet .cell-fact,.print-sheet .entry-tag,.print-sheet .cell small{font-size:8pt}
}
