/* Task-first calendar and almanac tools; the original paper, ink and cinnabar palette. */
.cs-tool-page .ep-columns{display:block;max-width:58rem;margin-inline:auto}
.cs-tool-page .ep-prose{max-width:none;letter-spacing:normal}
.cs-tool-page .ep-title{padding-bottom:1rem;margin-bottom:1rem}
.cs-tool-page .ep-title h1{font-size:clamp(1.75rem,4.5vw,2.5rem);line-height:1.3;margin:.35rem 0 .5rem}
.cs-tool-page .ep-title .ep-intro{font-size:1rem;line-height:1.6;margin:0}
.cs-tool-page .ep-label{font-size:.875rem}
.cs-tool-page .ep-crumbs{margin-block:1rem}
.cs-tool{--cs-ink:#35281d;--cs-red:#823221;--cs-gold:#b78a4d;color:var(--cs-ink);border:1px solid #cdb795;background:#fbf4e7;padding:clamp(.875rem,3vw,1.5rem);margin:0 0 1rem;font-size:1rem;line-height:1.6}
.cs-tool *, .cs-tool *::before,.cs-tool *::after{box-sizing:border-box}
.cs-tool [hidden]{display:none!important}
.cs-visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.cs-tool button,.cs-tool input,.cs-tool select{font:inherit;min-height:44px;color:var(--cs-ink);border:1px solid #af936c;background:#fffaf1;border-radius:3px}
.cs-tool input,.cs-tool select{min-width:0;max-width:100%;padding:.5rem .7rem}
.cs-tool select{appearance:none;padding-right:2.1rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%235a3820' stroke-width='1.6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .7rem center}
.cs-tool button{cursor:pointer;padding:.45rem .8rem}
.cs-tool button:hover{background:#f1e1c7}
.cs-tool button:disabled{opacity:.45;cursor:default}
.cs-tool button:focus-visible,.cs-tool input:focus-visible,.cs-tool select:focus-visible,.cs-tool a:focus-visible,.cs-explainer summary:focus-visible,.cs-month-events summary:focus-visible{outline:3px solid #9f542e;outline-offset:3px}
.cs-controls{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.6rem;margin-bottom:.7rem}
.cs-controls label{min-width:0}
.cs-controls select{width:100%;font-weight:700;text-align:center}
.cs-jumps{display:flex;flex-wrap:wrap;gap:.5rem;margin:0 0 .85rem}
.cs-jumps button{color:var(--cs-red);border-color:#d1b48b;font-size:.875rem}
.cs-month{margin:1.5rem 0 1rem}
.cs-month h3{font-size:1.25rem;margin:0 0 .8rem}
.cs-tool.cs-ready .cs-month{margin:0}
.cs-tool.cs-ready .cs-month h3{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.cs-weekdays,.cs-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.cs-weekdays{font-size:.875rem;text-align:center;padding-bottom:.4rem;color:#72583d}
.cs-grid .cs-day{display:flex;flex-direction:column;justify-content:flex-start;align-items:center;text-align:center;min-width:0;min-height:4.25rem;padding:.35rem .05rem;border:1px solid #e5d3b7;background:#fffaf2;position:relative}
.cs-grid .cs-day:hover,.cs-grid .cs-day[aria-pressed=true]{background:#f3e0b9;border-color:#9b642a;box-shadow:inset 0 0 0 1px #9b642a}
.cs-day .cs-day-number{font-size:1.125rem;font-weight:700;line-height:1.4}
.cs-day .cs-lunar{font-size:.875rem;line-height:1.35;margin-top:.1rem;color:#6c5841;white-space:nowrap}
.cs-day .cs-dot{width:5px;height:5px;background:#a2452b;border-radius:50%;margin-top:4px}
.cs-grid .cs-day.cs-festival{background:#f7e5c4;border-color:#b88946}
.cs-grid .cs-day.cs-birthday{background:#813121;color:#fff4da;border-color:#813121}
.cs-grid .cs-day.cs-birthday .cs-lunar{color:#f3dbad}
.cs-grid .cs-day.cs-birthday .cs-dot{background:#f3dbad}
.cs-grid .cs-day[aria-current=date] .cs-day-number{text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:3px}
.cs-blank{background:transparent}
.cs-selected{padding:.7rem .85rem;background:#efe1cb;border-left:3px solid #9c422b;margin:.8rem 0!important;min-height:3rem;font-size:1rem!important}
.cs-month-events{margin:.6rem 0 0;border-bottom:1px solid #e1cfb3}
.cs-month-events summary{cursor:pointer;min-height:44px;padding:.5rem 0;font-size:.875rem;font-weight:700;color:#823221}
.cs-event-list{list-style:none!important;margin:0 0 .7rem!important;padding:0!important}
.cs-event-list li{padding:.55rem 0;margin:0!important;border-top:1px solid #e1cfb3;font-size:.95rem}
.cs-event-list time{font-weight:700;color:#823221;margin-right:.7rem;white-space:nowrap}
.cs-note{font-size:.875rem!important;color:#705d47;line-height:1.6;margin:.35rem 0 0!important}
.cs-legend{display:flex;flex-wrap:wrap;gap:.3rem 1rem;font-size:.875rem!important;color:#705d47;margin:.5rem 0!important}
.cs-legend span{display:inline-flex;align-items:center;gap:.4rem}
.cs-legend-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:#a2452b}
.cs-legend-birthday{display:inline-block;width:11px;height:11px;border-radius:2px;background:#813121}
.cs-direction-form{display:block}
.cs-date-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:.75rem}
.cs-date-row label{display:flex;flex-direction:column;gap:.3rem;font-size:.875rem}
.cs-date-row input{width:100%;font-size:1rem;min-height:46px}
.cs-direction-form .cs-submit{background:#813121;color:#fff5df;border-color:#813121;min-height:46px}
.cs-direction-form .cs-submit:hover{background:#662216}
.cs-direction-options{display:flex;align-items:center;justify-content:space-between;gap:.65rem;flex-wrap:wrap;margin-top:.65rem}
.cs-shortcuts{display:flex;gap:.5rem}
.cs-shortcuts button{font-size:.875rem}
.cs-zone-field{display:flex;align-items:center;gap:.5rem;min-width:0;font-size:.875rem}
.cs-zone-field select{max-width:15rem;font-size:.875rem}
.cs-result{display:grid;grid-template-columns:minmax(0,1fr) 152px;gap:.5rem 1.25rem;align-items:center;border-block:1px solid #d7bf99;padding:1rem 0;margin:1rem 0}
.cs-result-copy{min-width:0}
.cs-result-heading{font-size:1rem!important;line-height:1.6!important;margin:0 0 .6rem!important}
.cs-direction-name{font-size:clamp(2.25rem,7vw,3.5rem)!important;font-weight:700;line-height:1.2;color:#80301f;margin:.3rem 0!important}
.cs-result-details{grid-column:1/-1;font-size:.95rem!important;margin:.3rem 0 0!important}
.cs-error{color:#9a271a;font-size:.95rem!important;margin:.6rem 0!important}
.cs-error:empty{display:none}
.cs-compass{--cs-angle:0deg;position:relative;width:152px;height:152px;border:1px solid #b68a50;border-radius:50%;background:radial-gradient(circle,transparent 55%,#d7be9540 56%,transparent 57%)}
.cs-compass::after{content:'';position:absolute;width:9px;height:9px;border-radius:50%;background:#8e4424;left:calc(50% - 4.5px);top:calc(50% - 4.5px)}
.cs-compass span{position:absolute;font-size:.875rem;color:#6f5136}
.cs-compass .cs-north{top:5px;left:calc(50% - .45rem)}
.cs-compass .cs-south{bottom:5px;left:calc(50% - .45rem)}
.cs-compass .cs-east{right:7px;top:calc(50% - .75rem)}
.cs-compass .cs-west{left:7px;top:calc(50% - .75rem)}
.cs-needle{position:absolute;left:calc(50% - 3px);bottom:50%;width:6px;height:30%;background:#9b3d24;transform-origin:center bottom;transform:rotate(var(--cs-angle));transition:transform .2s ease}
.cs-needle::before{content:'';position:absolute;top:-8px;left:-6px;border-left:9px solid transparent;border-right:9px solid transparent;border-bottom:12px solid #9b3d24}
.cs-tool-links{display:flex;flex-wrap:wrap;gap:.35rem 1.25rem;margin:0 0 1.25rem;font-size:.95rem;line-height:1.6}
.cs-tool-links a{display:inline-flex;align-items:center;min-height:44px;color:#813121;text-underline-offset:.2em}
.cs-explainer{border-top:1px solid #d8c8ae}
.cs-explainer summary{cursor:pointer;min-height:48px;display:list-item;padding:.85rem .2rem;color:#613c25;font-size:1rem;font-weight:700;line-height:1.5}
.cs-explainer-content{font-size:1rem;line-height:1.8;padding:.35rem .2rem 1rem}
.cs-explainer-content p{margin:0 0 .85rem!important}
.cs-explainer-content p:last-child{margin-bottom:0!important}
.cs-static-table{margin:0 0 1rem}
.cs-static-table th,.cs-static-table td{vertical-align:top}
@media(max-width:600px){.cs-controls{gap:.35rem}.cs-controls button{padding:.45rem .6rem;font-size:.875rem}.cs-controls select{padding-inline:.5rem 1.5rem;font-size:.95rem;background-position:right .45rem center}.cs-jumps{gap:.4rem}.cs-jumps button{padding:.4rem .55rem}.cs-grid .cs-day{min-height:3.65rem}.cs-event-list time{display:block}.cs-result{grid-template-columns:minmax(0,1fr) 112px;gap:.4rem .8rem}.cs-compass{width:112px;height:112px}.cs-result-heading{font-size:.875rem!important}.cs-zone-field{flex:1 1 100%;justify-content:space-between}.cs-zone-field select{flex:1 1 auto;max-width:none}.cs-tool-page .ep-title h1{font-size:1.8rem}.cs-tool-page .ep-intro{max-width:none}}
@media(max-width:360px){.cs-tool{padding:.65rem}.cs-jumps button{font-size:.875rem}.cs-result{grid-template-columns:minmax(0,1fr) 100px}.cs-compass{width:100px;height:100px}}
@media(prefers-reduced-motion:reduce){.cs-needle{transition:none}}
@media(max-width:600px){
 .cs-grid .cs-day{min-height:3.4rem;padding:.2rem .05rem}
 .cs-day .cs-day-number{font-size:1rem;line-height:1.4}
 .cs-day .cs-lunar{font-size:.875rem;line-height:1.2}
 .cs-day .cs-dot{position:absolute;bottom:3px;width:4px;height:4px;margin:0}
}
