/* Chores: calm controls for adults, clear actions and personal progress for children. */
#chores .child-pistejahti-hero {display:block;min-height:0;background:linear-gradient(110deg,color-mix(in srgb,var(--child-color,#14847f) 12%,#fffdf7),#fffdf7);border:1px solid color-mix(in srgb,var(--child-color,#14847f) 40%,#dfd6c6);border-left:6px solid var(--child-color,#14847f);border-radius:24px;overflow:hidden}
#chores .child-pistejahti-copy {padding:24px;display:grid;grid-template-columns:minmax(0,1fr) minmax(240px,.8fr);column-gap:30px}
#chores .child-pistejahti-copy>header{display:none}
#chores .child-pistejahti-copy>.eyebrow,#chores .child-pistejahti-copy>h2,#chores .child-pistejahti-copy>p{grid-column:1}
#chores .child-pistejahti-copy>h2{font-size:clamp(1.5rem,2.3vw,2.1rem);line-height:1.15;margin:6px 0 10px}
#chores .child-pistejahti-target{grid-column:2;grid-row:1/4;align-self:center;margin:0}
#chores .child-pistejahti-stats{grid-column:1/-1;margin-top:16px}
#chores .child-chore-actions{margin-top:24px}
#chores .child-action-chore-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,280px),1fr))}
#chores .child-chore-progress-board{margin-top:24px;grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr))}
#chores .child-action-chore-card h3{overflow-wrap:anywhere}
#chores .child-action-done{min-height:48px}
.personal-points-chart,.school-child-progress{padding:24px;background:#fffdf7;border:1px solid #ded4c3;border-radius:22px;margin-top:24px;min-width:0}
.personal-points-chart header{display:flex;gap:18px;align-items:center;justify-content:space-between}
.personal-points-chart h3,.school-child-progress h3{font-family:Georgia,serif;font-size:1.5rem;margin:5px 0 10px}
.personal-points-chart header>strong{font-size:1.8rem;color:#176f70;white-space:nowrap}
.personal-points-chart header>strong small{font-size:.75rem;display:block;color:#62675d}
.personal-point-bars{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:10px;height:180px;margin-top:34px;border-bottom:1px solid #ded4c3;padding:0 0 25px}
.personal-point-bars>div{position:relative;height:100%;display:flex;align-items:end;justify-content:center}
.personal-point-bars>div>span{height:var(--bar-height);width:100%;max-width:42px;min-height:3px;background:#e0e7dc;border-radius:7px 7px 0 0;position:relative}
.personal-point-bars>div>span.has-points{background:linear-gradient(#42b6a1,#197875)}
.personal-point-bars b{position:absolute;bottom:100%;left:50%;transform:translateX(-50%);font-size:.7rem;padding-bottom:5px;color:#195e59}
.personal-point-bars small{position:absolute;top:100%;padding-top:8px;font-size:.65rem;white-space:nowrap}
.personal-points-chart details{margin-top:20px}.personal-points-chart summary,.school-rule-card summary{cursor:pointer;padding:10px 0;font-weight:700;min-height:44px}
.personal-points-chart ul,.school-child-progress ul{list-style:none;padding:0;margin:12px 0 0}.personal-points-chart li,.school-child-progress li{display:flex;gap:12px;align-items:baseline;padding:9px 0;border-bottom:1px solid #ece5d8;flex-wrap:wrap}.school-child-progress li>span{flex:1;min-width:0;overflow-wrap:anywhere}
.school-child-progress progress{width:100%;height:12px;accent-color:#19847d}
.school-child-tiers{display:flex;gap:8px;flex-wrap:wrap}.school-child-tiers span{padding:10px;border:1px solid #d7dacc;border-radius:10px}.school-child-tiers b{color:#176f70;margin-left:5px}
.school-bonus-settings{margin-top:0}.school-bonus-settings>header{max-width:760px}.school-bonus-settings h2{margin:6px 0 12px}.school-bonus-settings p{line-height:1.6}
.school-bonus-note{padding:15px 18px;border-radius:12px;background:#edf2e9;color:#45584c;font-size:.85rem}
.school-rule-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:18px;margin-top:22px}
.school-rule-card{border:1px solid #d7ccba;border-radius:18px;padding:22px;background:#fffdf8;min-width:0}
.school-rule-card header{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.school-rule-card h3{font-size:1.5rem;margin:5px 0;overflow-wrap:anywhere}
.school-rule-card label{display:flex;flex-direction:column;gap:7px;min-width:0;font-size:.875rem;font-weight:600}
.school-rule-card label.school-toggle,.school-rule-card legend label{flex-direction:row;align-items:center;min-height:44px}
.school-rule-card input[type=checkbox]{width:20px;height:20px;accent-color:#15756d;flex-shrink:0}
.school-rule-card input:not([type=checkbox]),.school-rule-card select{width:100%;min-width:0;box-sizing:border-box;min-height:44px;border:1px solid #cabcab;border-radius:9px;background:#fff;padding:10px;color:#252923;font-family:var(--font-body);font-size:16px;font-weight:400;line-height:1.45}
.school-rule-card fieldset{border:0;padding:12px 0;margin:0;min-width:0}.school-rule-card fieldset+fieldset{border-top:1px solid #ded4c3;margin-top:10px;padding-top:20px}.school-rule-card legend{font-weight:700;padding:0;max-width:100%}
.school-rule-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.school-grade-tier{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,.8fr) 44px;align-items:end;gap:8px;margin:10px 0}.school-grade-tier>span{padding-bottom:12px}.school-grade-tier>button{min-height:44px;padding:10px}
.school-rule-card footer{margin-top:14px}.school-rule-card footer button{max-width:100%;white-space:normal;min-height:44px}.school-rule-message{margin:8px 0 0;font-size:.85rem;color:#176f70}.school-rule-status{font-size:.85rem;color:#596358;overflow-wrap:anywhere}
#chores :is(button,summary,input,select):focus-visible{outline:3px solid #1b827b;outline-offset:3px}
@media(max-width:760px){#chores .child-pistejahti-copy{display:block;padding:18px}#chores .child-pistejahti-target{margin-top:16px}#chores .child-pistejahti-stats{gap:8px}#chores .child-pistejahti-stats article{padding:8px}#chores .child-pistejahti-stats strong{font-size:1.1rem}.personal-points-chart,.school-child-progress{padding:18px}.personal-points-chart header{align-items:start}.personal-points-chart h3{font-size:1.25rem}.personal-point-bars{gap:5px;height:150px}.personal-point-bars small{font-size:.55rem}.personal-point-bars>div:nth-child(even)>small{display:none}.school-rule-card{padding:16px}.school-grade-tier{gap:5px}.school-grade-tier label{font-size:.75rem}}
@media(prefers-reduced-motion:reduce){#chores *{animation:none!important;transition:none!important}}

@media(max-width:760px){
 #chores .child-pistejahti-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
 #chores .child-pistejahti-stats article{min-width:0;display:block;text-align:center}
 #chores .child-pistejahti-stats article>span{display:none}
 #chores .child-pistejahti-stats article>div>span{font-size:.65rem;line-height:1.3}
 #chores .reference-child-switcher{grid-template-columns:1fr}
 #chores .reference-greeting-card{min-width:0}
}
.school-bonus-note summary{font-weight:700;cursor:pointer;min-height:44px;display:list-item;padding:10px 0}
.school-bonus-note p{margin:8px 0}.school-bonus-note a{color:#176f70;text-decoration:underline}

/* Keep navigation stationary when changing panels; only overview owns the hero. */
#chorePanelToday > .chores-hero { margin-bottom: 22px; }
#chores .all-chore-panel-actions .chore-create-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-sizing: border-box; min-height: 52px; padding: 12px 18px;
  font-size: 1rem; font-weight: 750; line-height: 20px;
  background: #476f68; border-color: #476f68; color: #fffdf7;
}
#chores .all-chore-panel-actions .chore-create-button:hover { background: #365d56; border-color: #365d56; }
#chores .all-chores-panel > .panel-header { margin-bottom: 14px; }
.chore-create-plus { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; width: 26px; height: 26px; padding: 0; margin: 0; border-radius: 50%; background: rgba(255,255,255,.16); line-height: 0; }
.chore-create-plus svg { display: block; flex: none; width: 14px; height: 14px; }
.chore-create-label { display: block; padding: 0; margin: 0; line-height: 20px; }
.chore-expiry-field { padding-top: 18px; border-top: 1px solid var(--border, #dfd6c6); }
.chore-expiry-field > small { line-height: 1.55; color: #5b625a; }
.chore-expiry-field input { max-width: 100%; min-width: 0; box-sizing: border-box; }
.chore-expiry-label { display: block; margin-top: 8px; color: #596358; line-height: 1.4; }
@media (max-width: 600px) {
  #chores .all-chore-panel-actions { width: 100%; }
  #chores .all-chore-panel-actions .chore-create-button { width: 100%; }
}

/* One rewards topic at a time; keep each form beside its own content. */
.reward-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 0 16px; margin-bottom: 20px; border-bottom: 1px solid var(--line, #dfd6c6); }
.reward-tabs button { min-height: 46px; padding: 11px 18px; border: 1px solid #b6c7bf; border-radius: 10px; background: #f8faf5; color: #31534b; font: inherit; font-weight: 700; line-height: 1.35; cursor: pointer; }
.reward-tabs button[aria-selected="true"] { background: #476f68; border-color: #476f68; color: #fffdf7; }
.reward-tabs button:hover { border-color: #476f68; }
.reward-tab-panel[hidden] { display: none !important; }
.reward-tab-panel { min-width: 0; }
.reward-section-intro { margin: 0 0 18px; color: var(--muted, #62675d); line-height: 1.55; }
.reward-section-heading { margin-bottom: 20px; }
.reward-section-heading h3 { margin: 0 0 8px; font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.reward-section-heading p { margin: 0; color: var(--muted, #62675d); line-height: 1.55; }
#rewardWorkspace .reward-create-panel { min-width: 0; }
#rewardWorkspace .reward-create-panel h3 { font-size: 1.45rem; line-height: 1.2; }
#rewardWorkspace .reward-layout > * { min-width: 0; }
#rewardPanelAllowance .allowance-panel { margin-top: 0; }
#rewardPanelSettings .reward-mode-card { max-width: 800px; }
#rewardPanelStreaks .streak-bonus-head h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.2; }
@media (max-width: 1100px) {
  #rewardWorkspace .reward-layout { grid-template-columns: minmax(0, 1fr); }
  #rewardWorkspace .reward-create-panel { position: static; }
}
@media (max-width: 600px) {
  .reward-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .reward-tabs button { min-width: 0; padding: 11px 8px; font-size: .88rem; overflow-wrap: anywhere; }
  #rewardPanelSettings .reward-mode-card { grid-template-columns: minmax(0, 1fr); }
}

/* One reward, two equivalent inputs. Scoped above generic form rules. */
#choreForm .chore-points-field { max-width:760px; width:100%; padding:0; border:0; background:none; box-shadow:none; gap:16px; }
#choreForm .chore-reward-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; }
#choreForm .chore-reward-field { display:grid; gap:8px; min-width:0; }
#choreForm .chore-reward-field>label { display:block; font-size:15px; font-weight:700; color:var(--ink); margin:0; }
#choreForm .chore-points-control { display:grid; grid-template-columns:48px minmax(0,1fr) 48px; min-height:60px; border:1px solid var(--line); border-radius:12px; overflow:visible; background:var(--paper-strong,#fffdf7); }
#choreForm .chore-points-control button { width:48px; min-width:0; height:58px; min-height:44px; padding:0; border:0; border-radius:11px; box-shadow:none; font-size:26px; background:transparent; color:var(--teal); }
#choreForm .chore-points-control button:hover { background:color-mix(in srgb,var(--teal) 9%,transparent); }
#choreForm .chore-points-control input { width:100%; min-width:0; height:58px; min-height:0; padding:8px 4px; border:0; border-inline:1px solid var(--line); border-radius:0; box-shadow:none; background:transparent; font-family:inherit; font-size:24px; font-weight:700; text-align:center; appearance:textfield; }
#choreForm .chore-euros-control { display:flex; align-items:center; gap:8px; min-height:60px; border:1px solid var(--line); border-radius:12px; padding:0 18px; background:var(--paper-strong,#fffdf7); }
#choreForm .chore-euros-control input { width:100%; min-width:0; height:58px; min-height:0; padding:8px 0; border:0; box-shadow:none; background:transparent; font-family:inherit; font-size:24px; font-weight:700; text-align:left; }
#choreForm .chore-euros-control span { font-size:20px; color:var(--muted); }
#choreForm .chore-points-control:focus-within,#choreForm .chore-euros-control:focus-within { outline:2px solid var(--teal); outline-offset:3px; }
#choreForm .chore-points-control input:focus,#choreForm .chore-euros-control input:focus { outline:none; background:transparent; box-shadow:none; }
#choreForm .chore-point-presets { display:flex; flex-wrap:wrap; gap:8px; }
#choreForm .chore-point-presets button { min-height:44px; min-width:60px; padding:8px 14px; border-radius:10px; font-size:14px; box-shadow:none; }
#choreForm .chore-point-presets button.is-active { background:var(--teal); border-color:var(--teal); color:white; }
#choreForm .chore-reward-result { margin:0; padding:14px 16px; background:color-mix(in srgb,var(--teal) 7%,var(--paper-strong,#fffdf7)); border-radius:10px; color:var(--ink); font-size:16px; font-weight:700; overflow-wrap:anywhere; }
#choreForm .chore-reward-rate { margin:0; color:var(--muted); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
@media(max-width:600px) { #choreForm .chore-reward-fields { grid-template-columns:minmax(0,1fr); gap:16px; } }

/* Share the reminder form's Finnish date control and calendar picker. */
#choreForm .chore-date-input-row { width: min(100%, 328px); max-width: 100%; scroll-margin-block: 16px 110px; }
#choreForm .chore-date-input-row > input { width: 100%; min-width: 0; }
#choreForm .chore-date-input-row > .picker-trigger { width: 44px; padding: 0; }
#calendarPickerPanel.is-chore-picker { position: fixed; z-index: 120; right: auto; box-sizing: border-box; max-width: none; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
#calendarPickerPanel.is-chore-picker[hidden] { display: none; }
#calendarPickerPanel.is-chore-picker .calendar-picker-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }

/* Editable chores allow direct navigation without saving the draft. */
#choreForm .chore-wizard-progress li { padding:0; display:flex; }
#choreForm .chore-wizard-progress button { width:100%; min-width:0; min-height:48px; padding:10px; border:0; border-radius:6px 6px 0 0; background:transparent; box-shadow:none; color:inherit; font:inherit; text-align:left; white-space:normal; overflow-wrap:anywhere; display:block; }
#choreForm .chore-wizard-progress button:disabled { opacity:1; cursor:default; transform:none; }
#choreForm .chore-wizard-progress button:enabled { cursor:pointer; }
#choreForm .chore-wizard-progress button:enabled:hover { background:color-mix(in srgb,var(--teal) 9%,transparent); color:var(--teal); }
#choreForm .chore-wizard-progress button:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }

#choreForm .chore-points-only-choice { display:flex; align-items:center; gap:12px; padding:14px 16px; border:1px solid var(--line); border-radius:12px; background:var(--paper-strong,#fffdf7); cursor:pointer; }
#choreForm .chore-points-only-choice input { width:20px; height:20px; min-height:20px; flex:0 0 20px; margin:0; }
#choreForm .chore-points-only-choice span { display:grid; gap:4px; min-width:0; }
#choreForm .chore-points-only-choice strong { color:var(--ink); font-size:16px; }
#choreForm .chore-points-only-choice small { color:var(--muted); font-size:13px; line-height:1.5; font-weight:400; }
#choreForm .chore-points-only-choice:has(input:checked) { border-color:var(--teal); background:color-mix(in srgb,var(--teal) 7%,var(--paper-strong,#fffdf7)); }
#choreForm .chore-points-only-choice:focus-within { outline:2px solid var(--teal); outline-offset:2px; }
#choreForm .chore-reward-fields.is-points-only { grid-template-columns:minmax(0,1fr); max-width:368px; }

/* All bonus rules live under a single destination, with one type visible. */
.bonus-tab-panel[hidden] { display:none !important; }
.bonus-tab-panel, #bonusWorkspace .reward-layout > *, #bonusWorkspace .reward-create-panel { min-width:0; }
#bonusWorkspace .reward-create-panel h3 { font-size:1.45rem; line-height:1.2; }
#bonusWorkspace .streak-bonus-head h3 { font-size:clamp(1.4rem,2.4vw,2rem); line-height:1.2; }
#bonusWorkspace .school-rule-grid { grid-template-columns:minmax(0,1fr); }
#bonusWorkspace .school-bonus-settings > header h3 { font-size:1.7rem; margin:8px 0; }
#bonusWorkspace .school-rule-pair { grid-template-columns:minmax(0,1fr); }
#bonusWorkspace .school-grade-tier { grid-template-columns:minmax(0,1fr) 44px; padding:18px 0; border-top:1px solid var(--line); align-items:start; }
#bonusWorkspace .school-grade-tier > label { grid-column:1; max-width:220px; }
#bonusWorkspace .school-grade-tier > .bonus-amount { grid-column:1 / -1; grid-row:2; }
#bonusWorkspace .school-grade-tier > button { grid-column:2; grid-row:1; align-self:end; }
#bonusWorkspace .bonus-amount { display:block; min-width:0; width:100%; box-sizing:border-box; margin:12px 0; padding:16px; border:1px solid var(--line); border-radius:12px; background:rgba(255,253,247,.7); }
#bonusWorkspace .bonus-amount legend { font-weight:700; padding:0 6px; }
.bonus-amount-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
#bonusWorkspace .bonus-amount-field { display:grid; gap:8px; min-width:0; margin:0; font-size:.9rem; font-weight:700; }
.bonus-points-control { display:grid; grid-template-columns:42px minmax(0,1fr) 42px; min-height:52px; }
#bonusWorkspace .bonus-points-control input { border-radius:0; padding:8px 2px; text-align:center; font-size:1.2rem; font-weight:800; min-width:0; width:100%; appearance:textfield; }
.bonus-points-control input::-webkit-inner-spin-button { appearance:none; }
#bonusWorkspace .bonus-points-control button { min-width:0; min-height:48px; padding:8px; border:1px solid #b6c7bf; background:#e7eeea; color:#31534b; font-size:1.3rem; }
.bonus-points-control button:first-child { border-radius:10px 0 0 10px; }
.bonus-points-control button:last-child { border-radius:0 10px 10px 0; }
.bonus-euros-control { display:flex; align-items:center; min-width:0; border:1px solid var(--line); border-radius:10px; background:#fffaf0; }
#bonusWorkspace .bonus-euros-control input { min-width:0; width:100%; border:0; background:transparent; font-size:1.2rem; font-weight:800; box-shadow:none; }
.bonus-euros-control > span { padding:0 12px 0 0; font-weight:400; }
.bonus-amount-presets { display:flex; flex-wrap:wrap; gap:8px; margin:12px 0; }
#bonusWorkspace .bonus-amount-presets button { min-width:50px; min-height:42px; padding:8px 12px; }
#bonusWorkspace .bonus-amount-presets button.is-active { color:#fff; background:#476f68; }
.bonus-amount-summary { display:block; padding:12px; background:#edf0e6; border-radius:9px; font-weight:700; line-height:1.5; }
#bonusWorkspace .bonus-amount-note { margin:12px 0 0; color:var(--muted); font-size:.8rem; line-height:1.55; }
#bonusWorkspace #streakBonusAmount, #bonusWorkspace .streak-bonus-form > .bonus-amount { grid-column:1 / -1; min-width:0; }
@media(min-width:1200px) { #bonusWorkspace .school-rule-fields { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:26px; align-items:start; } }
@media(max-width:1100px) { #bonusWorkspace .reward-layout { grid-template-columns:minmax(0,1fr); } #bonusWorkspace .reward-create-panel { position:static; } }
@media(max-width:600px) { .bonus-amount-fields { grid-template-columns:minmax(0,1fr); gap:12px; } #bonusWorkspace .bonus-amount { padding:12px; } #bonusWorkspace .school-grade-tier label { font-size:.9rem; } .bonus-amount-presets { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(min-width:1101px) { #bonusWorkspace .reward-create-panel .bonus-amount-fields { grid-template-columns:minmax(0,1fr); } }

#bonusWorkspace .streak-bonus-card { grid-template-columns:minmax(0,1fr) minmax(110px,.4fr); }
#bonusWorkspace .streak-bonus-card > .bonus-amount { grid-column:1 / -1; }
@media(max-width:600px) { #bonusWorkspace .streak-bonus-card { grid-template-columns:minmax(0,1fr); } }


/* Optional chore artwork: a single shared, transparent 5 x 4 sprite atlas. */
.chore-picture { display: inline-block; width: 48px; height: 48px; flex: 0 0 auto; background-image: url("/assets/chore-icons-v1.webp"); background-size: 500% 400%; background-repeat: no-repeat; }
.chore-picture.is-default { background-image: url("/assets/chore-steps/basics.webp"); background-size: contain; background-position: center; }
.chore-token:has(.chore-picture) { background: transparent; border-radius: 0; }
.child-action-visual > .chore-picture { width: 110px; height: 110px; }
.chore-icon-picker { border: 1px solid var(--line, #d9cdbd); border-radius: 12px; background: #fffaf1; }
.chore-icon-picker > summary { display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; list-style: none; }
.chore-icon-picker > summary::-webkit-details-marker { display: none; }
.chore-icon-summary { display: grid; gap: 4px; min-width: 0; flex: 1; }
.chore-icon-summary small, .chore-icon-summary > span { color: var(--muted); font-size: 13px; font-weight: 400; }
.chore-icon-disclosure { font-size: 24px; transition: transform .15s; }
.chore-icon-picker[open] .chore-icon-disclosure { transform: rotate(180deg); }
.chore-icon-fieldset { min-width: 0; border: 0; padding: 12px 16px 16px; margin: 0; }
.chore-icon-fieldset legend { font-weight: 700; }
.chore-icon-fieldset p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.chore-icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.chore-icon-choice { position: relative; min-width: 0; cursor: pointer; }
.chore-icon-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chore-icon-tile { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; height: 100%; min-height: 118px; padding: 10px 6px; border: 2px solid transparent; border-radius: 10px; background: #fffefa; text-align: center; }
.chore-icon-tile .chore-picture { width: 64px; height: 64px; }
.chore-icon-tile > span:last-child { font-size: 12px; line-height: 1.35; font-weight: 600; overflow-wrap: anywhere; }
.chore-icon-choice input:checked + .chore-icon-tile { border-color: #28767b; background: #eaf3ee; }
.chore-icon-choice input:focus-visible + .chore-icon-tile, .chore-icon-picker > summary:focus-visible { outline: 3px solid #28767b; outline-offset: 3px; }
.chore-icon-choice:hover .chore-icon-tile { background: #edf3ee; }
@media (max-width: 480px) {
  .chore-icon-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .chore-icon-fieldset { padding: 10px; }
  .chore-icon-picker > summary { padding: 10px; gap: 10px; }
  .chore-icon-tile { padding: 8px 3px; min-height: 110px; }
  .chore-icon-tile .chore-picture { width: 56px; height: 56px; }
}

/* Keep review decisions together and allow long chore names to wrap. */
#choreApprovalList .chore-approval-card { grid-template-columns: minmax(0, 1fr) auto; }
#choreApprovalList .chore-approval-card > div { min-width: 0; overflow-wrap: anywhere; }
#choreApprovalList .chore-approval-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
#choreApprovalList .chore-approval-actions button { min-height: 44px; max-width: 100%; white-space: normal; }
.chore-approval-message:empty { display: none; }
@media (max-width: 600px) {
  #choreApprovalList .chore-approval-card { grid-template-columns: minmax(0, 1fr); }
  #choreApprovalList .chore-approval-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  #choreApprovalList .chore-approval-actions button { width: 100%; }
}

.chore-picture.is-dusting { background-image: url("/assets/chore-dusting-v1.webp"); background-size: contain; background-position: center; }

/* Give adult reviewers the same chore picture and instructions as the child. */
#choreApprovalList .chore-approval-details { display:flex; align-items:center; gap:20px; }
#choreApprovalList .chore-approval-picture { flex:0 0 auto; display:grid; place-items:center; width:88px; height:88px; }
#choreApprovalList .chore-approval-picture .chore-picture { width:88px; height:88px; }
#choreApprovalList .chore-approval-copy { min-width:0; }
#choreApprovalList .chore-approval-copy h3 { margin:0; font-size:1.15rem; line-height:1.35; }
#choreApprovalList .chore-approval-description { margin:8px 0; color:var(--muted); line-height:1.55; white-space:pre-line; overflow-wrap:anywhere; }
@media (max-width:600px) {
 #choreApprovalList .chore-approval-details { align-items:flex-start; gap:12px; }
 #choreApprovalList .chore-approval-picture, #choreApprovalList .chore-approval-picture .chore-picture { width:64px; height:64px; }
}

.chore-rule-editor { border:1px solid #d9d1bf; border-radius:.6rem; background:#fffdf8; min-width:0; }
.chore-rule-editor summary { cursor:pointer; padding:.85rem 1rem; overflow-wrap:anywhere; }
.chore-rule-editor summary span { margin-inline-start:.65rem; color:#46605b; font-size:.9rem; }
#chores [data-rule-home-fields] { grid-column:1/-1; display:grid; gap:.65rem; grid-template-columns:repeat(auto-fit,minmax(min(100%,13rem),1fr)); }
#chores [data-rule-home-fields] fieldset { min-width:0; }
#chores [data-rule-home-fields] fieldset label { display:inline-flex; align-items:center; gap:.45rem; margin-inline-end:.7rem; }
#chores [data-rule-home-fields] input[type=checkbox] { width:auto; }

#rewardPanelGoals .reward-layout { display:flex; flex-direction:column; gap:.8rem; }
#rewardPanelGoals .reward-main, #rewardPanelGoals .reward-create-panel { width:100%; min-width:0; }
#rewardPanelGoals .reward-create-panel { padding:.8rem 1rem; }
.reward-create-disclosure summary { cursor:pointer; font-weight:700; padding:.35rem 0; }
.reward-create-disclosure[open] form { margin-top:.8rem; }

#choreNavSummary { font-weight: 400; white-space: pre-line; line-height: 1.2; }

#choresTabs.chore-navigation {
  display: flex;
  flex-flow: row wrap;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  background: none;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
#choresTabs > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  flex: 1 0 auto;
  width: auto;
  min-width: max-content;
  min-height: 48px;
  padding: 6px 10px;
  white-space: nowrap;
  line-height: 1.25;
}
#choresTabs b {
  padding: .16em .45em;
  border-radius: .4rem;
  background: #f4e8ca;
  color: #56401b;
  font-variant-numeric: tabular-nums;
}
#choresTabs[hidden], #choresTabs > button[hidden], #choresTabs b:empty {
  display: none;
}
@media (max-width: 820px) {
  #choresTabs > button { flex-basis: calc((100% - 12px) / 3); }
}
@media (max-width: 560px) {
  #choresTabs > button { flex-basis: calc((100% - 6px) / 2); }
}
