/* UPLINK // settings.css — Settings page. */

/* --- settings page --- */
.settings {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: #000b;
  display: grid;
  place-items: center;
  padding: 16px;
}
.settings.open {
  animation: scanFlash 0.5s steps(4) reverse;
}
.set-panel {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: min(860px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--line);
  overflow: hidden;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48'%3E%3Cpath d='M24 19v10M19 24h10' stroke='%2326262b' stroke-width='1.5'/%3E%3C/svg%3E");
}
.set-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  background: var(--accent);
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: 2;
}
.settings.open .set-panel {
  animation: glitchIn 0.6s steps(1) both;
}
.settings.open .set-head h2 {
  animation: rgbSplit 0.8s steps(2);
}
.settings.open .set-head h2 .t::before {
  animation: slice 0.5s steps(1) 0.15s;
}
.settings.open .set-head h2 .t::after {
  animation: slice2 0.5s steps(1) 0.2s;
}
.settings.closing {
  animation: none;
  background: #0000;
  transition: background 0.2s;
}
.settings.closing .set-panel {
  animation: glitchOut 0.22s steps(3) both;
}
.set-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  background: repeating-linear-gradient(0deg, #ff6a1340 0 2px, transparent 2px 6px);
  mix-blend-mode: screen;
}
.settings.open .set-scan {
  animation:
    scanFlash 0.6s steps(5) both,
    scanRoll 0.6s linear;
}
.set-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.set-head .label::after {
  display: none;
}
.set-head h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(52px, 10vw, 84px);
  line-height: 0.85;
  margin: 10px 0 0;
  letter-spacing: 0.01em;
}
.set-body {
  overflow-y: auto;
  padding: 6px 24px 20px;
}
.set-sec {
  padding: 20px 0;
  border-bottom: 1px dashed var(--line);
}
.set-sec:last-child {
  border-bottom: 0;
}
.set-sec > .label {
  margin-bottom: 14px;
}
.set-sec .rs {
  color: var(--bad);
  font-weight: 600;
}
.set-sec .rs.on {
  color: var(--ok);
}
.set-profile {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
@media (max-width: 640px) {
  .set-profile {
    grid-template-columns: 1fr;
  }
  .set-head,
  .set-body {
    padding-left: 16px;
    padding-right: 16px;
  }
}
.set-k {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0 0 10px;
}
.swatches {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}
.sw {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  background: var(--c);
  cursor: pointer;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  transition: transform 0.12s;
}
.sw:hover {
  transform: translateY(-2px);
}
.sw[aria-checked='true'] {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}
.sw[aria-checked='true']::after {
  content: '';
  position: absolute;
  inset: 32%;
  background: #0b0b0c;
}
.custom-col {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--mute);
  cursor: pointer;
  width: max-content;
}
.custom-col input {
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  background: none;
  cursor: pointer;
}
.custom-col input::-webkit-color-swatch-wrapper {
  padding: 3px;
}
.custom-col input::-webkit-color-swatch {
  border: 0;
}
.custom-col input::-moz-color-swatch {
  border: 0;
}
.custom-col:hover {
  color: var(--fg);
}
#colorErr {
  margin: 8px 0 0;
  min-height: 0;
}
.set-sec .relay {
  margin: 0;
  border: 0;
  background: none;
}
.set-sec .relay .hint,
.set-sec .relay input,
.set-sec .relay-btns,
.set-sec .relay .err {
  margin-left: 0;
  margin-right: 0;
}
.set-sec .relay input {
  width: 100%;
}
.set-sec .relay-btns {
  grid-template-columns: repeat(2, minmax(0, 140px));
}
.btn.danger {
  border-color: var(--bad);
  color: var(--bad);
}
.btn.danger:hover {
  background: var(--bad);
  color: #0b0b0c;
}
.set-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 24px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--mute);
  background: var(--panel);
}
.set-foot #setFp {
  color: var(--accent);
}
