.night-background { filter: brightness(var(--scene-brightness, 1)); }
.hero { position: relative; }
.page-settings.secondary-button {
  position: absolute; right: 0; top: -76px; min-height: 44px;
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px;
  font-size: 14px; background: rgba(14, 30, 42, .28);
  border-color: var(--card-border); border-radius: 14px;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.page-settings svg { width: 18px; height: 18px; }
.task-check-hit { display: grid; place-items: center; flex: none; cursor: pointer; min-width: 28px; min-height: 40px; }
.task-main .task-title-button { max-width: 100%; }
.task-details { flex-wrap: wrap; white-space: normal; gap: 5px 8px; }
.task-badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 6px; color: #9db6c8; background: rgba(168, 203, 230, .06); font-size: 11px; line-height: 1.4; }
.task-badge.priority-high { color: #c7e8ff; background: rgba(87, 175, 244, .13); }
.task-badge.overdue { color: #efbbac; background: rgba(222, 134, 107, .10); }
.task-badge.due-today { color: #a5dccb; background: rgba(86, 192, 158, .10); }
.dialog { max-height: min(calc(100dvh - 24px), calc(var(--dialog-viewport, 100vh) - 24px)); overflow-y: auto; overscroll-behavior: contain; scroll-padding: 24px; }
.settings-dialog h3 { font-size: 18px; font-weight: 500; margin-bottom: 12px; }
.brightness-field { padding-top: 4px; }
.brightness-field output { position: absolute; right: 0; color: #a2dbff; }
.brightness-field input[type=range] { padding: 0; border: 0; background: transparent; box-shadow: none; accent-color: #82caff; cursor: pointer; }
.motion-setting { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 52px; cursor: pointer; }
.motion-setting small { display: block; color: #90aab9; font-size: 13px; margin-top: 4px; }
.motion-setting input { width: 42px; height: 26px; accent-color: #71bdf0; flex: none; }
.backup-settings { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--card-border); }
.backup-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.backup-actions .secondary-button { flex: 1 1 175px; font-size: 15px; min-height: 44px; }
.backup-status { color: #b8ccd9; font-size: 14px; line-height: 1.6; margin-top: 14px; overflow-wrap: anywhere; }
#import-preview { margin-top: 14px; padding: 14px; border: 1px solid var(--card-border); border-radius: 12px; background: rgba(120, 190, 230, .04); font-size: 15px; line-height: 1.6; }
#import-preview[hidden] { display: none; }
#import-preview .blue-button { margin-top: 14px; font-size: 16px; }
.trends-panel .panel-heading { flex-wrap: wrap; }
.chart-month { font-size: 13px; color: #90aab9; }
.chart-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 18px 0 10px; }
.chart-tabs .filter-button { min-height: 44px; padding: 9px 13px; font-size: 14px; }
.chart-tabs .active { background: rgba(86, 165, 223, .14); color: #d5eeff; }
.work-chart { width: 100%; height: auto; display: block; overflow: visible; margin-bottom: 14px; }
.chart-grid { stroke: rgba(178, 211, 234, .10); stroke-width: 1; }
.chart-target { stroke: #dcbf83; stroke-width: 1; stroke-dasharray: 5 6; opacity: .65; }
.chart-line { stroke: #89cfff; stroke-width: 2.5; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart-dot { fill: #c7eaff; stroke: #1c5e89; stroke-width: 2; }
.chart-axis { fill: #8faabf; font: 12px Roboto, sans-serif; }
.chart-details { margin-top: 16px; color: #abc1d2; font-size: 14px; }
.chart-details summary { cursor: pointer; min-height: 44px; padding: 12px 0; }
.chart-details table { width: 100%; border-collapse: collapse; }
.chart-details th, .chart-details td { padding: 10px 4px; text-align: left; border-bottom: 1px solid var(--card-border); }
.chart-details th:last-child, .chart-details td:last-child { text-align: right; }
html[data-motion=off] *, html[data-motion=off] *::before, html[data-motion=off] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-motion=off] .night-ambient, html[data-motion=off] .cat-blink { display: none; }
html[data-motion=off] .mood-card.is-changing .quote-copy { opacity: 1; transform: none; filter: none; }
@media (max-width: 750px) {
  .page-settings.secondary-button { top: -70px; }
  .task-check-hit { min-width: 44px; min-height: 44px; }
  .task-row { gap: 8px; }
  .panel .task-check { width: 25px; height: 25px; }
  .panel .task-title-button { font-size: 18px; }
  .panel .task-date { font-size: 13px; }
  .full-task-row .task-main { flex-basis: calc(100% - 58px); }
  .full-task-row .task-date { margin-left: 52px; margin-right: auto; }
  .full-task-row .delete-button, .work-table .record-actions .icon-button { width: 44px; height: 44px; }
  .dialog .icon-button, .quote-actions button, .quote-pause { min-width: 44px; min-height: 44px; }
  .dialog .dialog-actions button { min-height: 46px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .field input, .field textarea, .field select { scroll-margin: 22px; }
  .panel-heading h2 { font-size: 23px; }
  .panel .stat-value { font-size: clamp(24px, 6.5vw, 32px); line-height: 1.35; }
  .panel .stat-note { white-space: normal; }
  .chart-tabs .filter-button { flex: 1; padding: 9px 6px; font-size: 13px; }
  .settings-dialog { padding: 22px 20px; }
}
@media (max-width: 390px) {
  .summary-panel .panel-heading { flex-direction: column; align-items: stretch; gap: 12px; }
  .summary-panel .month-select select { width: 100%; }
  .summary-panel .month-select { display: block; }
}
