/* ── Dark theme (default) ── */
:root {
  --bg-page: #0a0a0a;
  --bg-card: #141414;
  --bg-secondary: #1c1c1c;
  --bg-input: #0e0e0e;
  --bg-hover: #2a2a2a;
  --border: #222;
  --border-btn: #383838;
  --text-heading: #f0f0f0;
  --text: #e0e0e0;
  --text-secondary: #d0d0d0;
  --text-muted: #aaa;
  --text-dim: #909090;
  --text-label: #757575;
  --text-faint: #606060;
  --text-disabled: #484848;
  --overlay: rgba(0,0,0,0.7);
  --shimmer: rgba(255,255,255,0.07);
}

/* ── Light theme (explicit) ── */
[data-theme="light"] {
  --bg-page: #ededed;
  --bg-card: #ffffff;
  --bg-secondary: #f7f7f7;
  --bg-input: #f3f3f3;
  --bg-hover: #e2e2e2;
  --border: #d4d4d4;
  --border-btn: #c0c0c0;
  --text-heading: #111;
  --text: #222;
  --text-secondary: #3a3a3a;
  --text-muted: #555;
  --text-dim: #666;
  --text-label: #777;
  --text-faint: #888;
  --text-disabled: #aaa;
  --overlay: rgba(0,0,0,0.4);
  --shimmer: rgba(0,0,0,0.06);
}

/* ── Auto theme — follows system preference ── */
@media (prefers-color-scheme: light) {
  [data-theme="auto"] {
    --bg-page: #ededed;
    --bg-card: #ffffff;
    --bg-secondary: #f7f7f7;
    --bg-input: #f3f3f3;
    --bg-hover: #e2e2e2;
    --border: #d4d4d4;
    --border-btn: #c0c0c0;
    --text-heading: #111;
    --text: #222;
    --text-secondary: #3a3a3a;
    --text-muted: #555;
    --text-dim: #666;
    --text-label: #777;
    --text-faint: #888;
    --text-disabled: #aaa;
    --overlay: rgba(0,0,0,0.4);
    --shimmer: rgba(0,0,0,0.06);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  color: var(--text);
  background: var(--bg-page);
}

/* ── Layout ── */
.app-shell {
  width: min(640px, 100% - 32px);
  margin: 24px auto;
  display: grid;
  gap: 0;
}

/* ── Brand header ── */
.brand-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.btn-secondary.brand-settings-btn {
  width: 34px;
  height: 34px;
  padding: 4px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  display: block;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.2px;
  line-height: 1.3;
  margin-top: 2px;
}

/* ── Controls row ── */
.controls-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.location-display {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--text-label);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.location-display strong {
  color: var(--text-muted);
  font-weight: 600;
}

.adj-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: default;
  font-family: inherit;
  font-size: 11px;
  border: none;
}

.adj-pill.active {
  background: rgba(249,115,22,0.1);
  border: 1px solid rgba(249,115,22,0.5);
  color: #f97316;
  font-weight: 700;
}

.adj-pill.inactive {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-faint);
  font-weight: 400;
}

/* ── Compact form (hidden fields + personalAdj) ── */
.compact-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.compact-form .personal-adj-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.compact-form .personal-adj-group label {
  font-size: 11px;
  color: var(--text-label);
  white-space: nowrap;
}

/* ── Inputs ── */
input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
}

input:focus {
  outline: 2px solid #60a5fa;
  outline-offset: 1px;
}

input[type="number"] {
  width: 70px;
}

/* ── Buttons ── */
button {
  font-family: inherit;
  cursor: pointer;
}

.btn-primary {
  background: #f97316;
  border: none;
  border-radius: 6px;
  padding: 9px 16px;
  color: #000;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-btn);
  border-radius: 6px;
  padding: 8px 14px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text);
}

/* ── View switcher ── */
.view-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
}

.view-switch button {
  flex: 1;
  padding: 16px 12px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  background: transparent;
  color: var(--text-faint);
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.view-switch button.active {
  background: var(--bg-secondary);
  color: #f97316;
  border-bottom: 2px solid #f97316;
}

.view-switch button:hover:not(.active) {
  color: var(--text-muted);
}

/* ── Panel (recommendation container) ── */
.recommendation {
  display: grid;
  gap: 20px;
}

/* ── Card base ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

/* ── Section label ── */
.section-label {
  font-size: 11px;
  color: var(--text-faint);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 12px 0;
}

/* ── Temperature display ── */
.temp-display {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 2px;
}

.temp-actual {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-heading);
}

.temp-effective {
  font-size: 28px;
  font-weight: 700;
  color: #f97316;
}

.temp-effective .eff-label {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-faint);
}

.feels-like {
  font-size: 14px;
  color: var(--text-faint);
  margin: 0 0 12px;
}

/* ── Conditions line ── */
.conditions-line {
  font-size: 12px;
  color: var(--text-label);
  margin: 0 0 12px;
  line-height: 1.8;
}

/* ── Modifier badges ── */
.mod-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.mod-badge {
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
}

.mod-badge .mod-label {
  color: var(--text-faint);
}

.mod-badge.base {
  background: rgba(249,115,22,0.1);
  border: 1px solid #f97316;
  color: var(--text-secondary);
}

.mod-badge.active {
  background: rgba(249,115,22,0.06);
  border: 1px solid rgba(249,115,22,0.19);
  color: var(--text-muted);
}

.mod-badge.zero {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  color: var(--text-disabled);
}

/* ── Outfit boxes ── */
.outfit-row {
  display: flex;
  gap: 10px;
}

.outfit-box {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
}

.outfit-box .outfit-label {
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 8px;
}

.outfit-box .outfit-value {
  font-size: 18px;
  font-weight: 600;
}

/* ── Accessory tags ── */
.tag-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tag-list li {
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
}

/* ── Summary callout ── */
.summary-callout {
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.summary-callout.warm {
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.19);
}

.summary-callout.warm .callout-title {
  font-size: 13px;
  color: #f97316;
  font-weight: 600;
  margin-bottom: 4px;
}

.summary-callout.warm .callout-body {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.summary-callout.cool {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.summary-callout.cool .callout-body {
  font-size: 12px;
  color: var(--text-label);
  line-height: 1.5;
}

.summary-callout.recommend {
  background: rgba(249,115,22,0.08);
  border: 1px solid rgba(249,115,22,0.19);
}

.summary-callout.recommend .callout-title {
  font-size: 13px;
  color: #f97316;
  font-weight: 600;
  margin-bottom: 4px;
}

.summary-callout.recommend .callout-body {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Slot grid (Rest of Day / Tomorrow Summary) ── */
.slot-grid {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.slot-card {
  flex: 1;
  background: var(--bg-input);
  border-radius: 6px;
  padding: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slot-label {
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
}

.slot-time {
  font-size: 10px;
  color: var(--text-dim);
  margin: 0 0 2px;
}

.slot-temp {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 2px 0 0;
}

.slot-temp strong {
  font-size: 20px;
  font-weight: 700;
}

.slot-temp .eff-label {
  font-size: 11px;
  color: var(--text-faint);
}

.slot-meta {
  font-size: 11px;
  color: var(--text-label);
  margin: 2px 0 0;
}

/* ── Timeline ── */
.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 10px;
}

.hour-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  position: relative;
}

.hour-row.is-now {
  background: var(--bg-secondary);
  border: 1px solid #f97316;
}

.hour-row.is-past {
  opacity: 0.4;
}

.now-badge {
  position: absolute;
  top: -8px;
  left: 10px;
  background: #f97316;
  color: #000;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  letter-spacing: 1px;
}

.hour-top {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.hour-time {
  min-width: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  padding-top: 2px;
}

.hour-row.is-now .hour-time {
  color: var(--text-heading);
}

.hour-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.hour-main .actual {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.hour-main .eff {
  font-size: 12px;
  color: var(--text-faint);
}

.hour-conditions {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.hour-outfit {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 2px;
  min-width: 78px;
  margin-left: auto;
}

.hour-outfit .outfit-top {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.hour-outfit .outfit-bottom {
  font-size: 11px;
  opacity: 0.78;
  white-space: nowrap;
}

.hour-tags {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 150px;
  flex-shrink: 1;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
}

.mini-tag {
  flex: 0 0 auto;
  font-size: 9px;
  font-weight: 600;
  border-radius: 3px;
  padding: 1px 5px;
  line-height: 1.3;
  white-space: nowrap;
}

/* ── Survey card ── */
.survey-card {
  padding: 16px;
}

.survey-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.survey-dismiss {
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.survey-question {
  font-size: 13px;
  color: var(--text);
  margin: 0 0 14px;
}

.survey-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 14px;
  line-height: 1.5;
}

.survey-buttons {
  display: flex;
  gap: 8px;
}

.survey-btn {
  flex: 1;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  padding: 10px 14px;
  text-align: center;
}

.survey-emoji {
  display: block;
  font-size: 18px;
  line-height: 1;
  margin-bottom: 4px;
}

.survey-btn-cold {
  background: rgba(96,165,250,0.08);
  color: #60a5fa;
  border: 1px solid rgba(96,165,250,0.3);
}

.survey-btn-good {
  background: rgba(34,197,94,0.08);
  color: #22c55e;
  border: 1px solid rgba(34,197,94,0.3);
}

.survey-btn-hot {
  background: rgba(249,115,22,0.08);
  color: #f97316;
  border: 1px solid rgba(249,115,22,0.3);
}

.survey-btn:hover {
  filter: brightness(1.15);
}

.survey-actions {
  display: flex;
  gap: 8px;
}

.survey-actions .btn-primary,
.survey-actions .btn-secondary {
  flex: 1;
}

.survey-q-label {
  font-size: 12px;
  color: var(--text);
  margin: 0 0 8px;
}

.survey-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.survey-chip {
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  padding: 8px 10px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-btn);
  transition: all 0.15s ease;
}

.survey-chip.selected {
  background: rgba(249,115,22,0.18);
  color: #f97316;
  border: 1px solid rgba(249,115,22,0.5);
}

.survey-chip:hover:not(.selected) {
  background: var(--bg-hover);
}

.survey-actions .btn-primary:disabled {
  background: rgba(249,115,22,0.35);
  cursor: not-allowed;
}

/* ── Error state ── */
.error-state {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
}

.error-state h2 {
  margin: 0;
  color: #ef4444;
  font-size: 16px;
}

.error-state p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

/* ── Footer ── */
footer {
  font-size: 11px;
  color: var(--text-disabled);
}

footer p {
  margin: 0;
}

/* ── Muted text ── */
.muted-text {
  color: var(--text-label);
  font-size: 12px;
  margin: 0;
}

/* ── Hint ── */
.hint {
  margin: 0 0 12px;
  font-size: 11px;
  color: var(--text-disabled);
}

.hint code {
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--shimmer);
  font-size: 10px;
}

/* ── Location bar ── */
.location-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.loc-left {
  position: relative;
  min-width: 0;
}

.loc-name-btn {
  background: transparent;
  border: none;
  padding: 2px 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.loc-name-btn:hover {
  color: var(--text-heading);
}

.loc-chevron {
  flex-shrink: 0;
}

.loc-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.loc-refresh-btn {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
}

.loc-settings-btn {
  padding: 6px 10px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

/* ── Location dropdown ── */
.loc-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  background: var(--bg-card);
  border: 1px solid var(--bg-hover);
  border-radius: 8px;
  min-width: 260px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.8);
  overflow: hidden;
}

.loc-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 9px 14px;
  font-size: 11px;
  font-family: inherit;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-weight: 500;
}

.loc-dropdown-item:hover {
  background: rgba(249,115,22,0.08);
  color: #f97316;
}

.loc-dropdown-item:last-child {
  border-bottom: none;
}

.loc-dropdown-meta {
  color: var(--text-disabled);
  font-size: 10px;
  margin-left: auto;
}

.loc-search-toggle {
  font-weight: 600;
}

/* ── Location search panel ── */
.loc-search-panel {
  padding: 10px;
  background: var(--bg-page);
}

.loc-search-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.loc-search-row input {
  flex: 1;
  padding: 7px 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-btn);
  border-radius: 4px;
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
}

.loc-search-row .btn-secondary {
  padding: 7px 10px;
  font-size: 10px;
  border-radius: 4px;
}

.search-error {
  font-size: 10px;
  color: #ef4444;
  margin-top: 4px;
}

.search-result {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
  padding: 8px;
  margin-bottom: 6px;
}

.search-result-name {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.search-result-actions {
  display: flex;
  gap: 6px;
}

.search-result-actions .btn-secondary {
  flex: 1;
  padding: 5px 6px;
  font-size: 10px;
  border-radius: 4px;
}

.search-result-btn {
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  font-size: 12px;
  font-family: inherit;
  background: var(--bg-input);
  border: 1px solid var(--border-btn);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 6px;
}

.search-result-btn:hover {
  background: rgba(249,115,22,0.15);
  border-color: #f97316;
  color: #f97316;
}

.search-result-btn.active {
  background: rgba(249,115,22,0.15);
  border-color: #f97316;
  color: #f97316;
}

/* ── View + adj row ── */
.view-adj-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.view-adj-row .view-switch {
  flex: 1;
  margin-bottom: 0;
}

.adj-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border-radius: 6px;
  padding: 16px 12px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
}

.adj-pill.active {
  background: rgba(249,115,22,0.1);
  border: 1px solid rgba(249,115,22,0.5);
  color: #f97316;
  font-weight: 700;
}

.adj-pill.inactive {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-faint);
  font-weight: 400;
}

/* ── Settings modal ── */
.settings-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 280;
}

.settings-panel {
  --settings-pad: 16px;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-btn);
  border-radius: 12px;
  padding: var(--settings-pad);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.55);
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 2px 2px 4px;
}

.settings-eyebrow {
  font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 1.3px;
}

.settings-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-heading);
  margin-top: 2px;
}

.settings-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--border-btn);
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  font-family: inherit;
  cursor: pointer;
}

.settings-close-btn:hover {
  background: var(--bg-hover);
  color: var(--text-heading);
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.settings-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0;
  letter-spacing: 0.2px;
}

.settings-label {
  font-size: 11px;
  color: var(--text-label);
  margin: 0;
}

.settings-feedback-input {
  width: 100%;
  resize: vertical;
  min-height: 72px;
}

.settings-feedback-meta {
  margin-top: -4px;
  font-size: 10px;
  color: var(--text-faint);
  text-align: right;
}

.settings-footer {
  position: sticky;
  bottom: calc(-1 * var(--settings-pad));
  margin: 0 calc(-1 * var(--settings-pad)) calc(-1 * var(--settings-pad));
  padding: 12px var(--settings-pad) var(--settings-pad);
  background: var(--bg-card);
  box-shadow: 0 -8px 16px rgba(0,0,0,0.28);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1;
}

.settings-save-btn {
  width: 100%;
}

.settings-survey-btn {
  width: 100%;
}

.settings-extended-survey {
  gap: 10px;
}

.settings-status {
  min-height: 14px;
  font-size: 11px;
  color: var(--text-dim);
}

.settings-status.error {
  color: #ef4444;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 380;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.onboarding-panel {
  width: min(680px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border-btn);
  background: var(--bg-card);
  box-shadow: 0 18px 48px rgba(0,0,0,0.55);
}

.onboarding-title {
  margin: 0;
  font-size: 18px;
  color: var(--text-heading);
}

.onboarding-copy {
  margin: 0;
  font-size: 12px;
  color: var(--text-dim);
}

.onboarding-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.onboarding-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onboarding-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 4px;
}

.onboarding-dot {
  width: 8px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-btn);
  transition: width 0.2s ease;
}

.onboarding-dot.active {
  width: 24px;
  background: #f97316;
}

.onboarding-answer-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.onboarding-answer-btn {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text);
  text-align: left;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
}

.onboarding-answer-btn.active,
.onboarding-answer-btn:hover {
  border-color: #f97316;
  color: #f97316;
  background: rgba(249,115,22,0.1);
}

.onboarding-link-btn {
  border: none;
  background: transparent;
  color: var(--text-faint);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 6px 0;
}

.onboarding-gps-btn {
  width: 100%;
}

.onboarding-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}

.onboarding-adj-total {
  font-size: 42px;
  line-height: 1;
  text-align: center;
  font-weight: 700;
  color: #f97316;
}

.onboarding-summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 12px;
}

.onboarding-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.onboarding-summary-label {
  color: var(--text-dim);
}

.onboarding-summary-points {
  color: #f97316;
  font-weight: 700;
}

.onboarding-submit-btn {
  width: 100%;
}

/* ── Theme picker ── */
.theme-picker {
  display: flex;
  gap: 8px;
}

.theme-picker-btn {
  flex: 1;
  padding: 8px 10px;
  font-size: 11px;
  font-family: inherit;
  font-weight: 600;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border-btn);
  border-radius: 6px;
  cursor: pointer;
}

.theme-picker-btn.active {
  background: #f97316;
  color: #000;
  border-color: #f97316;
}

/* ── Adjustment slider ── */
.adj-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.adj-desc {
  font-size: 11px;
  color: var(--text-dim);
}

.adj-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.adj-slider {
  width: 100%;
  accent-color: #f97316;
  margin-bottom: 4px;
}

.adj-scale {
  font-size: 10px;
  color: var(--text-faint);
  text-align: center;
}

/* ── Home location selected ── */
.home-selected {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  margin: 0;
}

.home-selected-label {
  font-size: 10px;
  color: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.home-selected-name {
  font-size: 12px;
  color: var(--text-heading);
  font-weight: 600;
}

.home-selected-coords {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* ── Hidden form ── */
#rec-form {
  display: none;
}

/* ── Mobile breakpoint ── */
@media (max-width: 520px) {
  .app-shell {
    width: min(640px, 100% - 16px);
    margin-top: 16px;
  }

  .hour-row {
    gap: 5px;
    padding: 9px 11px;
  }

  .hour-top {
    gap: 10px;
  }

  .hour-main {
    gap: 5px;
  }

  .hour-outfit {
    min-width: 70px;
  }

  .hour-tags {
    max-width: 108px;
  }

  .hour-time {
    font-size: 11px;
  }

  .hour-conditions {
    font-size: 10px;
  }

  .hour-main .actual {
    font-size: 18px;
  }

  .mod-badges {
    gap: 3px;
  }

  .mod-badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  .location-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .loc-dropdown {
    min-width: calc(100vw - 48px);
  }

  .view-adj-row {
    gap: 6px;
  }

  .settings-panel {
    --settings-pad: 12px;
    width: min(640px, calc(100vw - 12px));
    max-height: calc(100vh - 16px);
    padding: var(--settings-pad);
  }

  .settings-section {
    padding: 12px;
  }

  .settings-modal-title {
    font-size: 14px;
  }

  .onboarding-panel {
    width: min(680px, calc(100vw - 12px));
    max-height: calc(100vh - 12px);
    padding: 12px;
  }

  .onboarding-title {
    font-size: 16px;
  }
}
