/* A quiet field guide. Scoped so the rest of the expedition UI keeps its layout. */
#panel.settings-panel {
  width: 1020px;
  padding: 0;
  max-height: 92vh;
  max-height: 92dvh;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(125deg, #243631fa, #142727fc 60%, #132224fc);
}
#panel.settings-panel #panel-content {
  padding: 0 30px 18px;
  max-height: calc(92vh - 2px);
  max-height: calc(92dvh - 2px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #71827870 transparent;
  scroll-padding: 75px 0 20px;
}
#panel.settings-panel .pack-nav {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 -30px 22px;
  padding: 10px 66px 0 30px;
  gap: 18px;
  background: #1d302efc;
  border-bottom: 1px solid #d7e5d719;
}
#panel.settings-panel .pack-nav button { padding: 12px 4px 14px; background: none; border-radius: 0; }
#panel.settings-panel #close-panel {
  z-index: 3;
  top: 12px;
  right: 17px;
  width: 34px;
  height: 34px;
  min-width: 34px;
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 25px;
  color: #c3cfc4;
  border: 1px solid #cedecc25;
  border-radius: 50%;
  background: #1d302e;
}
.settings-page { --settings-gold: #e4c292; --settings-mint: #a6cbb8; --settings-line: #c9dcc623; color: #f2eddf; }
.settings-page button { transition: background .15s, border-color .15s, color .15s; }
.settings-page button:focus-visible, .settings-page input:focus-visible { outline: 2px solid var(--settings-gold); outline-offset: 3px; }
.settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.settings-overline { font-size: 9px; font-weight: 600; letter-spacing: .2em; color: #b7c8b6; }
#panel .settings-heading h2 { font-size: 29px; font-weight: 450; margin: 5px 0 0; letter-spacing: -.04em; }
.settings-autosave { display: flex; align-items: center; gap: 7px; color: #a4b8aa; font-size: 10px; white-space: nowrap; }
.settings-autosave i { width: 5px; height: 5px; border-radius: 50%; background: #b6d2a8; box-shadow: 0 0 10px #b6d2a824; }
.settings-section { margin: 0 0 22px; }
.settings-developer { border: 1px dashed #e4c29270; border-radius: 10px; padding: 16px; }
#panel .settings-developer p { font-size: 12px; line-height: 1.6; color: #b7c8b6; margin: 0 0 14px; }
.developer-travel-controls { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; }
.developer-travel-controls label { display: grid; gap: 7px; flex: 1 1 210px; min-width: 0; font-size: 11px; }
.developer-travel-controls select { width: 100%; min-height: 44px; color: #f2eddf; background: #243631; border: 1px solid #c9dcc640; border-radius: 6px; padding: 10px; font: inherit; font-size: 13px; color-scheme: dark; }
.developer-travel-controls button { min-height: 44px; flex: 1 1 210px; background: #e4c292; color: #142727; }
.developer-travel-controls select:focus-visible { outline: 2px solid var(--settings-gold); outline-offset: 3px; }
.developer-travel-controls :disabled { opacity: .5; cursor: not-allowed; }
#panel .settings-section h3 { font-size: 13px; font-weight: 600; margin: 0 0 10px; display: flex; align-items: baseline; gap: 12px; }
.settings-section h3 > span { font-size: 10px; font-weight: 400; color: #a8b9ae; }
.explorer-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.explorer-choice { position: relative; display: flex; align-items: center; min-width: 0; height: 106px; padding: 0 14px 0 0; text-align: left; border: 1px solid var(--settings-line); border-radius: 10px; background: radial-gradient(ellipse at 18% 100%, #b5c9a918, transparent 80%); overflow: hidden; }
.explorer-choice img { width: 106px; height: 106px; flex: 0 0 106px; object-fit: cover; object-position: center 9px; filter: drop-shadow(0 5px 7px #0004); }
.explorer-name { display: block; font-size: 14px; font-weight: 500; z-index: 1; }
.explorer-name small { display: block; max-width: 135px; font-size: 10px; line-height: 1.5; font-weight: 400; color: #b3c0b2; margin-top: 4px; }
.choice-check { position: absolute; right: 8px; top: 8px; width: 16px; height: 16px; display: grid; place-items: center; border: 1px solid #c6d3bb35; border-radius: 50%; font-size: 10px; color: transparent; }
.explorer-choice[aria-pressed=true] { border-color: #d9b98cc9; background: radial-gradient(ellipse at 18% 100%, #d4b88838, transparent 90%), #d9b98c08; }
.explorer-choice[aria-pressed=true] .choice-check { color: #20322b; background: var(--settings-gold); border-color: var(--settings-gold); }
.explorer-choice:hover { background-color: #d9b98c10; border-color: #d9b98c80; }
.device-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.device-picker button { display: flex; gap: 12px; align-items: center; min-width: 0; padding: 12px 16px; min-height: 70px; background: #cde0ce04; border: 1px solid var(--settings-line); border-radius: 10px; text-align: left; }
.device-picker svg { width: 35px; height: 35px; flex-shrink: 0; color: #c9d4c7; }
.device-picker button > span { font-size: 13px; font-weight: 500; }
.device-picker small { display: block; font-weight: 400; font-size: 10px; color: #a4b8ac; margin-top: 3px; }
.device-picker button .device-arrow { margin-left: auto; color: #a6bbab; opacity: .5; }
.device-picker button[aria-pressed=true] { background: #d5bd8b12; border-color: #d9b98c99; }
.device-picker button[aria-pressed=true] svg, .device-picker button[aria-pressed=true] .device-arrow { color: var(--settings-gold); opacity: 1; }
.device-picker button:hover { background-color: #cde0ce0d; border-color: #d9b98c80; }
.settings-guide { margin-top: 10px; border: 1px solid var(--settings-line); border-radius: 10px; background: #081c1d40; overflow: hidden; }
.guide-topline { display: flex; justify-content: space-between; align-items: center; gap: 6px; border-bottom: 1px solid #c9dcc613; padding: 6px 13px; }
.guide-contexts { display: flex; gap: 3px; }
.guide-contexts button { background: transparent; border-radius: 5px; padding: 8px 12px; font-size: 11px; min-height: 34px; color: #adbfb3; }
.guide-contexts button[aria-pressed=true] { background: #c7d8bc13; color: #f2eddc; }
.guide-contexts button:hover { background: #c7d8bc19; }
.guide-utility { padding: 8px; background: transparent; color: var(--settings-gold); font-size: 10px; min-height: 34px; }
.guide-body { display: grid; grid-template-columns: 1.1fr 1.2fr; align-items: center; padding: 12px 20px; gap: 22px; }
.device-figure { margin: 0; min-width: 0; text-align: center; }
.device-figure > svg { display: block; width: 100%; max-height: 210px; }
.device-figure figcaption { font-size: 9px; color: #a8bdae; line-height: 1.5; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 3px; }
.device-figure figcaption i { width: 6px; height: 6px; border-radius: 2px; display: inline-block; }
.device-figure figcaption .legend-move { background: var(--settings-gold); }
.device-figure figcaption .legend-action { background: var(--settings-mint); margin-left: 7px; }
.guide-lines { stroke: #b3c6b5; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.device-shell { fill: #263b36; stroke: #b3c6b5; }
.device-inset { fill: #192e2d; stroke: #718c7d; }
.device-key { fill: #1a2e29; stroke: #668474; }
.key-move { fill: #b5976599; stroke: #e4c292; }
.key-action { fill: #6b998779; stroke: #a6cbb8; }
.diagram-label, .keyboard-label { fill: #c7d7c8; font-size: 11px; text-anchor: middle; font-family: inherit; stroke: none; }
.diagram-label { letter-spacing: .05em; font-size: 10px; }
.keyboard-label text { stroke: none; fill: #e0e9d8; }
.face-symbol.triangle { stroke: #9ccdb4; }.face-symbol.circle { stroke: #d6a392; }.face-symbol.square { stroke: #bfadc9; }.face-symbol.cross { stroke: #a6bfda; }
.phone-landscape { stroke: #758f7138; fill: #7b97671a; }
.guide-bindings { min-width: 0; display: grid; gap: 0; }
.guide-binding { display: grid; grid-template-columns: 46% 1fr; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid #c9dcc610; font-size: 10px; line-height: 1.45; min-height: 28px; }
.guide-binding:last-child { border-bottom: 0; }
.guide-binding kbd { font-family: inherit; color: #e7ccaa; font-size: 10px; line-height: 1.45; background: none; padding: 0; border: 0; }
.guide-binding > span { color: #c3d0c4; }
.guide-note { font-size: 10px; line-height: 1.6; color: #a8b9ae; margin: 0; padding: 0 20px 12px; }
.settings-keybindings { padding: 14px 20px 20px; border-top: 1px solid var(--settings-line); }
.settings-keybindings[hidden] { display: none; }
.settings-keybindings p { font-size: 11px; margin: 0 0 10px; color: #d2ddce; }
.settings-keybindings p > span { color: #a5b8a7; }
.settings-key-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.settings-key-grid button { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 38px; padding: 7px 10px; border: 1px solid var(--settings-line); border-radius: 5px; background: #b9cbaa08; font-size: 11px; text-align: left; }
.settings-key-grid kbd { border: 1px solid #b7c9a83f; border-radius: 3px; padding: 3px 6px; font-size: 10px; white-space: nowrap; }
.settings-key-grid .is-listening { border-color: var(--settings-gold); background: #d5bd8b12; }
.settings-ranges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 26px; padding: 2px 18px; border: 1px solid var(--settings-line); border-radius: 10px; background: #c9dcc603; }
.settings-range { min-width: 0; display: grid; grid-template-columns: 1fr auto; align-content: center; gap: 11px 6px; padding: 15px 0; border-bottom: 1px solid #c9dcc616; font-size: 11px; }
.settings-range:nth-child(n+4) { border-bottom: 0; }
.settings-range output { color: var(--settings-gold); font-size: 11px; font-variant-numeric: tabular-nums; }
.settings-range input { grid-column: 1 / -1; appearance: none; -webkit-appearance: none; width: 100%; height: 14px; padding: 0; margin: 0; background: transparent; border: 0; border-radius: 5px; cursor: pointer; }
.settings-range input::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, var(--settings-gold) var(--range-fill), #a2b4a831 var(--range-fill)); }
.settings-range input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; margin-top: -4.5px; background: #f2ddba; border: 2px solid #243a32; box-shadow: 0 0 0 1px #e4c292; }
.settings-range input::-moz-range-track { height: 3px; border-radius: 3px; background: #a2b4a831; }
.settings-range input::-moz-range-progress { height: 3px; background: var(--settings-gold); }
.settings-range input::-moz-range-thumb { width: 9px; height: 9px; border-radius: 50%; background: #f2ddba; border: 2px solid #243a32; }
.settings-rumble-note { align-self: center; color: #c0ceba; font-size: 11px; padding: 12px 0; }
.settings-rumble-note small { display: block; color: #9eb1a4; font-size: 9px; line-height: 1.5; margin-top: 5px; }
.settings-toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; padding: 0 18px; border: 1px solid var(--settings-line); border-radius: 10px; }
.settings-toggle { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; cursor: pointer; border-bottom: 1px solid #c9dcc616; min-height: 65px; }
.settings-toggle:nth-child(n+3) { border-bottom: 0; }
.settings-toggle strong { display: block; font-size: 11px; font-weight: 500; }
.settings-toggle small { display: block; color: #a8b9ae; font-size: 9px; line-height: 1.4; margin-top: 4px; }
.settings-toggle input { position: absolute; right: 0; width: 36px; height: 24px; margin: 0; padding: 0; opacity: 0; cursor: pointer; }
.settings-toggle i { width: 31px; height: 18px; flex-shrink: 0; background: #11221d; border: 1px solid #b8c9ac46; border-radius: 15px; pointer-events: none; }
.settings-toggle i::after { content: ''; display: block; height: 10px; width: 10px; border-radius: 50%; margin: 3px; background: #8fa192; transition: transform .15s; }
.settings-toggle input:checked + i { background: #d2b281; border-color: #d2b281; }
.settings-toggle input:checked + i::after { background: #253a30; transform: translateX(13px); }
.settings-toggle input:focus-visible + i { outline: 2px solid var(--settings-gold); outline-offset: 4px; }
.settings-expedition { border-top: 1px solid var(--settings-line); padding-top: 20px; margin-bottom: 0; }
.settings-save-actions { display: grid; grid-template-columns: 1.05fr .8fr .8fr 1.2fr; gap: 8px; }
.settings-save-actions button { border: 1px solid #c9dcc63b; background: #c9dcc608; border-radius: 6px; min-height: 40px; padding: 9px 12px; font-size: 11px; }
.settings-save-actions button span { margin-left: 12px; }
.settings-save-actions button.save-primary { background: #e4c292; color: #20342d; border-color: #e4c292; font-weight: 600; }
.settings-save-actions button:hover { background: #c9dcc618; border-color: #d9b98c99; }
.settings-save-actions button.save-primary:hover { background: #f1d2a3; }
.settings-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.settings-footer .replay-button { border: 0; background: none; padding: 7px 0; margin: 0; font-size: 10px; color: #bdcdbb; }
.settings-footer .replay-button span { font-size: 16px; margin-right: 6px; vertical-align: -1px; }
.settings-footer small { font-size: 9px; color: #9cae9f; text-align: right; }
@media (max-width: 800px) {
  .settings-autosave { display: none; }
  .explorer-choice img { width: 87px; flex-basis: 87px; }
  .explorer-name small { font-size: 9px; }
  .guide-body { gap: 12px; padding: 10px 15px; }
  .guide-binding { grid-template-columns: 44% 1fr; gap: 9px; }
}
@media (max-width: 600px) {
  #panel.settings-panel { max-height: 96vh; max-height: 96dvh; border-radius: 12px; }
  #panel.settings-panel #panel-content { max-height: calc(96vh - 2px); max-height: calc(96dvh - 2px); padding: 0 16px 16px; }
  #panel.settings-panel .pack-nav { margin: 0 -16px 20px; padding-left: 16px; }
  #panel.settings-panel #close-panel { width: 40px; height: 40px; min-width: 40px; min-height: 40px; top: 9px; }
  .settings-heading { margin-bottom: 20px; }
  #panel .settings-heading h2 { font-size: 25px; }
  .settings-overline { font-size: 8px; }
  .settings-section { margin-bottom: 20px; }
  .explorer-picker, .device-picker { gap: 7px; }
  .explorer-choice { height: 128px; flex-direction: column; padding: 0 4px 10px; text-align: center; }
  .explorer-choice img { width: 110px; height: 99px; flex: 0 0 99px; object-position: center top; }
  .explorer-name { font-size: 12px; }
  .explorer-name small { display: none; }
  .device-picker button { flex-direction: column; gap: 5px; padding: 10px 4px; min-height: 76px; text-align: center; }
  .device-picker svg { width: 29px; height: 29px; }
  .device-picker button > span { font-size: 11px; }
  .device-picker small, .device-picker .device-arrow { display: none; }
  .guide-topline { flex-wrap: wrap; gap: 0; padding: 5px 7px; }
  .guide-contexts { width: 100%; justify-content: space-between; gap: 0; }
  .guide-contexts button { padding: 8px 9px; min-height: 40px; }
  .guide-utility { margin-left: auto; min-height: 40px; }
  .guide-body { grid-template-columns: 1fr; gap: 13px; padding: 12px 14px; }
  .device-figure > svg { max-height: 185px; }
  .device-figure figcaption { font-size: 9px; }
  .guide-bindings { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
  .guide-binding { grid-template-columns: 1fr; gap: 3px; padding: 9px 0; align-content: start; font-size: 11px; }
  .guide-binding kbd { font-size: 10px; }
  .guide-binding:nth-last-child(2) { border-bottom: 0; }
  .guide-note { padding: 0 14px 12px; }
  .settings-ranges { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; padding: 0 14px; }
  .settings-range { gap: 13px 4px; padding: 15px 0; font-size: 10px; }
  .settings-range:nth-child(4) { border-bottom: 1px solid #c9dcc616; }
  .settings-range input { height: 22px; }
  .settings-range input::-webkit-slider-thumb { height: 16px; width: 16px; margin-top: -6.5px; }
  .settings-toggles { grid-template-columns: 1fr; padding: 0 14px; }
  .settings-toggle { padding: 14px 0; }
  .settings-toggle:nth-child(3) { border-bottom: 1px solid #c9dcc616; }
  .settings-toggle strong { font-size: 12px; }
  .settings-toggle small { font-size: 10px; }
  .settings-toggle input { height: 44px; width: 44px; right: -6px; }
  .settings-save-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-save-actions button { padding: 9px 5px; min-height: 44px; font-size: 10px; }
  .settings-save-actions button span { margin-left: 3px; }
  .settings-footer { flex-wrap: wrap; gap: 5px; }
  .settings-footer .replay-button { min-height: 44px; }
  .settings-footer small { width: 100%; text-align: left; }
  .settings-keybindings { padding: 12px; }
  .settings-key-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-key-grid button { min-height: 44px; font-size: 10px; }
  .settings-key-grid kbd { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
  .settings-page button, .settings-toggle i::after { transition: none; }
}
