/* 메인 헤더 주황 색상 테마 */
.app-header {
  border-top-color: #ed7d1d;
  border-bottom-color: rgba(237, 125, 29, .20);
  background: linear-gradient(112deg, rgba(255,255,255,.98), rgba(255,248,241,.94) 48%, rgba(237,125,29,.09));
  box-shadow: 0 7px 22px rgba(180, 96, 25, .07);
}

/* Keep the brand and utilities readable without overlaying narrow-screen content. */
@media (max-width:640px) {
  .app-header { grid-template-columns:minmax(0,1fr); gap:12px; padding:14px; }
  .app-header .header-main-brand {
    flex-direction:column; width:100%; min-width:0; gap:10px; padding:0;
  }
  .app-header .header-home-button { flex:0 1 auto; max-width:100%; min-width:0; }
  .app-header .header-main-logo { width:190px; max-width:100%; height:52px; }
  .app-header .service-badge {
    flex:0 0 auto; top:0; max-width:100%; min-width:0; box-sizing:border-box;
    gap:8px; padding:7px 10px;
  }
  .app-header .service-badge i { flex:0 0 auto; font-size:16px; }
  .app-header .badge-divider { flex:0 0 1px; height:18px; }
  .app-header .badge-text {
    flex-direction:row; flex-wrap:wrap; justify-content:center; gap:3px 7px; min-width:0;
  }
  .app-header .badge-text > div { font-size:11px; line-height:1.4; white-space:nowrap; }
  .app-header .header-utility-bar .web-storage-actions {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); width:100%; min-width:0; gap:7px;
  }
  .app-header .web-storage-actions .orangefarm-header-link { grid-column:1 / -1; min-width:0; }
  .app-header .web-storage-actions .storage-button,
  .app-header .web-storage-actions .ai-chat-launcher.is-header-docked {
    box-sizing:border-box; width:100%; min-width:0; height:44px; min-height:44px; margin:0;
  }
}

.settings-list-size-options {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:3px;
  box-sizing:border-box; width:100%; max-width:320px; padding:3px;
  border:1px solid #dfe5df; border-radius:9px; background:#f4f6f2;
}
.settings-list-size-options label { position:relative; min-width:0; cursor:pointer; }
.settings-list-size-options input {
  position:absolute; width:1px; height:1px; padding:0; margin:0;
  opacity:0; pointer-events:none;
}
.settings-list-size-options label > span {
  display:flex; align-items:center; justify-content:center;
  box-sizing:border-box; min-height:34px; padding:6px 3px;
  border:1px solid transparent; border-radius:6px; background:transparent; color:#66736b;
  font-size:12px; font-weight:600; line-height:1.4; white-space:nowrap;
}
.settings-list-size-options label:hover > span { background:#fff; }
.settings-list-size-options input:checked + span {
  border-color:#e3b18a; background:#fff8f1; color:#a65217;
}
.settings-list-size-options input:focus-visible + span { outline:2px solid #4b9b3d; outline-offset:2px; }
html[data-theme="dark"] .settings-list-size-options { border-color:#454d47; background:#202522; }
html[data-theme="dark"] .settings-list-size-options label > span { color:#c8d1cb; }
html[data-theme="dark"] .settings-list-size-options label:hover > span { background:#303631; }
html[data-theme="dark"] .settings-list-size-options input:checked + span {
  border-color:#b98456; background:#3c3026; color:#ffd9b8;
}

#dashboard-weather[role="link"] { cursor: pointer; }
#dashboard-weather[role="link"]:focus-visible {
  outline: 2px solid #ed7d1d;
  outline-offset: 3px;
}

/* Match the reference blue-gray canvas without changing cards or dark mode. */
@media screen {
  html:not([data-theme="dark"]),
  html:not([data-theme="dark"]) body,
  html:not([data-theme="dark"]) body > main {
    background: #f4f6fa !important;
  }
}

/* Header shortcuts retain keyboard focus feedback without pointer-hover effects. */
.app-header .settings-launch-button,
.app-header #dashboard-weather[role="link"] {
  transition: none;
}
.app-header .settings-launch-button:focus-visible {
  background: #eaf3e5;
  border-color: #78aa64;
  box-shadow: 0 2px 7px rgba(53, 125, 38, .10);
}
.app-header #dashboard-weather[role="link"]:focus-visible {
  background: #eef3f9;
  border-color: #9cacc2;
  box-shadow: 0 2px 7px rgba(55, 80, 110, .10);
}
.app-header .settings-launch-button:focus-visible {
  outline: 2px solid #ed7d1d;
  outline-offset: 3px;
}
html[data-theme="dark"] .app-header .settings-launch-button:focus-visible {
  background: #34473b;
  border-color: #8bab7c;
}
html[data-theme="dark"] .app-header #dashboard-weather[role="link"]:focus-visible {
  background: #334453;
  border-color: #8ea8c1;
}
@media (prefers-reduced-motion: reduce) {
  .app-header .settings-launch-button,
  .app-header #dashboard-weather[role="link"] { transition: none; }
}

/* Quiet, distinct section identities; chart categories and warning colors stay intact. */
#tab-stats { --section-accent: #5b7184; --section-tint: #f1f4f7; }
#tab-trash { --section-accent: #292d32; --section-tint: #f3f4f5; }
:is(#tab-stats, #tab-trash) { --card-accent: var(--section-accent); }
:is(#tab-stats, #tab-trash) h2::before { background-color: var(--section-accent) !important; }
:is(#tab-stats, #tab-trash) thead { border-top-color: var(--section-accent) !important; }
:is(#tab-stats, #tab-trash) th { background: var(--section-tint); border-top-color: var(--section-accent) !important; }
#tab-trash .trash-note {
  background: #f3f5f5;
  border: 1px solid #dce2e2;
  color: #536268;
}
#tab-trash .trash-kind {
  color: #292d32;
  background: #f1f2f3;
  border-color: #d4d7da;
}
#tab-trash input[type="checkbox"] { accent-color: #292d32; }
html[data-theme="dark"] #tab-stats { --section-accent: #91a8bb; --section-tint: #303b45; }
html[data-theme="dark"] #tab-trash { --section-accent: #9aacae; --section-tint: #323c3e; }
html[data-theme="dark"] #tab-trash .trash-note,
html[data-theme="dark"] #tab-trash .trash-kind {
  background: #323c3e;
  border-color: #536366;
  color: #d0dadd;
}

/* Section eyebrow labels and icons follow their card's theme accent. */
:is(#tab-stats, #tab-trash) .workspace-eyebrow,
:is(#tab-stats, #tab-trash) .workspace-eyebrow .bi {
  color: var(--section-accent) !important;
}
