/* Focused UX study: coordinated notifications, restyled ring and compact period.
 * Data is readable without hover; no animated amounts or background motion. */
.category-panel .chd { align-items: flex-start; margin-bottom: 20px; }
.category-panel .ct { max-width: 70%; }
.category-panel .cp { white-space: normal; text-align: right; }
.category-caption { display: block; font-size: 12px; font-weight: 600; color: #4e617b; }
#categoryTotal { display: block; font: 800 clamp(17px, 1.5vw, 21px)/1.45 var(--heading); color: #173e6a; letter-spacing: -.7px; overflow-wrap: anywhere; }
.category-count { font-size: 11px; font-weight: 600; color: #53677f; }
.category-help { font-size: 12px; color: #53677f; line-height: 1.6; margin: 14px 0 6px; }
.category-ring { position: relative; width: min(224px,100%); aspect-ratio: 1; margin: 4px auto 20px; }
.category-ring canvas { display: block; width: 100%; height: 100%; }
.category-ring-center { position: absolute; inset: 20%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; text-align: center; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, #edf3fb55, transparent 70%); }
.category-ring.is-empty::before { content: ''; position: absolute; inset: 3%; border: 16px solid #e7edf5; border-radius: 50%; }
.category-legend { list-style: none; max-height: 245px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 4px 0 0; border-radius: 6px; }
.category-legend:empty { display: none; }
.category-legend:focus-visible { outline: 2px solid #265bc1; outline-offset: 4px; }
.category-row { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #e3eaf4; }
.category-row:last-child { border-bottom: 0; }
.category-dot { width: 8px; height: 8px; border-radius: 50%; }
.category-name { font-size: 13px; font-weight: 650; color: #304b6b; overflow-wrap: anywhere; }
.category-amount { font-size: 13px; font-weight: 750; color: #173e6a; font-variant-numeric: tabular-nums; }
.category-row-values { display: flex; flex-direction: column; text-align: right; }
.category-percent { min-width: 49px; text-align: right; font-size: 11px; font-weight: 650; color: #4a6282; font-variant-numeric: tabular-nums; }
.category-empty { padding: 25px 0 12px; color: #53677f; font-size: 14px; }
#toast.toast {
  --notice-accent: #12664c;
  --notice-tint: #e3f3ed;
  width: min(440px, calc(100vw - 48px));
  grid-template-columns: 40px minmax(0,1fr) 44px;
  gap: 12px;
  padding: 18px 10px 18px 20px;
  background: #fcfdff;
  border: 1px solid #b7c9df;
  border-left: 4px solid var(--notice-accent);
  border-radius: 16px;
  box-shadow: 0 14px 40px #1b35582b, 0 3px 10px #1b355810;
  color: #182a44;
}
#toast.toast.err { --notice-accent: #a6284b; --notice-tint: #fce9ef; background: #fcfdff; border-color: #c6b6c8; border-left-color: var(--notice-accent); }
#toast .toast-icon { width: 40px; height: 40px; border: 1px solid #12664c30; border-radius: 13px; background: var(--notice-tint); color: var(--notice-accent); }
#toast.err .toast-icon { border-color: #a6284b30; }
#toast .toast-title { color: #203a59; font: 750 14px/1.4 var(--heading); letter-spacing: -.1px; margin-bottom: 5px; }
#toast #tMsg { color: #405872; font: 500 13px/1.65 var(--ff); }
#toast .toast-close { width: 44px; height: 44px; color: #536d8c; border-radius: 12px; margin-top: -4px; }
#toast .toast-close:hover { color: #203a59; background: #e9f0fa; }
#toast .toast-close:focus-visible { outline-color: #265bc1; }
@media(max-width:760px) {
  #toast.toast { width: auto; left: 12px; right: 12px; padding: 15px 8px 15px 14px; gap: 9px; grid-template-columns: 36px minmax(0,1fr) 44px; }
  #toast .toast-icon { width: 36px; height: 36px; border-radius: 11px; }
  .category-panel .ct { max-width: 65%; }
  #categoryTotal { font-size: 19px; }
  .category-legend { max-height: 280px; }
}
@media(max-width:360px) {
  .category-amount { font-size: 13px; }
}
/* Replace the long desktop strip with one labelled native month picker. */
.compact-period .month-seg { display: none; }
#compactMonth { width: 132px; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #95acc9; border-radius: 10px; background: #fff; color: #203a59; font: 600 13px var(--ff); }
@media(min-width:761px) {
  .topbar { padding-block: 20px; gap: 14px; }
  .compact-period { gap: 9px; flex-wrap: nowrap; }
  .compact-period .add-btn { padding-inline: 13px; }
}
/* Static geometric shadows: concentric arcs and a very soft diagonal grid. */
.main {
  background-color: #edf1f6;
  background-image:
    radial-gradient(circle at 103% 17%, transparent 0 194px, #2c63a512 195px 197px, transparent 198px 245px, #2c63a50b 246px 248px, transparent 249px),
    radial-gradient(circle at -7% 82%, transparent 0 160px, #397d8a0e 161px 163px, transparent 164px 213px, #397d8a09 214px 216px, transparent 217px),
    radial-gradient(ellipse at 100% 0%, #a8c5e54a, transparent 48%),
    repeating-linear-gradient(135deg, transparent 0 139px, #34598708 139px 140px);
}
@media(max-width:760px) { #compactMonth { display: none; } }
