.child-dashboard .coin-value { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; font-weight:650; }
.child-dashboard .coin-value .ui-icon { width:20px; height:20px; flex:none; }
.child-dashboard .dashboard-brand small .coin-value { font-size:15px; }
.child-dashboard .child-school { padding:24px; }
.child-school-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:18px; }
.child-school-heading h2 { margin:0; }
.child-school-caption,.child-help { font-size:13px; color:var(--muted); line-height:1.5; }
.child-help { margin:10px 0 0; }
.child-rules { padding:16px; background:var(--soft); border-radius:12px; margin-bottom:18px; }
.child-school h3 { margin:0 0 12px; font-size:18px; }
.child-rule-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.child-rule { display:flex; align-items:center; justify-content:center; gap:12px; padding:10px; background:var(--surface); border-radius:10px; color:var(--teal); }
.child-mark { display:inline-grid; place-items:center; width:38px; height:40px; border-radius:10px; background:var(--teal-soft); color:var(--teal); font-size:25px; font-weight:750; flex:none; }
.child-dashboard .is-negative { color:#a53c50; }
.child-rule.is-negative .child-mark { background:#faebe6; color:#a53c50; }
.child-period-filter { display:flex; align-items:end; gap:10px; max-width:500px; margin:0 0 18px; }
.child-period-filter label { min-width:0; flex:1; font-size:13px; }
.child-period-filter select { min-height:44px; font-size:14px; padding:10px; }
.child-period-filter button { display:grid; place-items:center; width:44px; min-height:44px; padding:10px; }
.child-period-filter .ui-icon { width:22px; height:22px; }
.child-grade-list { list-style:none; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:0; margin:0; }
.child-grade-card { display:grid; grid-template-columns:38px minmax(0,1fr) auto; gap:10px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:12px; }
.child-grade-subject { min-width:0; font-size:14px; }
.child-grade-subject small { display:block; margin-top:4px; font-size:12px; color:var(--muted); }
.child-grade-coins { text-align:right; color:var(--teal); font-size:14px; }
.child-grade-coins > small { display:block; font-size:11px; line-height:1.5; margin-top:4px; }
.child-grade-coins small .coin-value { font-size:11px; }
.child-grade-coins small .ui-icon { width:15px; height:15px; }
.child-period-links { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 18px; }
.child-period-links a { padding:8px 12px; border-radius:9px; border:1px solid var(--line); text-decoration:none; font-size:13px; }
.child-period-links a[aria-current] { background:var(--teal-soft); color:var(--teal); font-weight:700; }
.child-period-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.child-period-heading h3 { margin-bottom:4px; font-size:22px; }
.child-period-heading p { margin:0; color:var(--muted); font-size:13px; }
.child-period-state { padding:6px 10px; background:var(--teal-soft); color:var(--teal); font-size:12px; border-radius:8px; white-space:nowrap; }
.child-results-grid { display:grid; grid-template-columns:1.2fr 1fr; gap:14px; margin-bottom:14px; }
.child-result-card { padding:18px; border:1px solid var(--line); border-radius:12px; min-width:0; }
.child-result-card h3 { display:flex; align-items:center; gap:8px; }
.child-result-card h3 .ui-icon { width:22px; height:22px; }
.child-mark-counts { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:14px; }
.child-mark-counts > div { display:flex; align-items:center; justify-content:center; gap:8px; }
.child-mark-counts strong { font-size:22px; }
.child-mark-counts small { display:block; font-size:11px; color:var(--muted); font-weight:400; }
.child-balance-card { background:var(--teal-soft); }
.child-big-balance { font-size:38px; color:var(--teal); line-height:1.2; }
.child-big-balance .coin-value .ui-icon { width:32px; height:32px; }
.child-coin-flow dl { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:0; }
.child-coin-flow dl > div { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px; border-radius:8px; background:var(--soft); }
.child-coin-flow dt { font-size:13px; }
.child-coin-flow dd { margin:0; font-size:17px; }
.child-report-help { margin-top:16px; font-size:13px; }
.child-report-help summary { color:var(--teal); cursor:pointer; }
.child-report-help p { line-height:1.6; color:var(--muted); max-width:700px; }
.child-empty { text-align:center; padding:24px 12px; }
.child-empty .ui-picture { width:80px; height:80px; margin-bottom:14px; }
.child-empty p { max-width:450px; margin:8px auto; line-height:1.6; font-size:14px; }
.child-history-balance { padding:10px 14px; border-radius:10px; background:var(--teal-soft); color:var(--teal); }
.child-history-balance > small { display:block; font-size:11px; margin-bottom:3px; }
.child-history-balance > .coin-value { font-size:24px; }
.child-history-filter { display:grid; grid-template-columns:minmax(0,1fr) 44px 44px; align-items:end; gap:10px; max-width:580px; margin-bottom:20px; }
.child-history-filter > label { min-width:0; font-size:13px; }
.child-history-filter select,.child-history-filter input { min-width:0; font-size:14px; min-height:44px; padding:10px; }
.child-dashboard .child-filter-icon { display:grid; place-items:center; width:44px; min-height:44px; padding:10px; color:var(--teal); background:var(--surface); border:1px solid var(--line); border-radius:9px; text-decoration:none; }
.child-filter-icon .ui-icon { width:22px; height:22px; }
.child-filter-icon:focus-visible { outline:3px solid var(--teal); outline-offset:2px; }
.child-history-dates { grid-column:1 / -1; font-size:13px; }
.child-history-dates summary { color:var(--teal); cursor:pointer; }
.child-history-dates > div { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:10px; }
.child-history-dates label { min-width:0; font-size:13px; }
.child-history-day { margin-top:18px; }
.child-history-day > h3 { font-size:13px; color:var(--muted); margin-bottom:8px; }
.child-history-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:0; margin:0; list-style:none; }
.child-history-entry { display:grid; grid-template-columns:32px minmax(0,1fr) auto; gap:10px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:12px; color:var(--ink); }
.child-history-icon { display:grid; place-items:center; width:32px; height:32px; color:var(--teal); background:var(--teal-soft); border-radius:9px; }
.child-history-icon .subject-icon { width:20px; height:20px; margin:0; }
.child-history-icon .ui-icon { width:20px; height:20px; }
.child-history-text { min-width:0; }
.child-history-text strong { font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.child-history-text small { display:block; margin-top:4px; font-size:11px; line-height:1.5; color:var(--muted); }
.child-history-amount { font-size:16px; color:var(--teal); text-align:right; }
.child-history-entry.is-negative .child-history-amount { color:#a53c50; }
.child-history-entry.is-negative .child-history-icon { background:#faebe6; color:#a53c50; }
.child-history .child-empty > .ui-icon { width:64px; height:64px; margin-bottom:14px; }
.child-older-history { display:inline-block; margin-top:18px; font-size:14px; }
@media(max-width:900px) { .child-history-list { grid-template-columns:1fr; } }
@media(max-width:600px) {
  .child-history-balance { display:inline-block; margin-top:12px; }
  .child-history-entry { grid-template-columns:32px minmax(0,1fr); gap:4px 8px; padding:10px; }
  .child-history-icon { grid-column:1; grid-row:1 / 3; }
  .child-history-text { grid-column:2; grid-row:1; }
  .child-history-amount { grid-column:2; grid-row:2; text-align:left; font-size:14px; }
}
@media(max-width:900px) {
  .child-rule { gap:8px; }
  .child-grade-list { grid-template-columns:1fr; }
  .child-results-grid { grid-template-columns:1fr; }
  .child-coin-flow dl { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
  .child-dashboard .child-school { padding:16px; }
  .child-school-heading { display:block; }
  .child-school-caption { display:block; margin-top:5px; }
  .child-rule-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .child-rule { padding:8px; }
  .child-rules { padding:12px; }
  .child-period-heading { align-items:start; }
  .child-period-heading h3 { font-size:20px; }
  .child-result-card { padding:14px; }
  .child-mark-counts { gap:6px; }
  .child-mark-counts > div { flex-direction:column; gap:6px; }
  .child-mark-counts strong { font-size:20px; }
  .child-mark-counts small { display:inline; margin-left:3px; }
  .child-coin-flow dl { grid-template-columns:1fr; gap:6px; }
  .child-coin-flow dl > div { padding:8px 10px; }
  .child-grade-card { gap:8px; padding:10px; }
  .child-grade-subject .subject-label { align-items:flex-start; }
  .child-grade-card .child-mark { width:32px; height:36px; font-size:23px; }
  .child-grade-card { grid-template-columns:32px minmax(0,1fr) auto; }
  .child-grade-card > .child-mark { grid-column:1; grid-row:1 / 3; }
  .child-grade-subject,.child-grade-coins { display:contents; }
  .child-grade-subject > strong { grid-column:2 / -1; grid-row:1; }
  .child-grade-subject > small { grid-column:2; grid-row:2; margin:0; }
  .child-grade-coins > .coin-value { grid-column:3; grid-row:2; color:var(--teal); font-size:14px; }
  .child-grade-coins.is-negative > .coin-value { color:#a53c50; }
  .child-grade-coins > small { grid-column:2 / -1; grid-row:3; text-align:left; margin:0; color:var(--muted); }
}
