:root {
  --text: #f5f5f5;
  --muted: rgba(255,255,255,0.7);
  --accent: #ffd166;
  --panel: rgba(255,255,255,0.06);
  --panel-border: rgba(255,255,255,0.12);
}
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: linear-gradient(135deg, #1a1f2e 0%, #2c3e50 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
}
/* Web only, non-phone: never collapse below settings-page width (560px content + 32px padding).
   Phones (≤480px) drop the min-width so the page fills the viewport instead of horizontally scrolling. */
@media (min-width: 481px) {
  html:not(.native) body { min-width: 592px; }
}
header {
  text-align: center;
  margin-bottom: 24px;
  max-width: 480px;
  width: 100%;
  position: relative;
}
.back-arrow {
  position: absolute;
  top: 0;
  left: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.back-arrow:hover {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.25);
  transform: translateX(-2px);
}
.back-arrow svg { width: 18px; height: 18px; }
h1 {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 6px;
}
.shortcuts {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  /* Three-column grid: keys (auto, right-aligned) | = | description (auto).
     `display: contents` on each <li> lets its 3 children participate directly in
     this grid, so the = signs across all rows line up in column 2.
     All three columns are `auto` (not `1fr`) so the grid sizes to its content,
     letting the body's `align-items: center` center the whole block under the
     "Keyboard Shortcuts" title instead of leaving it left-anchored in a 480px box. */
  display: grid;
  grid-template-columns: auto auto auto;
  column-gap: 12px;
  row-gap: 14px;
  align-items: center;
  font-size: 15px;
}
.shortcuts li { display: contents; }
.shortcuts .keys {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  justify-self: end;
}
.shortcuts .eq {
  color: var(--muted);
  font-size: 18px;
}
.shortcuts .desc { color: var(--text); }
kbd {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 13px;
  color: var(--text);
}
.nav {
  width: 100%;
  max-width: 480px;
  display: flex;
  justify-content: flex-start;
}
.nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nav a:hover { border-bottom-color: var(--accent); }
.back-arrow-icon { width: 16px; height: 16px; flex-shrink: 0; }
@media (max-width: 480px) {
  .back-arrow { width: 34px; height: 34px; }
  .shortcuts .keys { min-width: 84px; }
}
