/* Scoped V0.9 changes; preserve all existing screens and mobile navigation. */
[hidden] { display:none !important; }
#oauth-reauth { margin:18px 0; padding:16px; border:1px solid #cfdaea; border-radius:14px; background:#f4f7fc; }
#oauth-reauth form { display:grid; gap:12px; margin-bottom:12px; }
#oauth-reauth input { width:100%; }
@media(min-width:901px) {
  #app .sidebar,body.nav-locked-collapsed #app .sidebar,body.nav-locked-collapsed .nav-disclosure[open] { background:#1F3A5F; }
  #app .sidebar nav,#app .sidebar .nav-disclosure,#app .sidebar .sidebar-foot { background:transparent; }
  #app .sidebar .nav-disclosure summary { color:#dae7f5; }
  body.nav-locked-collapsed #app .sidebar .nav-label { display:none!important; }
  body.nav-locked-collapsed #app .sidebar .nav-disclosure button { width:100%; padding-inline:10px; justify-content:center; }
  #app .sidebar nav button { flex-shrink:0; }
}
.v09-card-host { display:block!important; min-width:0; }
.v09-carousel { min-width:0; margin:16px 0 26px; }
.carousel-tools { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.carousel-tools button { min-width:44px; min-height:44px; }
.card-page { min-width:56px; text-align:center; font-variant-numeric:tabular-nums; }
.v09-card-track { display:flex; gap:20px; overflow-x:auto; scroll-snap-type:x mandatory; overscroll-behavior-x:contain; scrollbar-width:thin; position:relative; align-items:stretch; padding:3px 2px 12px; }
.v09-card-slide { flex:0 0 100%; min-width:0; scroll-snap-align:start; scroll-snap-stop:always; }
.v09-card-slide>.card { height:100%; box-sizing:border-box; margin:0; min-height:285px; }
.v09-card-slide .project-summary { max-width:none; }
.v09-card-track:focus-visible { outline:2px solid #4DA8DA; outline-offset:3px; }
.v09-carousel.card-list .v09-card-track { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); overflow:visible; }
.v09-carousel.card-list .carousel-tools>.row { visibility:hidden; }
.v09-card-slide .kpi-status { padding-block:9px; }
#goals-content.v09-card-host { display:block; }
.month-controls { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:14px 0; flex-wrap:wrap; }
.monthly-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; padding:14px 0; }
.monthly-metrics small,.monthly-metrics strong { display:block; overflow-wrap:anywhere; }
.monthly-metrics small { font-size:.8rem; color:#60758a; margin-bottom:8px; }
.monthly-metrics strong { font-size:1.1rem; color:#1f3a5f; font-variant-numeric:tabular-nums; }
.monthly-legend { display:flex; gap:18px; flex-wrap:wrap; margin:12px 0; font-size:.82rem; }
.monthly-legend span { display:flex; align-items:center; gap:7px; }
.monthly-legend i { width:12px; height:12px; border-radius:3px; }
.monthly-svg-wrap { width:100%; overflow-x:auto; }
.monthly-svg { width:100%; min-width:640px; display:block; }
.monthly-svg [data-month] { cursor:pointer; outline:none; }
.monthly-svg [data-month]:focus rect:first-of-type,.monthly-svg [data-month]:hover rect:first-of-type { fill:#edf4fd; }
.monthly-svg text { font-size:12px; fill:#566b81; }
.monthly-svg .month-bar { transform-box:fill-box; transform-origin:bottom; animation:month-grow .45s ease-out both; }
.monthly-table summary { cursor:pointer; padding:12px 0; }
.monthly-table td { white-space:nowrap; }
#finance-chart:has(.monthly-svg) { min-height:550px; }
#finance-chart-stage:has(.monthly-svg) { touch-action:auto; }
@keyframes month-grow { from { transform:scaleY(0); } to { transform:scaleY(1); } }
@media(max-width:700px) {
  .monthly-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .v09-carousel.card-list .v09-card-track { grid-template-columns:minmax(0,1fr); }
  .carousel-tools { gap:8px; }
  .v09-card-slide>.card { min-height:310px; }
  .month-controls button { font-size:.8rem; padding:10px; }
}
@media(prefers-reduced-motion:reduce) {
  .v09-card-track { scroll-behavior:auto; }
  .monthly-svg .month-bar { animation:none; }
}

.draft-target { background:#edf4fd; outline:2px solid #4da8da; outline-offset:-2px; }

/* V0.16 P0: consent page grant state (已保存／待同意／已撤銷／需重新授權). */
.v16-grant-state { border:1px solid #dee3ea; border-left:4px solid #4da8da; border-radius:12px; padding:12px 14px; margin:14px 0; background:#f6f9fc; }
.v16-grant-state strong { display:block; }
.v16-grant-state .micro { margin:6px 0 0; }
.v16-grant-state button { margin-top:10px; }
.v16-grant-saved { border-left-color:#2e8b57; background:#f1f8f4; }
.v16-grant-scope_added, .v16-grant-expired, .v16-grant-family { border-left-color:#c98a00; background:#fdf8ec; }
.v16-grant-revoked, .v16-grant-risk { border-left-color:#c0392b; background:#fdf2f1; }
