html { touch-action: pan-x pan-y }
:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #09090c;
  --surface: #16161b;
  --edge: #2a2a32;
  --ink: #f5f5f8;
  --muted: #a0a0ac;
  --accent: #659dff;
  background: var(--bg);
  color: var(--ink);
}
* { box-sizing: border-box }
body {
  margin: 0;
  min-height: 100dvh;
  background: linear-gradient(180deg, #17171e, var(--bg) 210px);
}
main {
  width: min(100%, 780px);
  margin-inline: auto;
  padding: calc(24px + env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    calc(28px + env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}
.hero { position: relative; display: grid; place-items: center; min-height: 38px; margin-bottom: 13px }
.brand { margin: 0 }
.mark { display: block; width: 120px; height: 24px }
.status { position: absolute; right: 0; color: var(--accent); font-size: .75rem }
.status[data-state=error] { color: #ff9eaa; max-width: 27%; text-align: right }
.save-icon { display: none; width: 19px; height: 19px }
.status[data-state=saving] .save-icon { display: block }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap }
.triangle { color: #7af0be }
.circle { color: #ff8c9b }
.cross { color: #84bbff }
.square { color: #eca8ff }
button, input, select { font: inherit }
button { cursor: pointer }
#editor { display: grid; gap: 16px; margin-top: 12px }
.panel {
  scroll-margin-top: calc(16px + env(safe-area-inset-top));
  border: 1px solid var(--edge);
  border-radius: 13px;
  padding: 3px 8px;
  background: #111115;
}
@property --border-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}
.panel:target, .panel:focus-within {
  border-color: transparent;
  background: linear-gradient(#111115, #111115) padding-box,
    conic-gradient(from var(--border-angle, 0deg), #262a36 0%, #262a36 55%, #3565d4 72%, #83bcff 80%, #353e59 90%, #262a36 100%) border-box;
}
@keyframes border-orbit { to { --border-angle: 360deg } }
@media (prefers-reduced-motion: no-preference) {
  .panel:target, .panel:focus-within { animation: border-orbit 7s linear infinite }
}
.panel:target .profile-number, .panel:focus-within .profile-number { color: var(--accent) }
.profile-head {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--edge);
}
.profile-number { text-align: center; color: var(--muted); font-size: 1rem; font-weight: 750 }
.profile-head input { font-weight: 650 }
input, select {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid var(--edge);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
}
.panel input {
  padding-inline: 6px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
}
.panel input:focus-visible { background: var(--surface); outline-offset: -2px }
.binding:nth-child(odd) { border-bottom: 1px solid #ffffff0b }
input::placeholder { color: var(--muted); opacity: 1 }
.bindings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, auto); grid-auto-flow: column; column-gap: 7px }
.binding {
  display: grid;
  grid-template-columns: 21px 44px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
}
.key {
  color: var(--muted);
  text-align: center;
  font-weight: 700;
  font-size: .85rem;
}
.choose {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 7px;
  background: #ffffff06;
}
.choose select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.choose:focus-within { outline: 2px solid var(--accent); outline-offset: 2px }
.glyph { display: grid; place-items: center; font-size: .95rem; font-weight: 750; pointer-events: none }
.glyph svg { width: 21px; height: 21px }
#retry {
  margin-top: 12px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--edge);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.binding input { font-size: 16px; padding-inline: 3px }
@media (min-width: 680px) {
  .bindings { column-gap: 14px }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth } }
