/* V2.4.5 chart-only rules. The parent v14 backgrounds/records/editor are left intact. */
body[data-page=category] .category-record-panel .summary-box.v245-summary-host {background:transparent}
body[data-page=category] .category-record-panel .summary-box{padding:6px 9px}
body[data-page=category] .summary-box>.summary-content{max-height:35dvh;overflow:auto;padding:4px 1px 9px}
@media (min-width:901px){body[data-page=category] .summary-box>.summary-content{max-height:36vh}}
.v245-card{position:relative;min-width:0;width:100%;padding:16px 12px 12px;border-radius:19px;background:rgba(255,253,250,var(--panel-alpha,.60));color:#514b48;font-family:"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;box-shadow:0 3px 12px rgba(95,85,69,.09);border:1px solid rgba(255,255,255,.75)}
.v245-card *{box-sizing:border-box}
.v245-card .chart-titlebar{display:flex;justify-content:space-between;align-items:center;gap:6px;flex-wrap:wrap}
.v245-card .chart-titlebar h3{margin:0;font-size:15px;font-weight:680;color:#514b48}
.v245-card .chart-titlebar span{font-size:10px;color:#9b8c7e}
.v245-card .chart-summary{font-size:11px;color:#766e65;min-height:25px;margin:8px 0 3px;line-height:1.65}
.v245-card .chart-summary strong{color:#675c52;font-size:14px}
.v245-card .chart-content{min-height:0;position:relative}
.v245-card .chart-footer{font-size:10px;color:#8b8077;line-height:1.55;border-top:1px solid #e9dfd5;margin-top:7px;padding-top:7px}
.v245-card .chart-svg{display:block;width:100%;height:auto;overflow:visible}
.v245-card .chart-svg text{font-family:"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;fill:#75695f}
.v245-card .metric-list{display:flex;gap:13px;flex-wrap:wrap;align-items:baseline}
.v245-card .metric-list small{font-size:10px;color:#81796f}
.v245-card .center-note{text-align:center;color:#91857d;font-size:12px;line-height:1.75;padding:45px 10px}
.v245-card .calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin-top:12px}
.v245-card .cal-head{text-align:center;font-size:10px;color:#948a7c;padding:5px 0}
.v245-card .cal-day{font-size:12px;min-height:38px;border-radius:10px;border:1px solid transparent;background:rgba(255,255,255,.42);color:#716960;display:flex;align-items:center;justify-content:center;position:relative;padding:2px;cursor:pointer}
.v245-card .cal-day:focus-visible{outline:2px solid #7e9b84}
.v245-card .cal-day .dots{position:absolute;bottom:3px;display:flex;gap:2px}
.v245-card .cal-day .dots i{width:3px;height:3px;background:#68947a;border-radius:50%;display:block}
.v245-card .mood-stage{height:370px;width:100%;position:relative;contain:layout;overflow:visible}
.v245-card .mood-bubble{position:absolute;display:block;background:none;border:0;padding:0;border-radius:50%;line-height:normal;cursor:help;transition:left .25s ease,top .25s ease,width .25s ease,height .25s ease}
.v245-card .mood-bubble img{width:100%;height:100%;object-fit:contain;display:block;filter:drop-shadow(0 3px 4px rgba(77,68,64,.08))}
.v245-card .mood-bubble:focus-visible{outline:2px solid #a79bb7;outline-offset:5px}
.v245-card .mood-full-empty{height:160px;display:grid;place-items:center;text-align:center;font-size:12px;color:#92877d}
.v245-card .plain-note{color:#8f8277;font-size:10px;line-height:1.7;margin:6px 0}
.mood-picker .mood-options img{display:block;width:min(100%,48px);height:auto;aspect-ratio:1;object-fit:contain;margin:auto}
.mood-picker .mood-options span{min-height:56px;display:flex;align-items:center;justify-content:center;padding:4px 1px}
.mood-picker .mood-options label{min-width:0}
.mood-picker .mood-options small{line-height:1.4;overflow-wrap:anywhere}
@media(max-width:600px){
 body[data-page=category] .summary-box>.summary-content{max-height:48dvh}
 .v245-card{padding:13px 8px 10px;border-radius:15px}
 .v245-card .mood-stage{height:350px}
 .v245-card .money-v242{display:grid;grid-template-columns:minmax(0,43%) minmax(0,1fr);gap:6px;align-items:center}
 .v245-card .money-v242 .donut-graphic{width:100%;max-width:none;min-width:0}
 .v245-card .money-v242 .money-table{width:100%;min-width:0}
 .v245-card .money-v242 .money-heading,.v245-card .money-v242 .money-row{grid-template-columns:8px minmax(26px,1fr) minmax(51px,auto) 34px;column-gap:2px;font-size:9px}
 .v245-card .money-v242 .money-heading{grid-template-columns:minmax(26px,1fr) minmax(51px,auto) 34px;padding-left:10px;font-size:9px}
 .v245-card .money-v242 .money-row strong,.v245-card .money-v242 .money-percent{font-size:9px}
 .v245-card .money-v242 .money-dot{width:8px;height:8px}
 .v245-card .money-v242 .donut-graphic .money-percent-label{font-size:14px}
}

/* Scoped, approved V2.4.5 chart rules (test control/scene rules omitted). */
.v245-card .chart-titlebar{position:relative;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:5px;z-index:1}
.v245-card .chart-titlebar h3{font-size:17px;font-weight:680;margin:0}
.v245-card .chart-titlebar span{font-size:11px;color:#9b8c7e}
.v245-card .chart-summary{font-size:12px;color:#766e65;min-height:30px;margin:10px 0 2px;position:relative;z-index:1;line-height:1.7}
.v245-card .chart-summary strong{color:#675c52;font-size:15px}
.v245-card .chart-content{min-height:305px;position:relative;z-index:1}
.v245-card .chart-footer{font-size:11px;color:#8b8077;line-height:1.65;border-top:1px solid #e9dfd5;padding-top:10px;margin-top:8px;position:relative;z-index:1}
.v245-card .metric-list{display:flex;gap:13px;align-items:baseline;flex-wrap:wrap}
.v245-card .metric-list strong{font-size:16px}
.v245-card .metric-list small{font-size:11px;color:#81796f}
.v245-card .chart-svg{display:block;width:100%;height:auto;overflow:visible}
.v245-card .chart-svg text{font-family:"Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;fill:#75695f}
.v245-card .center-note{text-align:center;color:#91857d;font-size:12px;line-height:1.75;padding:92px 15px}
.v245-card .donut-layout{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap;padding:13px 0}
.v245-card .donut-graphic{width:220px;flex:0 0 220px}
.v245-card .donut-legend{flex:1;min-width:205px;max-width:330px;display:flex;flex-direction:column;gap:9px}
.v245-card .donut-legend .legend-entry{padding:0 1px}
.v245-card .donut-legend .key{font-size:12px}
.v245-card .calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin-top:12px}
.v245-card .cal-head{text-align:center;font-size:10px;color:#948a7c;padding:5px 0}
.v245-card .cal-day{font-size:12px;min-height:45px;border-radius:10px;border:1px solid transparent;background:rgba(255,255,255,.42);color:#716960;display:flex;align-items:center;justify-content:center;position:relative}
.v245-card .cal-day:not(.cal-pad){cursor:pointer}
.v245-card .cal-day:focus-visible{outline:2px solid #7e9b84}
.v245-card .cal-day.has-entry{background:#b7d2bc80;border-color:#9dbba685;color:#4e715c;font-weight:750}
.v245-card .cal-day.pending-only{background:#faf4e8;border:1px dashed #c4ab89;color:#8b7968}
.v245-card .cal-day.selected{outline:2px solid #7ca08b;outline-offset:0}
.v245-card .cal-day .dots{position:absolute;bottom:3px;display:flex;gap:2px}
.v245-card .cal-day .dots i{width:3px;height:3px;background:#68947a;border-radius:50%;display:block}
.v245-card .cal-pad{background:transparent;pointer-events:none}
.v245-card .stat-chips{display:flex;gap:10px 20px;flex-wrap:wrap;padding:10px 0;color:#657b68;font-size:11px}
.v245-card .stat-chips strong{font-size:17px;color:#5f7966}
.v245-card .mood-stage{width:100%;height:320px;position:relative;contain:layout}
.v245-card .mood-bubble{position:absolute;border-radius:50%;line-height:0;transition:left .3s ease,top .3s ease,width .3s ease,height .3s ease}
.v245-card .mood-bubble img{width:100%;height:100%;object-fit:contain;display:block;filter:drop-shadow(0 3px 5px rgba(89,78,65,.08))}
.v245-card .sleep-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;margin-top:10px}
.v245-card .sleep-label{text-align:center;font-size:10px;color:#877d75}
.v245-card .sleep-tally{font-size:10px;text-align:center;color:#6e799a;font-weight:600;margin-top:3px}
.v245-card .sleep-quality{text-align:center;font-size:11px;margin-top:4px}
.v245-card .study-chart-wrap{padding-top:9px}
.v245-card .small-data{font-size:10px;fill:#988e81}
.v245-card .plain-note{color:#8f8277;font-size:11px;line-height:1.7;margin:6px 0}
.v245-card .mood-full-empty{height:290px;display:grid;place-items:center;text-align:center;font-size:13px;color:#92877d}
@media (max-width:1040px){
.v245-card .donut-graphic{width:175px;flex-basis:175px}
.v245-card .donut-legend{min-width:160px}
}
@media (max-width:470px){
.v245-card .chart-titlebar h3{font-size:15px}
.v245-card .chart-content{min-height:270px}
.v245-card .donut-graphic{width:175px;flex-basis:175px}
.v245-card .donut-legend{flex-basis:100%;max-width:none}
.v245-card .mood-stage{height:280px}
.v245-card .cal-day{min-height:38px}
}
@media (max-width:470px){
.v245-card .donut-layout{flex-direction:column;gap:8px}
.v245-card .donut-graphic{width:min(195px,90%);flex:0 0 auto}
.v245-card .donut-legend{min-width:0;width:100%;max-width:none;gap:7px}
.v245-card .chart-summary strong{font-size:14px}
.v245-card .mood-stage{height:275px}
}
.v245-card .money-v242{align-items:center;gap:12px;flex-wrap:nowrap;justify-content:space-between}
.v245-card .money-v242 .donut-graphic{width:clamp(165px,43%,248px);flex:0 1 248px;min-width:0;overflow:visible}
.v245-card .money-v242 .donut-graphic text{font-variant-numeric:tabular-nums}
.v245-card .money-table{min-width:0;flex:1;display:flex;flex-direction:column;gap:5px;font-size:11px}
.v245-card .money-heading, .v245-card .money-row{display:grid;grid-template-columns:11px minmax(36px,1fr) minmax(70px,auto) 46px;gap:5px;align-items:center;text-align:left;font-variant-numeric:tabular-nums}
.v245-card .money-heading{grid-template-columns:minmax(36px,1fr) minmax(70px,auto) 46px;padding-left:16px;color:#8c7d70;font-size:10px;border-bottom:1px solid #dfd7cf;padding-bottom:5px;margin-bottom:3px}
.v245-card .money-heading span:nth-child(2), .v245-card .money-heading span:nth-child(3){text-align:right}
.v245-card .money-row strong{font-size:10.5px;font-weight:650;white-space:nowrap;text-align:right}
.v245-card .money-percent{text-align:right;color:#71665e;font-size:10.5px;white-space:nowrap}
.v245-card .money-dot{display:block;border-radius:50%;width:10px;height:10px}
.v245-card .money-zero{opacity:.52}
.v245-card .exercise-total{justify-content:center;display:flex;margin:6px 0 13px}
.v245-card .exercise-total small{display:inline-block;margin-left:6px}
.v245-card .exercise-calendar .cal-day.has-entry{background:#bddcc1;border-color:#95b9a0;color:#3f7253}
.v245-card .exercise-calendar .cal-day.pending-only{background:#f9ecc4;border:1px dashed #d2b97d;color:#867147}
.v245-card .exercise-calendar .cal-day:not(.has-entry):not(.pending-only){background:rgba(255,255,255,.6)}
.v245-card .study-chart-wrap{width:100%}
.v245-card .sleep-dot-svg{max-width:100%;height:auto}
.v245-card .sleep-dot-svg text{font-variant-numeric:tabular-nums}
.v245-card .sleep-avg-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;width:100%}
.v245-card .sleep-avg-pair>div{background:rgba(255,255,255,.42);border:1px solid rgba(223,217,210,.65);border-radius:12px;padding:8px 9px;display:flex;flex-direction:column;gap:5px}
.v245-card .sleep-avg-pair small{color:#807a74;font-size:10px}
.v245-card .sleep-avg-pair strong{font-size:14px;font-variant-numeric:tabular-nums;white-space:nowrap}
.v245-card .mood-stage{height:370px;overflow:visible}
.v245-card .mood-bubble{position:absolute;display:block;border:0;padding:0;background:none;border-radius:50%;color:#514b48;line-height:normal;cursor:help;transition:left .25s ease,top .25s ease,width .25s ease,height .25s ease}
.v245-card .mood-bubble:focus-visible{outline:2px solid #a79bb7;outline-offset:5px}
.v245-card .mood-bubble img{width:100%;height:100%;object-fit:contain;display:block;filter:drop-shadow(0 3px 4px rgba(77,68,64,.08))}
.v245-card .mood-bubble-name{position:absolute;top:calc(100% + 3px);left:50%;transform:translateX(-50%);white-space:nowrap;display:block;border-radius:8px;padding:2px 5px;background:rgba(255,255,255,.72);color:#574d49;font-size:10px;line-height:1.5;font-weight:650;box-shadow:0 1px 3px #877b7210}
.v245-card .mood-bubble-pct{position:absolute;left:50%;top:77%;transform:translate(-50%,-50%);font-weight:800;font-variant-numeric:tabular-nums;font-size:clamp(8px,.95vw,11px);white-space:nowrap;color:#685452;text-shadow:0 1px 2px #fffc;border-radius:9px;background:rgba(255,255,255,.66);padding:1px 4px}
.v245-card .mood-bubble-pct.outside{top:calc(100% + 22px);font-size:9px;background:rgba(255,255,255,.75)}
@media (max-width:1040px){
.v245-card .money-v242{flex-wrap:wrap}
.v245-card .money-v242 .donut-graphic{width:210px;flex:0 1 210px}
.v245-card .money-table{min-width:min(230px,100%);flex:1}
}
@media (max-width:470px){
.v245-card .money-v242{flex-direction:column;gap:10px}
.v245-card .money-v242 .donut-graphic{width:min(220px,96%);flex:0 0 auto}
.v245-card .money-table{width:100%;min-width:0}
.v245-card .mood-stage{height:345px}
.v245-card .mood-bubble-name{font-size:9px}
.v245-card .sleep-avg-pair{gap:5px}
.v245-card .sleep-avg-pair>div{padding:6px}
.v245-card .sleep-avg-pair strong{font-size:11px}
}
@media (max-width:470px){
.v245-card .chart-content .mood-stage{height:350px}
}
.v245-card .sleep-dot-svg text{font-weight:600}
.v245-card .money-v242{
  display:grid;
  grid-template-columns:minmax(0,240px) minmax(0,1fr);
  gap:clamp(7px,1.4vw,13px);
  align-items:center;
  justify-content:center;
  padding:7px 0 10px;
}
.v245-card .money-v242 .donut-graphic{width:100%;max-width:240px;min-width:0;flex:none;overflow:visible}
.v245-card .money-v242 .money-table{min-width:0;width:100%;max-width:none;flex:none;gap:5px}
.v245-card .money-v242 .money-heading, .v245-card .money-v242 .money-row{grid-template-columns:11px minmax(40px,1fr) minmax(64px,auto) 44px;column-gap:4px}
.v245-card .money-v242 .money-heading{grid-template-columns:minmax(40px,1fr) minmax(64px,auto) 44px;padding-left:15px}
.v245-card .study-calendar .cal-day.has-entry{background:#bddcc1;border-color:#95b9a0;color:#3f7253}
.v245-card .mood-bubble-name{display:none!important}
.v245-card .mood-bubble .mood-bubble-pct, .v245-card .mood-bubble .mood-bubble-pct.outside{
  top:calc(100% + 11px);
  left:50%;transform:translateX(-50%);
  color:#615353;
  padding:2px 5px;
  font-size:11px;
  line-height:1.3;
  background:rgba(255,255,255,.82);
  border:1px solid rgba(255,255,255,.73);
  box-shadow:0 1px 3px rgba(93,77,77,.07);
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
  text-shadow:none;
}
@media (max-width:1040px){
.v245-card .money-v242{display:grid;grid-template-columns:minmax(0,190px) minmax(0,1fr);gap:8px}
.v245-card .money-v242 .donut-graphic{width:100%;max-width:190px;flex:none}
.v245-card .money-v242 .money-table{min-width:0;flex:none}
}
@media (max-width:470px){
.v245-card .money-v242{display:grid;grid-template-columns:minmax(0,43%) minmax(0,1fr);gap:6px;flex-direction:initial;align-items:center}
.v245-card .money-v242 .donut-graphic{width:100%;max-width:none;flex:none}
.v245-card .money-v242 .money-table{min-width:0;width:100%;gap:4px}
.v245-card .money-v242 .money-heading, .v245-card .money-v242 .money-row{grid-template-columns:8px minmax(26px,1fr) minmax(51px,auto) 34px;column-gap:2px;font-size:9px}
.v245-card .money-v242 .money-heading{grid-template-columns:minmax(26px,1fr) minmax(51px,auto) 34px;padding-left:10px;font-size:9px}
.v245-card .money-v242 .money-row strong, .v245-card .money-v242 .money-percent{font-size:9px}
.v245-card .money-v242 .money-dot{width:8px;height:8px}
.v245-card .money-v242 .donut-graphic .money-percent-label{font-size:14px}
.v245-card .mood-bubble .mood-bubble-pct{font-size:10px}
}
.v245-card .mood-bubble .mood-bubble-pct, .v245-card .mood-bubble .mood-bubble-pct.outside{
  top:calc(100% + 11px);
  left:50%;
  transform:translateX(-50%);
  display:block;
  background:none;
  border:none;
  border-radius:0;
  box-shadow:none;
  padding:0;
  color:#554647;
  font-size:11px;
  font-weight:750;
  line-height:1.3;
  text-shadow:0 1px 2px rgba(255,255,255,.95), 0 0 3px rgba(255,255,255,.8);
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
@media (max-width:470px){
.v245-card .mood-bubble .mood-bubble-pct{font-size:10px}
}
/* Keep final approved phone two-column format even when studio also has narrower breakpoints. */
@media(max-width:600px){
.v245-card .money-v242{display:grid;grid-template-columns:minmax(0,43%) minmax(0,1fr);gap:6px;align-items:center}
.v245-card .money-v242 .donut-graphic{width:100%;max-width:none;min-width:0}
.v245-card .money-v242 .money-table{width:100%;min-width:0;gap:4px}
.v245-card .money-v242 .money-heading,.v245-card .money-v242 .money-row{grid-template-columns:8px minmax(26px,1fr) minmax(51px,auto) 34px;column-gap:2px;font-size:9px}
.v245-card .money-v242 .money-heading{grid-template-columns:minmax(26px,1fr) minmax(51px,auto) 34px;padding-left:10px;font-size:9px}
.v245-card .money-v242 .money-row strong,.v245-card .money-v242 .money-percent{font-size:9px}
.v245-card .money-v242 .donut-graphic .money-percent-label{font-size:14px}
}
/* Readable sleep dots: native layout, independent text size on every screen. */
.v245-card .sleep-dot-grid{display:grid;grid-template-columns:22px repeat(7,minmax(0,1fr));grid-template-rows:repeat(12,minmax(0,1fr)) 18px 28px;align-items:center;justify-items:center;width:100%;height:310px;min-height:0;flex:1 1 0;color:#615c58;font-size:11px;line-height:1.2}
.v245-card .sleep-hour{font-size:10px;color:#6e7c98}
.v245-card .sleep-hour-dot{display:block;width:13px;height:13px;border-radius:50%;background:#415b7b}
.v245-card .sleep-day-duration{font-size:10px;font-weight:650;white-space:nowrap}
.v245-card .sleep-day-date{text-align:center;font-size:10px;white-space:nowrap}
.v245-card .sleep-day-date b{display:block;font-size:11px;color:#b49359;font-weight:400}
@media(min-width:901px){
 body[data-page="category"] .v245-sleep .sleep-dot-grid{height:100%;grid-template-rows:repeat(12,minmax(0,1fr)) 15px 24px}
 body[data-page="category"] .v245-sleep .sleep-hour-dot{width:clamp(10px,1.5dvh,13px);height:clamp(10px,1.5dvh,13px)}
}
