:root,
html[data-theme="light"] {
  color-scheme: light;
  --ui-bg: #f5f7f5;
  --ui-surface: #ffffff;
  --ui-surface-soft: #f8faf8;
  --ui-surface-raised: #ffffff;
  --ui-text: #18211f;
  --ui-muted: #6f7d78;
  --ui-faint: #96a19d;
  --ui-border: #e3e9e5;
  --ui-brand: #f06449;
  --ui-brand-hover: #d95139;
  --ui-nav: #16372f;
  --ui-nav-soft: #234c41;
  --ui-success: #2f8b67;
  --ui-overlay: rgba(11, 29, 24, .45);
  --ui-shadow: 0 18px 48px rgba(28, 57, 47, .09);
  --bg: #f5f7f5;
  --bg-elevated: #ffffff;
  --glass: rgba(255, 255, 255, .94);
  --border-subtle: #e3e9e5;
  --accent: #f06449;
  --accent-soft: rgba(240, 100, 73, .13);
  --accent-strong: #d95139;
  --text-main: #18211f;
  --text-muted: #6f7d78;
  --card: #ffffff;
  --card2: #f8faf8;
  --stroke: #e3e9e5;
  --stroke2: #d5ded9;
  --text: #18211f;
  --muted: #6f7d78;
  --accent2: #ff9b83;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ui-bg: #0d1512;
  --ui-surface: #14201c;
  --ui-surface-soft: #182722;
  --ui-surface-raised: #1b2c26;
  --ui-text: #edf5f1;
  --ui-muted: #9daea7;
  --ui-faint: #74877f;
  --ui-border: #2a3b35;
  --ui-brand: #ff7a5f;
  --ui-brand-hover: #ff927b;
  --ui-nav: #0b1d18;
  --ui-nav-soft: #193a31;
  --ui-success: #66c495;
  --ui-overlay: rgba(2, 10, 7, .68);
  --ui-shadow: 0 20px 55px rgba(0, 0, 0, .28);
  --bg: #0d1512;
  --bg-elevated: #14201c;
  --glass: rgba(20, 32, 28, .94);
  --border-subtle: #2a3b35;
  --accent: #ff7a5f;
  --accent-soft: rgba(255, 122, 95, .14);
  --accent-strong: #ff927b;
  --text-main: #edf5f1;
  --text-muted: #9daea7;
  --card: #14201c;
  --card2: #182722;
  --stroke: #2a3b35;
  --stroke2: #385047;
  --text: #edf5f1;
  --muted: #9daea7;
  --accent2: #ffad9a;
}

html, body { transition: background-color .22s ease, color .22s ease; }
body { background: var(--ui-bg); color: var(--ui-text); }
[hidden] { display: none !important; }

.goknowing-theme-toggle {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--ui-border);
  border-radius: 11px;
  display: inline-grid;
  place-items: center;
  color: var(--ui-text);
  background: var(--ui-surface);
  box-shadow: 0 5px 16px rgba(20, 50, 40, .05);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.goknowing-theme-toggle:hover { transform: translateY(-1px); border-color: var(--ui-brand); }
.goknowing-theme-toggle.goknowing-theme-floating { position: fixed; top: 18px; right: 18px; z-index: 90; }

/* Shared app navigation */
.goknowing-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 80;
  width: 248px;
  min-width: 248px;
  padding: 24px 17px 17px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f5fbf8;
  background: radial-gradient(circle at 15% 5%, rgba(101,179,146,.2), transparent 28%), linear-gradient(175deg,#183831 0%,#112822 76%);
  box-shadow: 18px 0 48px rgba(11,29,24,.16);
  transition: transform .24s ease;
}
.goknowing-sidebar::after { content: ""; position: absolute; inset: auto 0 0; height: 230px; pointer-events: none; background: radial-gradient(circle at 20% 100%,rgba(82,150,120,.15),transparent 65%); }
.goknowing-sidebar .sidebar-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; }
.goknowing-sidebar .logo { display: flex; gap: 11px; align-items: center; color: #fff; font: 800 20px/1 "Manrope", sans-serif; text-decoration: none; letter-spacing: -.6px; }
.goknowing-sidebar .logo-mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--ui-brand); background: rgba(255,255,255,.09); }
.goknowing-sidebar .logo-mark svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.goknowing-sidebar .sidebar-close { display: none; padding: 2px 7px; border: 0; color: #fff; background: transparent; cursor: pointer; font-size: 25px; }
.goknowing-sidebar .nav-list { position: relative; z-index: 2; min-height: 0; margin-top: 27px; padding-right: 2px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.goknowing-sidebar .nav-label { margin: 0 11px 7px; color: rgba(226,240,234,.43); font-size: 8px; font-weight: 800; letter-spacing: 1.25px; text-transform: uppercase; }
.goknowing-sidebar .nav-label-spaced { margin-top: 17px; }
.goknowing-sidebar .nav-item { min-height: 38px; margin-bottom: 3px; padding: 0 11px; border-radius: 10px; display: flex; align-items: center; gap: 10px; color: rgba(235,245,240,.7); font-size: 10px; font-weight: 600; text-decoration: none; transition: .18s ease; }
.goknowing-sidebar .nav-item:hover,
.goknowing-sidebar .nav-item.active { color: #fff; background: rgba(255,255,255,.09); }
.goknowing-sidebar .nav-item.active { box-shadow: inset 3px 0 var(--ui-brand); }
.goknowing-sidebar .nav-item svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.goknowing-sidebar .nav-item:first-of-type svg { fill: currentColor; stroke: none; }
.goknowing-sidebar .nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: rgba(255,255,255,.1); font-size: 8px; }
.goknowing-sidebar .sidebar-footer { position: relative; z-index: 2; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.goknowing-sidebar .sidebar-user { margin: 0; padding: 0; border: 0; display: flex; align-items: center; gap: 10px; }
.goknowing-sidebar .user-avatar { width: 35px; height: 35px; flex: 0 0 auto; border-radius: 10px; display: grid; place-items: center; color: #44251d; background: #f6b9a9; text-decoration: none; font: 700 11px "Manrope", sans-serif; }
.goknowing-sidebar .user-copy { min-width: 0; }
.goknowing-sidebar .user-copy strong,
.goknowing-sidebar .user-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.goknowing-sidebar .user-copy strong { color: #fff; font-size: 10px; }
.goknowing-sidebar .user-copy span { margin-top: 3px; color: rgba(235,245,240,.45); font-size: 8px; }
.goknowing-sidebar .sidebar-auth-action { min-height: 38px; margin-top: 11px; padding: 0 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; display: flex; align-items: center; gap: 9px; color: #fff; background: rgba(255,255,255,.07); text-decoration: none; font-size: 9px; font-weight: 700; }
.goknowing-sidebar .sidebar-logout-form { margin: 0; }
.goknowing-sidebar .sidebar-logout-form .sidebar-auth-action { width: 100%; cursor: pointer; }
.goknowing-sidebar .sidebar-auth-action:hover { background: rgba(255,255,255,.12); }
.goknowing-sidebar .sidebar-auth-action.logout { color: #ffd7ce; border-color: rgba(255,122,95,.24); background: rgba(255,122,95,.1); }
.goknowing-sidebar .sidebar-auth-action.logout:hover { background: rgba(255,122,95,.18); }
.goknowing-sidebar .sidebar-auth-action svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

body:not(.dashboard-page) .goknowing-sidebar { transform: translateX(-100%); }
body:not(.dashboard-page) .goknowing-sidebar.open { transform: none; }
body:not(.dashboard-page) .goknowing-sidebar .sidebar-close { display: block; }
.goknowing-sidebar-overlay { position: fixed; inset: 0; z-index: 75; display: none; background: rgba(8,25,20,.48); backdrop-filter: blur(2px); }
.goknowing-sidebar-overlay.show { display: block; }

.goknowing-menu-trigger,
.goknowing-inline-menu-trigger {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #fff;
  background: var(--ui-nav);
  box-shadow: 0 9px 24px rgba(14,43,34,.18);
  cursor: pointer;
}
.goknowing-menu-trigger { position: fixed; top: 19px; left: 19px; z-index: 60; }
.goknowing-menu-trigger span,
.goknowing-inline-menu-trigger span { width: 18px !important; height: 2px !important; flex: 0 0 2px; border-radius: 999px; background: #fff !important; }

/* Inputs never lose readable theme contrast, including browser autofill. */
body :where(input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="url"], textarea, select) {
  color: var(--ui-text) !important;
  caret-color: var(--ui-brand) !important;
  background-color: var(--ui-surface-soft) !important;
  border-color: var(--ui-border) !important;
  -webkit-text-fill-color: var(--ui-text) !important;
}
body :where(input:not([type]), input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="url"], textarea, select):focus {
  outline: none !important;
  color: var(--ui-text) !important;
  background-color: var(--ui-surface) !important;
  border-color: var(--ui-brand) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-brand) 12%, transparent) !important;
  -webkit-text-fill-color: var(--ui-text) !important;
}
body :where(input, textarea)::placeholder { color: var(--ui-faint) !important; opacity: 1; -webkit-text-fill-color: var(--ui-faint) !important; }
body :where(input, textarea):-webkit-autofill,
body :where(input, textarea):-webkit-autofill:hover,
body :where(input, textarea):-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ui-text) !important;
  caret-color: var(--ui-brand) !important;
  box-shadow: 0 0 0 1000px var(--ui-surface-soft) inset !important;
  transition: background-color 9999s ease-out 0s;
}
body.dashboard-page .command-search input { background: transparent !important; box-shadow: none !important; }

/* Shared readable result surfaces */
body.feature-page :where(.info-block, .insight-block, .directions-container, .popular-content, .sheet-body, .pt-card, .weather-card, .weather-desc-pill) { color: var(--ui-text); }
body.feature-page :where(.info-row, .pt-list li) { color: var(--ui-text) !important; border-color: var(--ui-border) !important; }
body.feature-page :where(.info-row .label, .pt-place, .pt-summary-sub, .pt-hint, .weather-card-title, .weather-card-sub, .sheet-temp-sub) { color: var(--ui-muted) !important; }
body.feature-page :where(.info-row .value, .pt-percent, .pt-summary-main, .pt-card h3, .pt-card-merged h3, .weather-card-value, .sheet-location) { color: var(--ui-text) !important; }
body.feature-page .directions-container { border: 1px solid var(--ui-border); background: var(--ui-surface-soft) !important; }
body.feature-page .directions-container :where(.adp, .adp table, .adp button, .adp-directions, .adp-summary, .adp-text) { color: var(--ui-text) !important; background: transparent !important; }
body.feature-page .pt-badge { color: var(--ui-text); border-color: var(--ui-border); background: var(--accent-soft); }
body.feature-page .pt-card-merged { background: var(--ui-surface) !important; border-color: var(--ui-border); }

/* Informational pages */
body.content-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--ui-brand) 9%, transparent), transparent 28%),
    var(--ui-bg);
  color: var(--ui-text);
}
body.content-page .bg { opacity: .18; }
body.content-page .bg-grid { opacity: .22; }
body.content-page > .topbar {
  position: sticky;
  top: 12px;
  z-index: 30;
  width: min(1120px, calc(100% - 32px));
  max-width: none;
  min-height: 62px;
  margin: 12px auto 0;
  padding: 10px 14px;
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  color: var(--ui-text);
  background: color-mix(in srgb, var(--ui-surface) 90%, transparent);
  box-shadow: var(--ui-shadow);
  backdrop-filter: blur(18px);
}
body.content-page .brand { display: flex; align-items: center; gap: 9px; color: var(--ui-text); text-decoration: none; }
body.content-page .brand-text { font-family: "Manrope", sans-serif; font-weight: 800; }
body.content-page .brand-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ui-brand); box-shadow: 0 0 0 5px color-mix(in srgb, var(--ui-brand) 14%, transparent); }
body.content-page .brand-tag { padding: 3px 7px; border: 1px solid var(--ui-border); border-radius: 999px; color: var(--ui-muted); background: var(--ui-surface-soft); font-size: 8px; }
body.content-page .chip-link { padding: 9px 13px; border: 1px solid var(--ui-border); border-radius: 10px; color: var(--ui-text); background: var(--ui-surface-soft); text-decoration: none; font-size: 11px; font-weight: 700; }
body.content-page .chip-link:first-of-type { color: #fff; border-color: var(--ui-brand); background: var(--ui-brand); }
body.content-page .menu-btn { width: 38px !important; min-width: 38px; max-width: 38px; height: 32px; flex: 0 0 38px; padding: 5px; border: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; color: var(--ui-text); background: transparent; box-shadow: none; cursor: pointer; }
body.content-page .menu-btn span { display: block; width: 25px; height: 2px; flex: 0 0 auto; border-radius: 999px; background: var(--ui-nav); box-shadow: none; }
html[data-theme="dark"] body.content-page .menu-btn span { background: var(--ui-text); }
body.content-page .container { width: min(100%, 1120px); max-width: 1120px; margin: 0 auto; padding: 56px 22px 70px; color: var(--ui-text); }
body.content-page .page-header { text-align: left; margin: 0 0 24px; }
body.content-page .eyebrow { color: var(--ui-brand); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
body.content-page .page-title { margin: 9px 0 10px; color: var(--ui-text); background: none; -webkit-text-fill-color: currentColor; font: 700 clamp(2rem, 4vw, 3.15rem)/1.08 "Manrope", "DM Sans", sans-serif; letter-spacing: -1.8px; }
body.content-page .page-subtitle { max-width: 720px; margin: 0; color: var(--ui-muted); font-size: 15px; line-height: 1.65; }
body.content-page .content-card { padding: clamp(24px, 4vw, 42px); border: 1px solid var(--ui-border); border-radius: 20px; color: var(--ui-text); background: var(--ui-surface); box-shadow: var(--ui-shadow); }
body.content-page .content-card h2,
body.content-page .contact-copy h2 { color: var(--ui-text); font-family: "Manrope", sans-serif; }
body.content-page .content-card p,
body.content-page .contact-copy p,
body.content-page .contact-hint { color: var(--ui-muted); }
body.content-page .contact-points li { color: var(--ui-text); border-color: var(--ui-border); background: var(--ui-surface-soft); }
body.content-page .field label { color: var(--ui-text); }
body.content-page .input { color: var(--ui-text); border-color: var(--ui-border); background: var(--ui-surface-soft); }
body.content-page .input::placeholder { color: var(--ui-faint); }
body.content-page .input:focus { border-color: var(--ui-brand); background: var(--ui-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-brand) 13%, transparent); }
body.content-page .send-btn { color: #fff; background: var(--ui-brand); box-shadow: 0 14px 30px color-mix(in srgb, var(--ui-brand) 20%, transparent); }

/* Shared navigation drawer */
body.content-page .menu,
body.feature-page .menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  z-index: 70;
  padding: 24px 18px;
  color: #eef7f3;
  background: linear-gradient(175deg, #183831, #10241f);
  border-right: 1px solid rgba(255,255,255,.08);
  box-shadow: 28px 0 65px rgba(0,0,0,.32);
  transition: left .25s ease;
}
body.content-page .menu.goknowing-menu-open,
body.feature-page .menu.open,
body.feature-page .menu.goknowing-menu-open { left: 0 !important; }
body.content-page .menu a,
body.feature-page .menu a { color: rgba(238,247,243,.72); border-radius: 10px; }
body.content-page .menu a:hover,
body.feature-page .menu a:hover,
body.feature-page .menu .active-link { color: #fff; background: rgba(255,255,255,.09); }
body.content-page .menu-title,
body.content-page .menu-close,
body.feature-page .logo-text { color: #fff; }
body.content-page .menu-cta { color: #fff; background: var(--ui-brand); }
body.content-page .overlay.goknowing-overlay-open { opacity: 1; pointer-events: auto; background: var(--ui-overlay); }

/* Map, weather, and crowd tools */
body.feature-page { background: var(--ui-bg) !important; color: var(--ui-text) !important; }
body.feature-page .page-shell { color: var(--ui-text); }
body.feature-page .page-header { border-color: var(--ui-border); color: var(--ui-text); background: transparent; }
body.feature-page .page-header h1,
body.feature-page .card-title,
body.feature-page h1,
body.feature-page h2,
body.feature-page h3,
body.feature-page h4 { color: var(--ui-text); }
body.feature-page .subtitle,
body.feature-page .card-subtitle,
body.feature-page .notice-card,
body.feature-page .sheet-location,
body.feature-page .weather-card-sub { color: var(--ui-muted); }
body.feature-page .glass-card,
body.feature-page .info-card,
body.feature-page .route-insights,
body.feature-page .notice-card,
body.feature-page .sheet-inner,
body.feature-page .search-card,
body.feature-page .weather-card,
body.feature-page .pt-card { border-color: var(--ui-border); color: var(--ui-text); background: var(--ui-surface) !important; box-shadow: var(--ui-shadow); }
body.feature-page .input,
body.feature-page .mode-select,
body.feature-page input,
body.feature-page select { color: var(--ui-text); border-color: var(--ui-border); background: var(--ui-surface-soft); }
body.feature-page .input::placeholder,
body.feature-page input::placeholder { color: var(--ui-faint); }
body.feature-page .chip { color: var(--ui-brand); border-color: color-mix(in srgb, var(--ui-brand) 25%, var(--ui-border)); background: var(--accent-soft); }
body.feature-page .primary-btn,
body.feature-page #fetchButton { color: #fff; border-color: var(--ui-brand); background: var(--ui-brand); }
body.feature-page .ghost-btn,
body.feature-page .secondary-btn { color: var(--ui-brand); border-color: var(--ui-border); background: var(--ui-surface-soft); }
body.feature-page .menu-btn { background: var(--ui-nav); border-color: rgba(255,255,255,.12); box-shadow: 0 9px 25px rgba(14,43,34,.2); }
body.feature-page .menu-btn div { background: #fff; }
body.feature-page .bg-orb { opacity: .12; }
body.feature-page .sheet-handle { background: var(--ui-border); }
body.feature-page .sheet-temp-main { color: var(--ui-brand); }
body.feature-page .fab { background: var(--ui-brand); }
body.feature-page .fab-label { color: var(--ui-text); background: var(--ui-surface); }

/* Authentication and status pages */
body.auth-page-body,
body.status-page { min-height: 100vh; color: var(--ui-text); background: radial-gradient(circle at 10% 0%, color-mix(in srgb, var(--ui-brand) 10%, transparent), transparent 30%), var(--ui-bg) !important; }
body.auth-page-body .auth-shell,
body.status-page .success-card { color: var(--ui-text); border-color: var(--ui-border); background: var(--ui-surface) !important; box-shadow: var(--ui-shadow); }
body.auth-page-body .auth-strip { border-color: var(--ui-border); }
body.auth-page-body .auth-brand-title,
body.auth-page-body .auth-heading,
body.auth-page-body h1,
body.auth-page-body h2 { color: var(--ui-text); }
body.auth-page-body .auth-orb { background: var(--ui-brand); box-shadow: 0 0 0 7px color-mix(in srgb, var(--ui-brand) 13%, transparent); }
body.auth-page-body .auth-pill,
body.auth-page-body .auth-panel-card { color: var(--ui-muted); border-color: var(--ui-border); background: var(--ui-surface-soft); }
body.auth-page-body input { color: var(--ui-text); border-color: var(--ui-border); background: var(--ui-surface-soft); }
body.auth-page-body input::placeholder { color: var(--ui-faint); }
body.auth-page-body button[type="submit"],
body.auth-page-body .auth-primary-btn { color: #fff; border-color: var(--ui-brand); background: var(--ui-brand); }
body.auth-page-body .overlay-panel,
body.auth-page-body .auth-side { background: linear-gradient(145deg, var(--ui-nav), var(--ui-nav-soft)) !important; }
body.status-page { display: grid; place-items: center; padding: 24px; text-align: center; }
body.status-page a,
body.status-page .success-btn { color: #fff; border-radius: 10px; background: var(--ui-brand); }

/* Dashboard dark theme */
html[data-theme="dark"] body.dashboard-page { background: var(--ui-bg); color: var(--ui-text); }
html[data-theme="dark"] body.dashboard-page .main-content,
html[data-theme="dark"] body.dashboard-page .dashboard { background: var(--ui-bg); }
html[data-theme="dark"] body.dashboard-page .topbar { border-color: var(--ui-border); background: rgba(20,32,28,.88); }
html[data-theme="dark"] body.dashboard-page .command-search,
html[data-theme="dark"] body.dashboard-page .topbar-icon,
html[data-theme="dark"] body.dashboard-page .date-chip,
html[data-theme="dark"] body.dashboard-page .metric-card,
html[data-theme="dark"] body.dashboard-page .panel,
html[data-theme="dark"] body.dashboard-page .quick-grid a,
html[data-theme="dark"] body.dashboard-page .suggestion,
html[data-theme="dark"] body.dashboard-page .favorite-row,
html[data-theme="dark"] body.dashboard-page .journey-row { color: var(--ui-text); border-color: var(--ui-border); background: var(--ui-surface); }
html[data-theme="dark"] body.dashboard-page .welcome-row h1,
html[data-theme="dark"] body.dashboard-page .panel-heading h2,
html[data-theme="dark"] body.dashboard-page .metric-copy strong,
html[data-theme="dark"] body.dashboard-page .journey-copy strong,
html[data-theme="dark"] body.dashboard-page .suggestion-body strong,
html[data-theme="dark"] body.dashboard-page .favorite-copy strong { color: var(--ui-text); }
html[data-theme="dark"] body.dashboard-page .empty-state,
html[data-theme="dark"] body.dashboard-page .favorite-empty,
html[data-theme="dark"] body.dashboard-page .favorite-actions a,
html[data-theme="dark"] body.dashboard-page .favorite-actions button { color: var(--ui-muted); border-color: var(--ui-border); background: var(--ui-surface-soft); }
html[data-theme="dark"] body.dashboard-page .favorite-form input { color: var(--ui-text); border-color: var(--ui-border); background: var(--ui-surface-soft); }
html[data-theme="dark"] body.dashboard-page .heart-button { color: var(--ui-muted); border-color: var(--ui-border); background: var(--ui-surface-soft); }
html[data-theme="dark"] body.dashboard-page .heart-button.active { color: var(--ui-brand); }

/* Profile dark theme */
html[data-theme="dark"] body.profile-page-body { background: var(--ui-bg); color: var(--ui-text); }
html[data-theme="dark"] body.profile-page-body .profile-nav,
html[data-theme="dark"] body.profile-page-body .profile-stats article,
html[data-theme="dark"] body.profile-page-body .settings-card { color: var(--ui-text); border-color: var(--ui-border); background: var(--ui-surface); }
html[data-theme="dark"] body.profile-page-body .profile-nav a,
html[data-theme="dark"] body.profile-page-body .settings-card label > span,
html[data-theme="dark"] body.profile-page-body .toggle-row strong,
html[data-theme="dark"] body.profile-page-body .card-heading h2 { color: var(--ui-text); }
html[data-theme="dark"] body.profile-page-body input,
html[data-theme="dark"] body.profile-page-body select { color: var(--ui-text); border-color: var(--ui-border); background: var(--ui-surface-soft); }
html[data-theme="dark"] body.profile-page-body .toggle-row { border-color: var(--ui-border); }
body.profile-page-body .toggle-row input { position: absolute; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; overflow: hidden; }

.goknowing-location-card { margin-bottom: 16px; padding: 16px 18px; border: 1px solid color-mix(in srgb, var(--ui-success) 24%, var(--ui-border)); border-radius: 14px; display: flex; align-items: center; gap: 14px; color: var(--ui-text); background: color-mix(in srgb, var(--ui-success) 7%, var(--ui-surface)); }
.goknowing-location-icon { width: 38px; height: 38px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center; color: var(--ui-success); background: color-mix(in srgb, var(--ui-success) 13%, transparent); }
.goknowing-location-copy { min-width: 0; flex: 1; }
.goknowing-location-copy strong,
.goknowing-location-copy span { display: block; }
.goknowing-location-copy strong { font-size: 11px; }
.goknowing-location-copy span { margin-top: 4px; color: var(--ui-muted); font-size: 9px; }
.goknowing-location-actions { display: flex; gap: 8px; }
.goknowing-location-actions button { min-height: 34px; padding: 0 12px; border: 1px solid var(--ui-border); border-radius: 9px; color: var(--ui-text); background: var(--ui-surface); cursor: pointer; font-size: 9px; font-weight: 700; }
.goknowing-location-actions button:first-child { color: #fff; border-color: var(--ui-nav); background: var(--ui-nav); }
.place-suggestions > .empty-state { grid-column: 1 / -1; }
.suggestion[data-route-nearby] { cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.suggestion[data-route-nearby]:hover,
.suggestion[data-route-nearby]:focus-visible { border-color: color-mix(in srgb, var(--ui-brand) 45%, var(--ui-border)); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(30,60,48,.08); outline: none; }
.suggestion-route-cue { margin-top: 6px !important; color: var(--ui-brand) !important; font-weight: 700; }

.command-search-submit { min-height: 30px; padding: 0 10px; border: 0; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; color: #fff; background: var(--ui-nav); cursor: pointer; font-size: 8px; font-weight: 700; white-space: nowrap; }
.command-search { min-width: 0; }
.command-search .goknowing-place-autocomplete { min-width: 0; width: 100%; height: 40px; flex: 1; border: 0; border-radius: 0; color: var(--ui-text); background: transparent; color-scheme: light; font: 600 12px/1 "DM Sans", sans-serif; }
html[data-theme="dark"] .command-search .goknowing-place-autocomplete { color-scheme: dark; }
.command-search .goknowing-place-autocomplete::part(input) { height: 40px; padding: 0; border: 0; outline: 0; color: var(--ui-text); background: transparent; box-shadow: none; font: 600 12px/1 "DM Sans", sans-serif; }
.command-search .goknowing-place-autocomplete::part(focus-ring) { outline: 0; }
.command-search .goknowing-place-autocomplete::part(prediction-list) { margin-top: 6px; border: 1px solid var(--ui-border); border-radius: 12px; color: var(--ui-text); background: var(--ui-surface); box-shadow: 0 18px 46px rgba(16,35,29,.16); }
.command-search .goknowing-place-autocomplete::part(prediction-item), .command-search .goknowing-place-autocomplete::part(prediction-item-main-text), .command-search .goknowing-place-autocomplete::part(prediction-item-secondary-text) { color: var(--ui-text); font-family: "DM Sans", sans-serif; }
.command-search-submit:hover { background: var(--ui-nav-soft); }
html[data-theme="dark"] body.dashboard-page .command-search-submit { background: var(--ui-brand); }

.goknowing-place-autocomplete-host { position: relative; }
.goknowing-place-predictions { position: absolute; z-index: 1200; top: calc(100% + 7px); left: 0; width: 100%; max-height: 300px; padding: 6px; overflow-y: auto; border: 1px solid var(--ui-border); border-radius: 12px; color: var(--ui-text); background: var(--ui-surface); box-shadow: 0 18px 46px rgba(16,35,29,.18); }
.goknowing-place-predictions[hidden] { display: none !important; }
.goknowing-place-prediction { width: 100%; padding: 10px 11px; border: 0; border-radius: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; color: var(--ui-text); background: transparent; cursor: pointer; text-align: left; font-family: "DM Sans", sans-serif; }
.goknowing-place-prediction:hover, .goknowing-place-prediction[aria-selected="true"] { background: color-mix(in srgb, var(--ui-brand) 10%, var(--ui-surface)); }
.goknowing-place-prediction strong { color: var(--ui-text); font-size: 11px; font-weight: 700; }
.goknowing-place-prediction span { color: var(--ui-muted); font-size: 9px; line-height: 1.35; }

/* Keep Google destination suggestions in the same visual system as the app. */
.pac-container {
  margin-top: 6px;
  padding: 6px;
  border: 1px solid var(--ui-border) !important;
  border-radius: 12px;
  color: var(--ui-text);
  background: var(--ui-surface) !important;
  box-shadow: var(--ui-shadow) !important;
  font-family: "DM Sans", "Inter", sans-serif;
}
.pac-item {
  min-height: 42px;
  padding: 8px 9px;
  border: 0 !important;
  border-radius: 8px;
  color: var(--ui-muted) !important;
  cursor: pointer;
  font-size: 10px;
}
.pac-item:hover,
.pac-item-selected { background: var(--ui-surface-soft) !important; }
.pac-item-query { color: var(--ui-text) !important; font-size: 11px; }
.pac-logo::after { margin: 6px 8px 3px; opacity: .65; }

body.content-page .menu-btn.goknowing-inline-menu-trigger {
  width: 38px !important;
  min-width: 38px;
  max-width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border-radius: 10px;
  gap: 4px;
  background: var(--ui-nav);
  box-shadow: 0 9px 24px rgba(14,43,34,.18);
}

@media (max-width: 700px) {
  body.content-page > .topbar { width: calc(100% - 20px); top: 8px; margin-top: 8px; }
  body.content-page .topbar-actions .chip-link.ghost { display: none; }
  body.content-page .container { padding-top: 38px; }
  body.content-page .contact-grid { grid-template-columns: 1fr; }
  .goknowing-location-card { align-items: flex-start; flex-wrap: wrap; }
  .goknowing-location-actions { width: 100%; }
  .goknowing-location-actions button { flex: 1; }
  .goknowing-theme-toggle.goknowing-theme-floating { top: 12px; right: 12px; }
}

@media (max-width: 760px) {
  body.dashboard-page .goknowing-sidebar .sidebar-close { display: block; }
  .command-search-submit { width: 31px; padding: 0; font-size: 0; }
  .command-search-submit span { font-size: 12px; }
  body.profile-page-body .profile-nav { padding-inline: 14px; gap: 12px; }
  body.profile-page-body .profile-nav .account-action { margin-left: auto; }
}

@media (max-width: 520px) {
  body.content-page .topbar-actions .chip-link { display: none; }
  body.content-page .topbar-actions .goknowing-theme-toggle {
    width: 38px !important;
    min-width: 38px;
    max-width: 38px;
    flex: 0 0 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html, body, .goknowing-theme-toggle { transition: none !important; }
}
