.dr-routine { --dr-border: #a3b5c2; --dr-ink: #17394a; --dr-accent: #075e69; max-width: 61rem; color: inherit; }
.dr-routine, .dr-routine * { box-sizing: border-box; }
.dr-routine header { margin-bottom: 1rem; }
.dr-routine .dr-tabs, .dr-routine .dr-actions, .dr-routine .dr-choices, .dr-routine .dr-calnav { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: .65rem 0; }
.dr-routine .dr-panel { border: 1px solid var(--dr-border); border-radius: .85rem; background: var(--surface, Canvas); color: CanvasText; padding: clamp(1rem, 3vw, 1.6rem); margin: 1rem 0; }
.dr-routine :where(h2,h3,h4) { color: inherit; line-height: 1.25; }
.dr-routine .dr-panel h3 { margin: 0 0 .6rem; }
.dr-routine .dr-panel h4 { margin: .8rem 0; }
.dr-routine .dr-panel p { max-width: 66ch; line-height: 1.5; }
.dr-routine fieldset { min-width: 0; border: 1px solid var(--dr-border); border-radius: .55rem; margin: .85rem 0; padding: .7rem .8rem .85rem; }
.dr-routine legend { padding: 0 .35rem; font-weight: 650; }
.dr-routine button, .dr-routine select, .dr-routine input:not([type=checkbox]) { font: inherit; min-height: 2.75rem; max-width: 100%; border: 1px solid var(--dr-border); border-radius: .4rem; background-color: Canvas; color: CanvasText; }
.dr-routine button { cursor: pointer; padding: .45rem .7rem; white-space: normal; line-height: 1.25; overflow-wrap: anywhere; }
.dr-routine button:disabled { opacity: .55; cursor: default; }
.dr-routine button[aria-pressed=true], .dr-routine .dr-primary { color: white; background: var(--dr-accent); border-color: var(--dr-accent); }
.dr-routine :where(button,input,select,[tabindex]):focus-visible { outline: 3px solid #0c6c94; outline-offset: 2px; }
.dr-routine label { display: block; font-weight: 500; }
.dr-routine select, .dr-routine input:not([type=checkbox]) { padding: .3rem .5rem; }
.dr-routine input[type=checkbox] { width: 1.3rem; height: 1.3rem; accent-color: var(--dr-accent); flex: 0 0 auto; }
.dr-routine .dr-calendar { width: min(100%,30rem); table-layout: fixed; border-collapse: separate; border-spacing: .2rem; border: 0; }
.dr-routine .dr-calendar caption { font-size: 1.1em; font-weight: 700; padding: .4rem 0; }
.dr-routine .dr-calendar th, .dr-routine .dr-calendar td { border: 0; text-align: center; padding: 0; background: transparent; }
.dr-routine .dr-calendar button { width: 100%; min-width: 0; padding: .25rem .1rem; }
.dr-routine .dr-help { font-size: .92em; }
.dr-routine .dr-weather { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,9rem),1fr)); gap: .35rem .6rem; }
.dr-routine .dr-weather label, .dr-routine .dr-plan label { display: flex; gap: .4rem; align-items: center; min-height: 2.75rem; padding: .25rem .35rem; cursor: pointer; }
.dr-routine .dr-plan { list-style: none; padding: 0; }
.dr-routine .dr-plan li + li, .dr-routine .dr-editor-list li + li { border-top: 1px solid var(--dr-border); }
.dr-routine .dr-plan input:checked + span { text-decoration: line-through; }
.dr-routine .dr-editor-list { padding-inline-start: 1.5rem; }
.dr-routine .dr-editor-list li { padding: .6rem 0; }
.dr-routine .dr-editor-list form, .dr-routine .dr-add { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem; }
.dr-routine .dr-status { font-weight: 600; }
.dr-routine .dr-status:empty { margin: 0; }
.dr-routine .dr-break { border-inline-start: .35rem solid var(--dr-accent); }
.dr-routine .dr-observations { padding-inline-start: 1.4rem; }
@media (max-width: 32rem) {
  .dr-routine .dr-panel { padding: .7rem; }
  .dr-routine fieldset { padding: .5rem .3rem; }
  .dr-routine .dr-calendar { border-spacing: .08rem; }
}
@media (forced-colors: active) {
  .dr-routine button[aria-pressed=true] { outline: 2px solid Highlight; }
  .dr-routine :where(button,input,select,[tabindex]):focus-visible { outline-color: Highlight; }
}
.dr-routine .dr-chart-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .5rem; margin: .8rem 0; }
.dr-routine .dr-chart-slot { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; gap: .45rem; border: 2px solid var(--dr-border); border-radius: .55rem; background: Canvas; color: CanvasText; padding: .65rem .35rem; }
.dr-routine .dr-chart-slot h4 { margin: 0; font-size: 1rem; }
.dr-routine .dr-chart-slot small, .dr-routine .dr-chart-empty { font-size: .875em; line-height: 1.25; }
.dr-routine .dr-chart-empty { display: grid; align-content: center; min-height: 3.7rem; }
.dr-routine .dr-chart-word { margin: auto 0; font-size: clamp(1rem, 3.3vw, 1.75rem); overflow-wrap: anywhere; }
.dr-routine .dr-date-tile { border: 1px solid currentColor; border-radius: .35rem; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; min-width: min(100%,4rem); }
.dr-routine .dr-date-tile small:first-child { padding: .15rem .3rem; font-weight: 650; background: var(--dr-accent); color: white; }
.dr-routine .dr-date-tile strong { font-size: 1.7rem; line-height: 1.1; }
.dr-routine .dr-chart-symbols { display:flex; justify-content:center; flex-wrap:wrap; gap:.45rem; }
.dr-routine .dr-weather-card { display:inline-flex; flex-direction:column; align-items:center; gap:.1rem; font-size:.82em; line-height:1.2; overflow-wrap:anywhere; }
.dr-routine .dr-pictogram { display:inline-block; width:2rem; height:2rem; flex:0 0 auto; color:var(--dr-accent); }
.dr-routine .dr-plan input:checked ~ span { text-decoration:line-through; }
.dr-routine .dr-weather label { border:1px solid var(--dr-border); border-radius:.4rem; gap:.35rem; flex-wrap:wrap; }
.dr-routine .dr-weather label:has(input:checked) { border:2px solid var(--dr-accent); padding:calc(.25rem - 1px) calc(.35rem - 1px); }
.dr-routine .dr-grip { display:inline-flex; align-items:center; justify-content:center; width:27px; height:27px; padding:0; margin-inline-start:.25rem; border:1px solid currentColor; border-radius:.25rem; cursor:grab; color:var(--dr-accent); background:Canvas; vertical-align:middle; user-select:none; -webkit-user-select:none; touch-action:none; -webkit-touch-callout:none; }
.dr-routine .dr-grip span { width:13px; height:13px; background:radial-gradient(currentColor 1.5px,transparent 2px) 0 0 / 5px 5px; pointer-events:none; }
.dr-routine .dr-grabbing { cursor:grabbing; outline:2px solid currentColor; }
.dr-routine.dr-drag-on .dr-calendar button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.15rem; }
.dr-routine.dr-drag-on .dr-calendar .dr-grip { margin:0; }
.dr-routine .dr-drop-pocket { position:fixed; z-index:30; left:50%; transform:translateX(-50%); bottom:max(.6rem,env(safe-area-inset-bottom)); width:min(90vw,28rem); min-height:3.4rem; border:3px dashed var(--dr-accent); border-radius:.7rem; color:CanvasText; background:Canvas; padding:.7rem; text-align:center; font-weight:650; box-shadow:0 3px 16px #16374540; }
.dr-routine .dr-drop-pocket[hidden] { display:none !important; }
.dr-routine[data-drag-kind=weekday] [data-dr-zone=weekday], .dr-routine[data-drag-kind=date] [data-dr-zone=date], .dr-routine[data-drag-kind=weather] [data-dr-zone=weather] { border-style:dashed; border-color:var(--dr-accent); }
.dr-routine [data-dr-zone][data-drop-state=ready] { outline:3px solid var(--dr-accent); outline-offset:2px; border-style:solid; }
.dr-routine [data-dr-zone][data-drop-state=other] { border-style:dotted; }
@media (max-width:24rem) {
  .dr-routine .dr-chart-grid { gap:.2rem; }
  .dr-routine .dr-chart-slot { padding:.5rem .15rem; }
  .dr-routine .dr-chart-slot h4 { font-size:.94rem; }
  .dr-routine .dr-chart-slot small,.dr-routine .dr-chart-empty { font-size:.78em; }
  .dr-routine .dr-calendar .dr-grip { width:min(100%,25px); }
}
@media (forced-colors:active) {
  .dr-routine .dr-grip span { background:none; }
  .dr-routine .dr-grip span::after { content:'⠿'; color:ButtonText; line-height:1; }
  .dr-routine [data-dr-zone][data-drop-state=ready] { outline-color:Highlight; }
}
