/* Shared appearance tokens adapted from Retirement Planner's accepted design.
   Game tooltips, item quality, map layers and semantic status colours are independent. */
:root {
  color-scheme:light;
  --app-bg:#f3f5f9;--surface:#fff;--surface-soft:#f7f9fc;--ink:#213147;
  --muted:#5f7085;--line:#e1e7ef;--accent:#355fd6;--accent-soft:#edf1ff;
  --nav:#172537;--nav-text:#b7c4d7;--nav-active:#345ab4;--chrome:#172537;
  --chrome-text:#f4f7fc;--nav-label:#8d9fb8;--nav-caption:#96a8c1;
  --heading-primary:#254d8c;--heading-section:#216860;--heading-context:#8a5e22;
  --card-shadow:0 2px 5px #17253704;--action-text:#fff;
  --bs-body-color:var(--ink);--bs-body-bg:var(--app-bg);--bs-border-color:var(--line);
  --bs-secondary-color:var(--muted);--bs-secondary-rgb:95,112,133;
  --bs-tertiary-bg:var(--surface-soft);--bs-secondary-bg:var(--surface-soft);
  --bs-emphasis-color:var(--ink);--bs-link-color:var(--accent);--bs-link-hover-color:var(--accent);
  font-family:'Segoe UI',Arial,sans-serif;
}
:root[data-appearance=dark] {
  color-scheme:dark;
  --app-bg:#101010;--surface:#1c1c1c;--surface-soft:#262626;--ink:#f2f2f2;
  --muted:#b3b3b3;--line:#404040;--accent:#eebc70;--accent-soft:#303030;
  --nav:#141414;--nav-text:#c7c7c7;--nav-active:#333333;--chrome:#1c1c1c;
  --chrome-text:#f5f5f5;--nav-label:#a3a3a3;--nav-caption:#a8a8a8;
  --heading-primary:#f1c66c;--heading-section:#e9aa73;--heading-context:#cbb68a;
  --card-shadow:none;--action-text:#191919;--bs-secondary-rgb:179,179,179;
}
:root[data-appearance=blue-dark] {
  color-scheme:dark;
  --app-bg:#101a28;--surface:#192637;--surface-soft:#1d2d42;--ink:#e5ecf5;
  --muted:#a4b3c8;--line:#304157;--accent:#9ab4ff;--accent-soft:#263d62;
  --nav:#101b2a;--nav-text:#bac8dc;--nav-active:#304f99;--chrome:#192637;
  --chrome-text:#f4f7fc;--heading-primary:#8fb5f2;--heading-section:#80c9c2;
  --heading-context:#d8b774;--card-shadow:none;--action-text:#101a28;
  --bs-secondary-rgb:164,179,200;
}
html[data-bs-theme] body{background:var(--app-bg);color:var(--ink);font-family:'Segoe UI',Arial,sans-serif}
.app-topbar{background:var(--chrome);border-color:var(--line)}
.navbar-brand,.navbar-brand:hover{color:var(--chrome-text)}
.brand-subtitle,.sidebar-note{color:var(--nav-caption)}
.app-sidebar .nav-link{color:var(--nav-text)}
.app-sidebar .nav-link.active,.app-sidebar .nav-link:hover{background:var(--nav-active);color:var(--chrome-text)}
.nav-caption{color:var(--nav-label)}
.settings-action{color:var(--chrome-text)}
.settings-action:hover,.settings-action.active{background:var(--nav-active);border-color:var(--nav-text);color:var(--chrome-text)}
.settings-action:focus-visible{outline-color:var(--accent)}
h1:not(.game-tooltip *, .client-tooltip *),.page-heading h1,.journal-hero h1{color:var(--heading-primary)}
h2:not(.game-tooltip *, .client-tooltip *),h3:not(.game-tooltip *, .client-tooltip *){color:var(--heading-section)}
html[data-bs-theme] .eyebrow{color:var(--heading-context)}
html[data-bs-theme] .card{background:var(--surface);border-color:var(--line);border-radius:12px;box-shadow:var(--card-shadow)}
html[data-bs-theme] .card-header,html[data-bs-theme] .card-footer{background:var(--surface-soft);border-color:var(--line)}
html[data-bs-theme] .context-bar{background:var(--accent-soft)}
html[data-bs-theme] .relationship{border-color:var(--line)}
html[data-bs-theme] .table>thead{color:var(--muted);background:var(--surface-soft)}
.table:not(.table-primary,.table-secondary,.table-success,.table-danger,.table-warning,.table-info,.table-light,.table-dark){--bs-table-color:var(--ink);--bs-table-bg:var(--surface);--bs-table-border-color:var(--line);--bs-table-hover-color:var(--ink);--bs-table-hover-bg:var(--accent-soft)}
.form-control,.form-select{color:var(--ink);background-color:var(--surface);border-color:var(--line)}
.form-control:focus,.form-select:focus{color:var(--ink);background-color:var(--surface);border-color:var(--accent);box-shadow:0 0 0 .2rem color-mix(in srgb,var(--accent) 25%,transparent)}
.offcanvas,.modal-content,.dropdown-menu{background-color:var(--surface);color:var(--ink);border-color:var(--line)}
.btn-primary{--bs-btn-bg:var(--accent);--bs-btn-color:var(--action-text);--bs-btn-border-color:var(--accent);--bs-btn-hover-bg:color-mix(in srgb,var(--accent) 87%,var(--ink));--bs-btn-hover-color:var(--action-text);--bs-btn-hover-border-color:var(--accent);--bs-btn-active-bg:var(--accent);--bs-btn-active-color:var(--action-text);--bs-btn-active-border-color:var(--accent);--bs-btn-disabled-bg:var(--accent);--bs-btn-disabled-color:var(--action-text);--bs-btn-disabled-border-color:var(--accent)}
.btn-outline-primary{--bs-btn-color:var(--accent);--bs-btn-border-color:var(--accent);--bs-btn-hover-bg:var(--accent);--bs-btn-hover-color:var(--action-text);--bs-btn-hover-border-color:var(--accent);--bs-btn-active-bg:var(--accent);--bs-btn-active-color:var(--action-text);--bs-btn-active-border-color:var(--accent);--bs-btn-disabled-color:var(--accent);--bs-btn-disabled-border-color:var(--line)}
.nav-tabs{--bs-nav-tabs-border-color:var(--line);--bs-nav-tabs-link-active-bg:var(--surface);--bs-nav-tabs-link-active-color:var(--ink);--bs-nav-tabs-link-active-border-color:var(--line)}
.nav-pills{--bs-nav-pills-link-active-bg:var(--accent);--bs-nav-pills-link-active-color:var(--action-text)}
html[data-bs-theme] .btn-outline-secondary{--bs-btn-color:var(--ink);--bs-btn-border-color:var(--muted);--bs-btn-hover-bg:var(--accent-soft);--bs-btn-hover-color:var(--ink);--bs-btn-hover-border-color:var(--accent);--bs-btn-disabled-color:var(--muted);--bs-btn-disabled-border-color:var(--line)}
.list-group{--bs-list-group-color:var(--ink);--bs-list-group-bg:var(--surface);--bs-list-group-border-color:var(--line);--bs-list-group-action-hover-bg:var(--surface-soft);--bs-list-group-action-hover-color:var(--ink)}
.search-suggestions [aria-selected=true]{background:var(--accent);color:var(--action-text)}
:is(a,button,summary,input,select,[tabindex]):focus-visible{outline:2px solid var(--accent);outline-offset:3px}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important}}


