*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:system-ui, -apple-system, sans-serif;
  background:#0b0f19;
  color:#e2e8f0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
.header{
  background:linear-gradient(135deg,#111827,#0f172a);
  border-bottom:1px solid #1e293b;
  padding:24px 16px 12px;
  position: relative;
}
.header-container {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  width: 100%;
}
.header-text {
  text-align: center;
}
.header h1{
  font-size:28px;
  font-weight:800;
  letter-spacing:1px;
  color:#fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.header h1 span.highlight{
  color:#3b82f6;
  margin-left: 6px;
}
.header h1 span.version {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 10px;
  vertical-align: middle;
}
.header p{
  font-size:10.5px;
  color:#94a3b8;
  margin-top:4px;
}

.video-banner {
  max-width: 640px;
  width: 70%;
  height: 60px;
  margin: 12px auto 0;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(16, 24, 40, 0.3);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.video-banner video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.8;
}

.body{
  flex:1;
  padding:16px 12px 32px;
}
.app{
  max-width:640px;
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:16px;
  width:100%;
}
.card{
  background:#111827;
  border-radius:12px;
  border:1px solid #1e293b;
  padding:16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  margin-bottom: 16px;
}
.card:last-child {
  margin-bottom: 0;
}
.card-title{
  font-size:11px;
  font-weight:700;
  color:#3b82f6;
  letter-spacing:1px;
  text-transform:uppercase;
  margin-bottom:12px;
  display:flex;
  align-items:center;
  gap:6px;
}
.upload-area{
  border:2px dashed #334155;
  border-radius:10px;
  padding:24px 16px;
  cursor:pointer;
  transition:.2s;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:#0f172a;
}
.upload-area:hover{
  border-color:#3b82f6;
  background:rgba(59,130,246,.05);
}
.upload-area.has-file{
  border-color:#10b981;
  border-style:solid;
  background:rgba(16,185,129,.05);
}
.upload-area input{display:none}
.upload-text{flex:1; min-width:0;}
.upload-label{font-size:12.5px;color:#cbd5e1;font-weight:600;white-space:normal;line-height:1.4;cursor:pointer}
.upload-sub{font-size:10.5px;color:#64748b;margin-top:2px}
.file-name{font-size:11.5px;font-weight:600;color:#10b981;margin-top:4px;word-break:break-all}
.upload-btn-label{
  padding:8px 16px;
  border:1px solid #3b82f6;
  border-radius:6px;
  background:rgba(59,130,246,.1);
  color:#3b82f6;
  font-size:11px;
  font-weight:600;
  white-space:nowrap;
  cursor:pointer;
  flex-shrink: 0;
}
.upload-btn-label:hover{
  background:#3b82f6;
  color:#fff;
}
.hl-row{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:nowrap;
}
.hl-label{
  font-size:13px;
  font-weight:400;
  color:#f1f5f9;
  flex:1;
  min-width:0;
}
.toggle{position:relative;width:44px;height:24px;flex-shrink:0}
.toggle input{opacity:0;width:0;height:0}
.slider{
  position:absolute;
  inset:0;
  background:#334155;
  border-radius:24px;
  cursor:pointer;
  transition:.25s;
}
.slider:before{
  content:'';
  position:absolute;
  width:18px;
  height:18px;
  left:3px;
  top:3px;
  background:#94a3b8;
  border-radius:50%;
  transition:.25s;
}
.toggle input:checked+.slider{background:#3b82f6}
.toggle input:checked+.slider:before{transform:translateX(20px);background:#fff}

.engine-mode{
  display:inline-flex;
  align-items:center;
  gap:3px;
  min-width:0;
  margin:0;
  padding:3px;
  border:1px solid #334155;
  border-radius:8px;
  background:#0f172a;
}
.engine-mode-option{position:relative;cursor:pointer;white-space:nowrap}
.engine-mode-option input{position:absolute;opacity:0;pointer-events:none}
.engine-mode-option span{
  display:block;
  padding:7px 10px;
  border-radius:5px;
  color:#94a3b8;
  font-size:13px;
  font-weight:400;
  line-height:1.2;
  transition:background .2s,color .2s;
}
.engine-mode-option input:checked+span{background:#2563eb;color:#fff}
.engine-mode-option input:focus-visible+span{outline:2px solid #93c5fd;outline-offset:2px}
.compact-settings-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: 8px; }
.settings-heading-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.settings-heading-row .card-title { margin-bottom: 0; min-width: 0; line-height: 28px; }
.settings-heading-row .dropdown-wrap { flex-shrink: 0; }
.settings-heading-row .dropdown-btn { padding: 7px 9px; font-size: 11px; }
.compact-settings-row .engine-mode { flex-direction: row; width: auto; padding: 2px; gap: 2px; }
.compact-settings-row .engine-mode-option { flex: 1; white-space: normal; }
.compact-settings-row .engine-mode-option span { padding: 6px 5px; font-size: 11px; text-align: center; height: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.compact-settings-row .dropdown-btn { padding: 8px 10px; font-size: 12px; }
@media(max-width:560px){
  .engine-mode{flex-direction:column;align-items:stretch;width:100%}
  .engine-mode-option span{text-align:center}
}

.bookmark-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; padding: 16px; border: 1px solid #334155; border-radius: 12px; background: #0f172a; }
.bookmark-settings[hidden] { display: none; }
.bookmark-settings-copy { flex: 1 1 240px; }
.bookmark-settings-copy label { color: #bfdbfe; font-size: 12px; font-weight: 700; letter-spacing: 1px; }
.bookmark-settings-copy p, .bookmark-settings-hint { margin: 6px 0 0; color: #94a3b8; font-size: 12px; line-height: 1.6; }
.bookmark-settings select { max-width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #93c5fd; border-radius: 8px; background: #dbeafe; color: #183153; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.bookmark-settings select:focus-visible { outline: 2px solid #60a5fa; outline-offset: 3px; }
.bookmark-settings-hint { flex-basis: 100%; }
.settings-subrow{
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid #1e293b;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:14px;
}
.marker-style-group,.marker-color-group{
  display:flex;
  align-items:center;
  gap:10px;
}
.settings-subrow-label{
  font-size:11px;
  font-weight:700;
  color:#94a3b8;
  letter-spacing:0.5px;
  white-space:nowrap;
}
.marker-mode-switch{
  display:flex;
  align-items:center;
  gap:10px;
}
.marker-mode-label{
  font-size:12px;
  font-weight:600;
  color:#64748b;
  transition:color .2s;
}
.marker-mode-label.active{
  color:#f1f5f9;
}
.color-swatch-row{
  display:flex;
  gap:8px;
}

.dropdown-wrap{position:relative;flex-shrink:0}
.dropdown-btn{
  padding:8px 12px;
  border:1px solid #334155;
  border-radius:8px;
  background:#0f172a;
  font-size:12px;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:6px;
  color:#cbd5e1;
  white-space:nowrap;
  transition:.15s;
}
.dropdown-btn:hover{border-color:#3b82f6;color:#3b82f6}
.badge-count{
  background:#3b82f6;
  color:#fff;
  border-radius:10px;
  font-size:10px;
  padding:1px 6px;
  font-weight:700;
}
.badge-count.all{background:#10b981}
.arrow{font-size:8px;transition:.2s}
.dropdown-btn.open .arrow{transform:rotate(180deg)}
.dropdown-menu{
  position:absolute;
  background:#1e293b;
  border:1px solid #334155;
  border-radius:12px;
  padding:8px 0;
  max-width:240px;
  width:90%;
  z-index:1000;
  box-shadow:0 10px 15px -3px rgba(0,0,0,.5);
  max-height:220px;
  overflow-y:auto;
  text-align:left;
  left:50%;
  transform:translateX(-50%);
  top:calc(100% + 6px);
}
.menu-section{padding:4px 12px;font-size:9px;font-weight:700;color:#64748b;letter-spacing:1px;text-transform:uppercase}
.menu-actions{padding:4px 12px;border-bottom:1px solid rgba(148,163,184,.15)}
.menu-actions button{width:100%;padding:5px 8px;border:1px solid rgba(148,163,184,.3);border-radius:4px;background:rgba(59,130,246,.12);color:#cbd5e1;font-size:11px;cursor:pointer}
.menu-item{display:flex;align-items:center;gap:8px;padding:6px 12px;cursor:pointer;font-size:12.5px;color:#cbd5e1;transition:.1s}
.menu-item:hover{background:rgba(59,130,246,.1);color:#fff}
.menu-item input[type=checkbox]{width:14px;height:14px;cursor:pointer;accent-color:#3b82f6;flex-shrink:0}
.custom-title-row{display:flex;align-items:center;justify-content:space-between;gap:8px}
.custom-mode-switch{gap:7px}

.custom-add-wrap{padding:0}
.custom-add-row{display:flex;gap:6px}
.custom-add-row input{
  flex:1;
  background:#0f172a;
  border:1px solid #334155;
  border-radius:8px;
  padding:8px 10px;
  font-size:12.5px;
  color:#fff;
  outline:none;
  transition:.15s;
}
.custom-add-row input:focus{border-color:#3b82f6}
.custom-add-row input::placeholder{color:#475569}
.custom-add-row button{
  padding:8px 14px;
  border:none;
  border-radius:8px;
  background:#3b82f6;
  color:#fff;
  font-size:12.5px;
  font-weight:600;
  cursor:pointer;
}
.custom-add-row button:hover{background:#2563eb}
.tag-list{display:flex;flex-wrap:wrap;align-content:flex-start;gap:4px;margin-top:10px;height:160px;overflow-y:auto;padding:8px;border:1px solid #334155;border-radius:8px;background:#0f172a;box-sizing:border-box;overscroll-behavior:contain}
.tag{display:inline-flex;align-items:center;gap:4px;padding:3px 6px;border-radius:5px;font-size:9px;font-weight:600;line-height:1.3;max-width:100%;overflow-wrap:anywhere;box-sizing:border-box}
.tag-list:empty{display:none!important}
.tag-remove{cursor:pointer;opacity:.6;font-size:11px}
.tag-remove:hover{opacity:1}

.color-chip {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}
.color-chip:hover {
  transform: scale(1.15);
}
.color-chip.active {
  border-color: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.action-btn{
  width:100%;
  padding:12px;
  border:none;
  border-radius:8px;
  font-size:13px;
  font-weight:700;
  letter-spacing:.5px;
  transition:.25s;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  cursor:not-allowed;
}
.run-btn{background:#334155;color:#64748b}
.run-btn.active{
  background:linear-gradient(90deg,#a7f3d0,#86efac);
  color:#064e3b;
  cursor:pointer;
  border:1px solid #6ee7b7;
  font-weight:800;
  box-shadow: 0 4px 10px rgba(134, 239, 172, 0.2);
}
.run-btn.active:hover{filter:brightness(1.05);transform:translateY(-1px); box-shadow: 0 4px 12px rgba(134, 239, 172, 0.4);}

.dl-btn{background:#334155;color:#64748b}
.dl-btn.active{
  background:linear-gradient(90deg,#bfdbfe,#93c5fd);
  color:#1e3a8a;
  cursor:pointer;
  border:1px solid #93c5fd;
  font-weight:800;
  box-shadow: 0 4px 10px rgba(147, 197, 253, 0.2);
}
.dl-btn.active:hover{filter:brightness(1.05);transform:translateY(-1px); box-shadow: 0 4px 12px rgba(147, 197, 253, 0.4);}

.status-bar{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:8px;
  font-size:11.5px;
  font-weight:500;
  margin-top:10px;
  background:#0f172a;
  border:1px solid #1e293b;
  color:#64748b;
  min-height:40px;
}
.status-bar.ready{color:#3b82f6;border-color:#334155}
.status-bar.processing{color:#f59e0b;border-color:#451a03}
.status-bar.done{color:#10b981;border-color:#064e3b}
.status-bar.error{color:#ef4444;border-color:#7f1d1d}
.status-dot{width:8px;height:8px;border-radius:50%;background:currentColor;flex-shrink:0}
.status-bar.processing .status-dot{animation:pulse 1s infinite}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.3}}

.offline-instruction {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  font-size: 10.5px;
  color: #93c5fd;
  line-height: 1.4;
}
.offline-instruction b {
  color: #fff;
}

.offline-row-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(30, 41, 59, 0.3);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  width: 100%;
}
.offline-row-links span {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}
.inline-download-btn {
  font-size: 11px;
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  padding: 5px 10px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.05);
  border-radius: 5px;
  transition: all 0.2s;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.inline-download-btn:hover {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.survey-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 48px;
  background: #3b82f6;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s ease;
}
.survey-btn:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.engine-help-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.engine-help-actions .survey-btn { min-width: 243px; box-sizing: border-box; font: 700 13px/1.4 system-ui, -apple-system, sans-serif; letter-spacing: normal; }


/* Header interactions */
.header-text h1 {
  cursor: pointer;
  user-select: none;
}
.header-text h1:hover {
  opacity: 0.8;
  transition: opacity 0.2s;
}

/* Airport Safety Briefing Banner */
.safety-banner {
  display: flex;
  align-items: center;
  align-self: center;
  width: calc(100% - 24px);
  box-sizing: border-box;
  gap: 14px;
  background: linear-gradient(110deg, #102a43 0%, #111827 58%, #172554 100%);
  border-radius: 14px;
  padding: 17px 20px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.25s ease;
  box-shadow: 0 5px 18px rgba(14, 116, 144, 0.16);
  border: 1px solid #25617a;
  margin-bottom: 16px;
}
.safety-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgba(14, 165, 233, 0.24);
  border-color: #38bdf8;
}
.safety-banner:focus-visible {
  outline: 3px solid #7dd3fc;
  outline-offset: 3px;
}
.safety-banner-text {
  color: #ffffff;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.safety-banner-destination {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #facc15;
  color: #172554;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.7px;
}
.safety-banner-destination[hidden] { display: none; }
.safety-banner.is-ready {
  background: linear-gradient(105deg, #064e3b 0%, #0f3b55 55%, #172554 100%);
  border: 2px solid #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14), 0 8px 24px rgba(16, 185, 129, 0.3);
  animation: briefing-ready 0.75s ease-out 1;
}
.safety-banner.is-ready .safety-banner-icon {
  background: rgba(52, 211, 153, 0.2);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.25);
}
.safety-banner.is-ready .safety-banner-subtitle { color: #d1fae5; font-weight: 600; }
.safety-banner.is-ready .safety-banner-cta {
  padding: 11px 15px;
  border-color: #facc15;
  background: #facc15;
  color: #172554;
  font-size: 12px;
  box-shadow: 0 3px 12px rgba(250, 204, 21, 0.25);
}
@keyframes briefing-ready {
  0% { transform: scale(0.985); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  65% { transform: scale(1.01); box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { transform: scale(1); }
}
.safety-banner-copy { flex: 1; min-width: 0; }
.safety-banner-subtitle {
  margin-top: 4px;
  color: #bae6fd;
  font-size: 12px;
  line-height: 1.35;
}
.safety-banner-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 7px;
  border-radius: 11px;
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.12);
}
.safety-banner-icon svg { width: 34px; height: 34px; }
.safety-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 9px 12px;
  border: 1px solid rgba(125, 211, 252, 0.4);
  border-radius: 9px;
  background: rgba(14, 165, 233, 0.16);
  color: #e0f2fe;
  font-size: 11.5px;
  font-weight: 700;
  transition: background 0.2s ease;
}
.safety-banner:hover .safety-banner-cta { background: rgba(14, 165, 233, 0.3); }
@media (max-width: 520px) {
  .safety-banner { gap: 10px; padding: 14px; }
  .safety-banner-cta { padding: 8px 9px; font-size: 10px; }
  .safety-banner-text { flex-wrap: wrap; font-size: 12px; }
  .safety-banner-subtitle { font-size: 11px; }
  .safety-banner.is-ready .safety-banner-cta { padding: 9px 10px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .safety-banner.is-ready { animation: none; }
}

.offline-help-btn { border: 0; cursor: pointer; font-family: inherit; background: #0f766e; }
.offline-help-btn:hover { background: #0d9488; box-shadow: 0 4px 12px rgba(13, 148, 136, 0.35); }
.offline-help-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}
.offline-help-backdrop[hidden] { display: none; }
.offline-help-dialog {
  position: relative;
  width: min(100%, 560px);
  max-height: min(85vh, 700px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid #334155;
  border-radius: 14px;
  background: #111827;
  color: #e2e8f0;
  font-family: inherit;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  line-height: 1.6;
}
.offline-help-dialog h2 { margin: 0 36px 14px 0; color: #60a5fa; font-size: 19px; }
.offline-help-dialog ol { padding-left: 22px; margin: 0; }
.offline-help-dialog li { padding-left: 3px; margin: 0 0 10px; }
.offline-help-dialog p { margin: 14px 0 0; color: #94a3b8; font-size: 13px; }
.offline-help-dialog code { color: #bfdbfe; }
#offlineHelpModal .offline-help-intro { margin: 0 0 18px; color: #cbd5e1; font-size: 14px; }
#offlineHelpModal li { margin-bottom: 14px; }
#offlineHelpModal li strong { color: #f1f5f9; }
#offlineHelpModal mark { background: #dbeafe; color: #183153; border-radius: 5px; padding: 2px 5px; box-decoration-break: clone; -webkit-box-decoration-break: clone; font-weight: 600; }
#offlineHelpModal li:nth-child(3) mark { background: #ede9fe; color: #45316b; }
#offlineHelpModal li:nth-child(5) mark { background: #dcfce7; color: #14532d; }
#offlineHelpModal a { color: #bfdbfe; text-decoration: underline; }
#offlineHelpModal .offline-help-notice { padding: 12px; border-left: 3px solid #fde68a; border-radius: 6px; background: #29271f; color: #fef3c7; font-size: 14px; }
.offline-help-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #1e293b;
  color: #e2e8f0;
  font-size: 25px;
  cursor: pointer;
}


/* Consistent compact segmented controls across settings. */
.engine-mode,
.compact-settings-row .engine-mode {
  display: flex;
  flex-direction: row;
  width: 272px;
  max-width: 100%;
  flex-shrink: 0;
  padding: 2px;
  gap: 2px;
  align-items: stretch;
  box-sizing: border-box;
}
.engine-mode-option,
.compact-settings-row .engine-mode-option {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
}
.engine-mode-option span,
.compact-settings-row .engine-mode-option span {
  height: auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 7px 10px;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}
.compact-settings-row { display: flex; flex-wrap: wrap; gap: 8px; }
.marker-style-group { flex-wrap: wrap; max-width: 100%; }
.custom-title-row { flex-wrap: wrap; gap: 10px; }

/* Equal-width labeled settings groups in the compact card. */
.app { max-width: 640px; }
.compact-settings-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.settings-control-group { min-width: 0; }
.settings-group-label { display: block; margin-bottom: 6px; color: #94a3b8; font-size: 11px; font-weight: 600; line-height: 1.4; }
.compact-settings-row .engine-mode { width: 100%; }
.compact-settings-row .engine-mode-option { flex: 1 1 0; }
.compact-settings-row .engine-mode-option span { padding: 7px 6px; }
.custom-title-row .selection-mode { width: auto; text-transform: none; letter-spacing: normal; }
.custom-title-row .selection-mode .engine-mode-option { flex: 1 1 0; }
.custom-title-row .selection-mode span { padding: 7px 14px; }
@media(max-width:600px) {
  .compact-settings-row { grid-template-columns: 1fr; gap: 12px; }
}

/* Form controls use the same font family as the surrounding body text. */
button, input, select, textarea { font-family: inherit; }

/* Quiet visual hierarchy: document controls first, support actions second. */
.header { background: #0f172a; padding: 24px 16px; }
.header-text { text-align: center; }
.header h1 { justify-content: center; flex-wrap: wrap; row-gap: 6px; }
.header p { font-size: 12px; line-height: 1.5; margin-top: 7px; }
.card { margin-bottom: 0; box-shadow: none; }
.card-title { color: #a8c4ef; letter-spacing: .6px; }
.settings-heading-row { align-items: center; }
.settings-heading-row .card-title { line-height: 1.5; }
.safety-banner { width: 100%; margin-bottom: 0; padding: 14px 16px; gap: 12px; border-radius: 12px; background: #111c2c; border-color: #26364b; box-shadow: none; }
.safety-banner:hover { transform: none; box-shadow: none; border-color: #3b82f6; }
.safety-banner-text { font-size: 12px; letter-spacing: .2px; }
.safety-banner-subtitle { color: #94a3b8; }
.safety-banner-icon { padding: 6px; background: #162e46; box-shadow: none; border-radius: 8px; }
.safety-banner-icon svg { width: 28px; height: 28px; }
.safety-banner-cta { background: transparent; border-color: #334155; font-size: 11px; padding: 7px 10px; }
.demo-label { color: #94a3b8; font-size: 10px; font-weight: 500; letter-spacing: normal; }
.color-chip.active { box-shadow: none; transform: none; }
.color-chip:hover { transform: none; }
.run-btn.active { background: #2563eb; color: #fff; border: 1px solid #3b82f6; box-shadow: none; }
.run-btn.active:hover { background: #1d4ed8; transform: none; box-shadow: none; }
.engine-help-actions { gap: 10px; }
.engine-help-actions .survey-btn { min-width: 0; flex: 1; padding: 9px 14px; background: #0f172a; border: 1px solid #334155; color: #cbd5e1; font-weight: 600; }
.engine-help-actions .survey-btn:hover { background: #1e293b; transform: none; box-shadow: none; }
@media(max-width:600px) {
  .header h1 { font-size: 24px; letter-spacing: .4px; }
  .header h1 span.version { margin-left: 0; }
  .safety-banner { flex-wrap: wrap; }
  .safety-banner-copy { flex-basis: calc(100% - 54px); }
  .safety-banner-cta { margin-left: 52px; }
  .custom-add-row input { min-width: 0; }
}
