.chore-maker { margin: 1.4rem 0 2rem; padding: clamp(16px, 4vw, 32px); border: 2px solid var(--line); border-radius: 24px; background: var(--grad-soft); scroll-margin-top: 100px; }
.chore-maker fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.chore-maker legend { padding: 0; font-weight: 800; }
.chore-maker-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.chore-maker-controls > label { display: grid; gap: 8px; font-weight: 800; }
.chore-maker input[type=text], .chore-maker select { width: 100%; min-width: 0; min-height: 48px; padding: 10px; border: 2px solid #b9a1cc; border-radius: 12px; color: var(--ink); background: white; font: inherit; }
.chore-maker :focus-visible { outline: 3px solid #7141a0; outline-offset: 3px; }
.chore-maker-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.chore-maker-choice legend { width: 100%; margin-bottom: 8px; }
.chore-maker-choice label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; background: white; border: 2px solid #e6ddff; border-radius: 999px; font-weight: 700; cursor: pointer; }
.chore-maker-choice label:has(input:checked) { border-color: #7141a0; }
.chore-maker-choice input { width: 20px; height: 20px; margin: 0; accent-color: #7141a0; }
.chore-maker-chores { margin-bottom: 20px; }
.chore-maker-chores legend { margin-bottom: 4px; }
.chore-maker .chore-maker-list { display: grid; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
.chore-maker .chore-maker-row { margin: 0; }
.chore-maker-row, .chore-maker-add { display: flex; gap: 8px; align-items: center; }
.chore-maker-row input, .chore-maker-add input { flex: 1 1 auto; }
.chore-maker-remove { flex-shrink: 0; min-width: 44px; min-height: 44px; padding: 8px 14px; border: 2px solid #e6ddff; border-radius: 999px; background: white; color: var(--purple); font: inherit; font-weight: 700; cursor: pointer; }
.chore-maker-add .btn { flex-shrink: 0; min-height: 44px; }
.chore-maker-add .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.chore-maker-hint { color: var(--ink-soft); font-size: 0.95rem; }
.chore-maker-actions p { margin: 10px 0 0; }
.chore-maker-actions #chore-maker-status:empty, .chore-maker-actions #chore-maker-note:empty { display: none; }
.chore-maker-preview { margin-top: 24px; }
.chore-maker-preview-label { margin: 0 0 8px; font-weight: 800; }
.chart-sheet { padding: clamp(12px, 3vw, 28px); background: white; color: #222; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 6px 18px rgba(59, 42, 82, 0.12); aspect-ratio: 8.5 / 11; overflow: hidden; }
.chart-sheet[data-paper=a4] { aspect-ratio: 210 / 297; }
.chart-head { margin-bottom: 12px; }
.chore-maker .chart-title { margin: 0 0 8px; font-family: "Fredoka", "Nunito", sans-serif; font-size: clamp(1.2rem, 4vw, 1.7rem); font-weight: 600; color: #222; }
.chart-lines { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.chore-maker .chart-line { display: flex; flex: 1 1 180px; align-items: baseline; gap: 6px; margin: 0; font-weight: 700; }
.chart-line-label { flex-shrink: 0; }
.chart-line-value { flex: 1; border-bottom: 1.5px solid #444; overflow-wrap: anywhere; }
.chart-line-blank { flex: 1; min-width: 80px; height: 1.1em; border-bottom: 1.5px solid #444; }
.chore-maker .chart-table { width: 100%; margin: 0; border-collapse: collapse; table-layout: fixed; font-size: clamp(0.7rem, 2.4vw, 0.95rem); }
.chore-maker .chart-table th, .chore-maker .chart-table td { border: 1.5px solid #444; padding: 4px; background: white; font-family: inherit; text-align: center; vertical-align: middle; }
.chore-maker .chart-table thead th { background: #f3f3f3; font-weight: 800; }
.chore-maker .chart-table thead th:first-child, .chore-maker .chart-table tbody th { text-align: left; }
.chore-maker .chart-table tbody th { font-weight: 600; overflow-wrap: anywhere; }
.chart-sheet[data-layout=weekly] .chart-table thead th:first-child { width: 32%; }
.chart-sheet[data-layout=daily] .chart-table thead th:last-child { width: 22%; }
.chart-table svg { display: block; width: min(80%, 26px); height: auto; margin: 0 auto; fill: none; stroke: #444; stroke-width: 1.5; stroke-linejoin: round; }
.chart-day-short { display: none; }
.chart-box { display: block; width: 22px; height: 22px; margin: 0 auto; border: 2px solid #444; border-radius: 4px; }
.chore-maker .chart-foot, .chore-maker .chart-empty { margin: 10px 0 0; color: #555; font-size: 0.8rem; text-align: center; }
@media (max-width: 600px) { .chore-maker-controls { grid-template-columns: 1fr; } .chart-sheet { aspect-ratio: auto; } .chore-maker .chart-table th, .chore-maker .chart-table td { padding: 3px 1px; } .chore-maker .chart-table tbody th { padding-left: 3px; }
  .chart-day-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; } .chart-day-short { display: inline; }
  .chore-maker-remove { padding: 8px 10px; } }

@page chore-chart-letter { size: letter portrait; margin: 12mm; }
@page chore-chart-a4 { size: A4 portrait; margin: 12mm; }
@media print {
 /* Only while the Print my chart button is printing; printing the guide normally is unchanged. */
 html.chore-chart-printing body { background: white !important; padding-top: 0 !important; margin: 0 !important; }
 html.chore-chart-printing body > :not(main), html.chore-chart-printing main > :not(article), html.chore-chart-printing article.guide > .container > :not(.chore-maker),
 html.chore-chart-printing .chore-maker > :not(#chore-maker-app), html.chore-chart-printing #chore-maker-app > :not(.chore-maker-preview), html.chore-chart-printing .chore-maker-preview > :not(.chart-sheet) { display: none !important; }
 html.chore-chart-printing article.guide, html.chore-chart-printing article.guide > .container, html.chore-chart-printing main, html.chore-chart-printing .chore-maker, html.chore-chart-printing .chore-maker-preview { margin: 0 !important; padding: 0 !important; border: 0 !important; background: white !important; box-shadow: none !important; max-width: none !important; }
 html.chore-chart-printing .chart-sheet { page: chore-chart-letter; aspect-ratio: auto; overflow: visible; padding: 0 1mm; border: 0; border-radius: 0; box-shadow: none; color: black; font-family: "Nunito", Arial, sans-serif; }
 html.chore-chart-printing .chart-sheet[data-paper=a4] { page: chore-chart-a4; }
 html.chore-chart-printing .chart-head { margin-bottom: 6mm; }
 html.chore-chart-printing .chart-title { font-size: 24pt; margin-bottom: 4mm; color: black; }
 html.chore-chart-printing .chart-line { font-size: 14pt; flex-basis: 70mm; }
 html.chore-chart-printing .chart-line-value, html.chore-chart-printing .chart-line-blank { border-bottom-color: black; }
 html.chore-chart-printing .chart-table { font-size: 12pt; }
 html.chore-chart-printing .chore-maker .chart-table th, html.chore-chart-printing .chore-maker .chart-table td { border-color: black; padding: 1.5mm 2mm; background: white; }
 html.chore-chart-printing .chart-table thead th { height: 9mm; }
 html.chore-chart-printing .chart-sheet[data-layout=weekly] tbody tr { height: 19mm; }
 html.chore-chart-printing .chart-sheet[data-layout=daily] tbody tr { height: 15.5mm; }
 html.chore-chart-printing .chart-table svg { width: 11mm; stroke: black; }
 html.chore-chart-printing .chart-box { width: 9mm; height: 9mm; border-color: black; }
 html.chore-chart-printing .chart-table tr { break-inside: avoid; }
 html.chore-chart-printing .chart-day-long { position: static; width: auto; height: auto; overflow: visible; clip: auto; } html.chore-chart-printing .chart-day-short { display: none; }
 html.chore-chart-printing .chart-foot { margin-top: 4mm; font-size: 9pt; color: #333; }
}
