@property --edge { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --fill { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --bk { syntax: "<color>"; inherits: true; initial-value: transparent; }
@property --bl { syntax: "<length>"; inherits: true; initial-value: 14px; }

:root {
  --text: #f4f6fb;
  --text-dim: rgba(244, 246, 251, 0.72);
  --text-faint: rgba(244, 246, 251, 0.48);
  --red: #ff5a6e;
  --red-deep: #d91427;
  --red-soft: rgba(255, 90, 110, 0.14);
  --green: #4ade80;
  --amber: #f5b73e;
  --glass-bg: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.16);
  --card-bg: linear-gradient(180deg, rgba(20, 22, 30, 0.62), rgba(10, 12, 18, 0.7));
  --inset: rgba(7, 9, 15, 0.55);
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, Menlo, monospace;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --hot: #ff2b2b;
  --hot-glow: rgba(255, 43, 43, 0.45);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 760px at 78% 18%, rgba(120, 14, 22, 0.35), transparent 62%),
    radial-gradient(900px 700px at 8% 92%, rgba(24, 36, 84, 0.35), transparent 60%),
    #06070a;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

[hidden] {
  display: none !important;
}

button,
input {
  font: inherit;
  color: inherit;
}

#scene {
  position: fixed;
  inset: 0 auto auto 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  display: block;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.scene-ready #scene {
  opacity: 1;
}

.gc-top {
  --gc-head: 68px;
  --gc-gutter: clamp(16px, 4vw, 64px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--gc-head);
  padding: 0 var(--gc-gutter);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.gc-top.is-scrolled,
.gc-top.is-solid {
  background: rgba(6, 7, 10, 0.72);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.gc-top::before {
  content: "";
  position: absolute;
  inset: 0 0 -28px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 7, 10, 0.62), rgba(6, 7, 10, 0));
  transition: opacity 0.3s ease;
}

.gc-top.is-scrolled::before,
.gc-top.is-solid::before {
  opacity: 0;
}

.gc-brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: #f4f6fb;
  text-decoration: none;
  font: 600 17px/1 "Space Grotesk", "Inter", system-ui, sans-serif;
  letter-spacing: -0.01em;
}

.gc-brand img {
  display: block;
  width: 36px;
  height: auto;
}

.gc-nav {
  display: flex;
  gap: 2px;
}

.gc-nav a {
  position: relative;
  padding: 12px;
  color: #7d8492;
  text-decoration: none;
  font: 500 12.5px/1 "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.gc-nav a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  background: currentColor;
  transform-origin: 0 50%;
  transform: skewX(-35deg) scaleX(0);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gc-nav a:hover {
  color: #f4f6fb;
}

.gc-nav a:hover::after {
  transform: skewX(-35deg) scaleX(1);
}

.gc-nav a[aria-current="page"] {
  color: #fff;
}

.gc-nav a[aria-current="page"]::after {
  background: #ff2b2b;
  box-shadow: 0 0 10px rgba(255, 43, 43, 0.45);
  transform: skewX(-35deg) scaleX(1);
}

.gc-nav a:focus-visible,
.gc-brand:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.gc-btn {
  --gc-cut: 10px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.14);
  color: #f4f6fb;
  cursor: pointer;
  clip-path: polygon(var(--gc-cut) 0, 100% 0, 100% calc(100% - var(--gc-cut)), calc(100% - var(--gc-cut)) 100%, 0 100%, 0 var(--gc-cut));
  transition: background-color 0.2s ease, color 0.2s ease;
}

.gc-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: #101218;
  clip-path: polygon(calc(var(--gc-cut) - 0.59px) 0, 100% 0, 100% calc(100% - var(--gc-cut) + 0.59px), calc(100% - var(--gc-cut) + 0.59px) 100%, 0 100%, 0 calc(var(--gc-cut) - 0.59px));
  transition: background-color 0.2s ease;
}

.gc-btn:hover {
  background: rgba(255, 255, 255, 0.34);
}

.gc-btn:hover::before {
  background: #171a22;
}

.gc-btn:focus-visible {
  outline: none;
  background: #fff;
}

.gc-btn:focus-visible::before {
  inset: 2px;
}

.gc-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
}

.gc-menu span {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease;
}

.nav-open .gc-menu span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-open .gc-menu span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.gc-top.gc-compact {
  gap: 12px;
}

.gc-compact .gc-nav {
  display: none;
  position: fixed;
  top: calc(var(--gc-head) - 6px);
  left: 16px;
  right: 16px;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 6px 0;
  max-height: calc(100vh - var(--gc-head) - 12px);
  overflow-y: auto;
  background: rgba(12, 14, 19, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-top: 2px solid #ff2b2b;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8);
}

.gc-compact.nav-open .gc-nav {
  display: grid;
}

.gc-compact .gc-nav a {
  padding: 16px 18px;
  line-height: 1.3;
  white-space: normal;
}

.gc-compact .gc-nav a::after {
  left: 0;
  right: auto;
  top: 10px;
  bottom: 10px;
  width: 2px;
  height: auto;
  transform: scaleY(0);
}

.gc-compact .gc-nav a:hover::after {
  transform: scaleY(1);
}

.gc-compact .gc-nav a[aria-current="page"] {
  background: linear-gradient(90deg, rgba(255, 43, 43, 0.1), transparent 70%);
}

.gc-compact .gc-nav a[aria-current="page"]::after {
  transform: none;
}

.gc-compact .gc-nav a:focus-visible {
  outline-offset: -2px;
}

.gc-compact .gc-menu {
  display: inline-flex;
}

@media (min-width: 761px) {
  .gc-compact .gc-nav {
    left: auto;
    right: var(--gc-gutter);
    width: 440px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gc-top,
  .gc-top::before,
  .gc-nav a,
  .gc-nav a::after,
  .gc-btn,
  .gc-btn::before,
  .gc-menu span {
    transition: none;
  }
}

.nav-user {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.6rem;
  padding-left: 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.nav-user > * {
  flex: none;
}

.nav-user img {
  --c: 6px;
  width: 32px;
  height: 32px;
  object-fit: cover;
  background: #141720;
  clip-path: polygon(var(--c, 10px) 0, 100% 0, 100% calc(100% - var(--c, 10px)), calc(100% - var(--c, 10px)) 100%, 0 100%, 0 var(--c, 10px));
}

.nav-user .who {
  font: 600 0.9rem/1.2 var(--display);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user .out {
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-user .out:hover,
.nav-user .out:focus-visible {
  color: var(--text);
  background: var(--red-soft);
  box-shadow: inset 2px 0 0 var(--hot);
  outline: none;
}

main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(6.5rem, 13vh, 8.5rem) 1.25rem 3rem;
}

.page-head {
  text-align: center;
  margin-bottom: 2.4rem;
  animation: fade-up 0.7s ease 0.05s both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  font: 600 clamp(14px, 1.2vw, 18px)/1 var(--mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text);
}

.eyebrow span {
  padding: 0.42em 0.55em 0.42em 0.62em;
  color: #fff;
  background: var(--hot);
  box-shadow: 0 0 24px var(--hot-glow);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.eyebrow::before,
.eyebrow::after {
  content: "";
  width: 4.5em;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), transparent);
}

.eyebrow::before {
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.35), transparent);
}

.title {
  margin: 20px 0 18px;
  padding-bottom: 0.06em;
  font: 600 clamp(44px, 6.4vw, 92px)/0.94 var(--display);
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #fff 40%, #a4abba);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.title em {
  font-style: normal;
  background: linear-gradient(95deg, #ff3b3b 10%, #ff8a5c 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (max-width: 560px) {
  .eyebrow::before,
  .eyebrow::after {
    width: 2.2em;
  }
}

.page-sub {
  max-width: 560px;
  margin: 0 auto;
  font-size: clamp(0.98rem, 1.8vw, 1.1rem);
  line-height: 1.6;
  color: var(--text-dim);
}

.card {
  --bk: rgba(255, 255, 255, 0.32);
  --bl: 14px;
  --bw: 1px;
  position: relative;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 0.85);
  padding: 1.4rem 1.4rem 1.3rem;
  animation: fade-up 0.6s ease both;
}

.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    linear-gradient(var(--bk), var(--bk)) 0 0 / var(--bl) var(--bw),
    linear-gradient(var(--bk), var(--bk)) 0 0 / var(--bw) var(--bl),
    linear-gradient(var(--bk), var(--bk)) 100% 0 / var(--bl) var(--bw),
    linear-gradient(var(--bk), var(--bk)) 100% 0 / var(--bw) var(--bl),
    linear-gradient(var(--bk), var(--bk)) 0 100% / var(--bl) var(--bw),
    linear-gradient(var(--bk), var(--bk)) 0 100% / var(--bw) var(--bl),
    linear-gradient(var(--bk), var(--bk)) 100% 100% / var(--bl) var(--bw),
    linear-gradient(var(--bk), var(--bk)) 100% 100% / var(--bw) var(--bl);
  background-repeat: no-repeat;
}

.card + .card {
  margin-top: 1.25rem;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.card-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11.5px/1.2 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.card-head h2::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 5px;
  background: var(--hot);
  transform: skewX(-35deg);
  box-shadow: 0 0 8px var(--hot-glow);
}

.card-head .grow {
  flex: 1;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font: 600 10.5px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  white-space: nowrap;
}

.chip .dot {
  width: 6px;
  height: 6px;
  background: currentColor;
}

.chip.on {
  background: rgba(74, 222, 128, 0.14);
  color: var(--green);
}

.chip.on .dot {
  animation: pulse 1.6s ease-in-out infinite;
}

.chip.off {
  color: var(--text-faint);
}

.chip.bad {
  background: rgba(239, 107, 95, 0.14);
  color: #ef6b5f;
}

.np-title {
  font: 600 clamp(1.45rem, 3vw, 2.1rem)/1.15 var(--display);
  letter-spacing: -0.025em;
  line-height: 1.15;
  word-break: break-word;
  margin: 0.15rem 0 0.4rem;
}

.np-by {
  color: var(--text-dim);
  font-size: 0.95rem;
  min-height: 1.4em;
}

.np-by b {
  color: var(--text);
  font-weight: 700;
}

.bar {
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
  margin: 1.2rem 0 0.5rem;
}

.bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--red-deep), var(--hot));
  box-shadow: 0 0 16px var(--hot-glow);
  transition: width 0.25s linear;
}

.times {
  display: flex;
  justify-content: space-between;
  font: 500 0.74rem/1.4 var(--mono);
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.np-actions {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  margin-top: 1.2rem;
  flex-wrap: wrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.stat {
  background: var(--inset);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-left: 2px solid rgba(255, 255, 255, 0.18);
  padding: 0.7rem 0.85rem;
}

.stat small {
  display: block;
  font: 500 0.64rem/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.25rem;
}

.stat strong {
  font: 600 1.1rem/1.2 var(--display);
  word-break: break-word;
}

@media (max-width: 520px) {
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }
}

.btn {
  --c: 10px;
  --edge: transparent;
  --fill: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 1.35rem;
  font: 600 0.95rem/1.2 var(--display);
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.btn-primary {
  --edge: #ff4d5c;
  --fill: #e0192d;
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  --edge: #ff7480;
  --fill: #ff2b3d;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.btn-primary:hover:not(:disabled)::after {
  transform: translateX(120%);
}

.btn-ghost {
  --edge: rgba(255, 255, 255, 0.22);
  --fill: rgba(255, 255, 255, 0.06);
}

.btn-ghost:hover:not(:disabled) {
  --edge: rgba(255, 255, 255, 0.5);
  --fill: rgba(255, 255, 255, 0.13);
}

.btn-danger {
  --edge: rgba(239, 107, 95, 0.5);
  --fill: rgba(239, 107, 95, 0.12);
  color: #ffb4ab;
}

.btn-danger:hover:not(:disabled) {
  --edge: rgba(239, 107, 95, 0.75);
  --fill: rgba(239, 107, 95, 0.22);
}

.btn-sm {
  --c: 8px;
  padding: 0.42rem 0.9rem;
  font-size: 0.84rem;
}

.icon-btn {
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 1.05rem;
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: var(--red-soft);
  border-color: rgba(255, 43, 43, 0.45);
  color: #fff;
  outline: none;
}

.tabs {
  display: flex;
  gap: 0.3rem;
  padding: 0.3rem;
  background: var(--inset);
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-bottom: 1rem;
}

.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font: 500 11.5px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.65rem 0.6rem;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tabs button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.tabs button:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: -2px;
}

.tabs button.active {
  background: linear-gradient(180deg, rgba(255, 43, 43, 0.06), rgba(255, 43, 43, 0.18));
  box-shadow: inset 0 -2px 0 var(--hot);
  color: #fff;
}

.field {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}

.input {
  flex: 1;
  width: 100%;
  min-width: 0;
  background: var(--inset);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder {
  color: var(--text-faint);
}

.input:focus {
  border-color: var(--hot);
  box-shadow: inset 3px 0 0 var(--hot), 0 0 0 3px rgba(255, 43, 43, 0.14);
}

.code-input {
  text-align: center;
  font-family: var(--mono);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

.hint {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-top: 0.65rem;
  line-height: 1.5;
}

.suggest {
  list-style: none;
  margin-top: 0.6rem;
  max-height: 228px;
  overflow-y: auto;
}

.suggest li button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  font-size: 0.93rem;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.suggest li button:hover,
.suggest li button:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 2px 0 0 var(--hot);
  outline: none;
}

.suggest li button .play {
  flex: none;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--red-soft);
  color: var(--red);
  font-size: 0.7rem;
}

.suggest li button .t {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list {
  list-style: none;
}

.list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.93rem;
}

.list li:last-child {
  border-bottom: 0;
}

.list .n {
  flex: none;
  width: 1.7rem;
  text-align: right;
  color: var(--text-faint);
  font: 500 0.76rem/1 var(--mono);
}

.list .t {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list .by {
  flex: none;
  max-width: 40%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.list .missing .t {
  color: var(--text-faint);
  text-decoration: line-through;
}

.empty {
  color: var(--text-faint);
  font-size: 0.9rem;
  padding: 0.5rem 0.2rem;
}

.pl-item {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--inset);
  margin-bottom: 0.7rem;
  overflow: hidden;
}

.pl-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem 0.7rem 1rem;
}

.pl-row .name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-row .count {
  color: var(--text-faint);
  font-size: 0.8rem;
  white-space: nowrap;
}

.pl-edit {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.8rem 1rem 1rem;
}

.pl-edit .field {
  margin-top: 0.7rem;
}

.usage {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.center-card {
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
}

.center-actions {
  justify-content: center;
}

#loginForm {
  display: grid;
  gap: 0.75rem;
}

.steps {
  list-style: none;
  text-align: left;
  margin: 1.1rem 0 1.3rem;
  display: grid;
  gap: 0.7rem;
}

.steps li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  color: var(--text-dim);
  line-height: 1.5;
  font-size: 0.94rem;
}

.steps li span {
  --c: 6px;
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  font: 600 0.74rem/1 var(--mono);
  background: var(--red-soft);
  color: #ff8b9a;
  clip-path: polygon(var(--c, 10px) 0, 100% 0, 100% calc(100% - var(--c, 10px)), calc(100% - var(--c, 10px)) 100%, 0 100%, 0 var(--c, 10px));
}

.steps code,
.mono {
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.08);
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  color: var(--text);
  font-size: 0.88em;
}

.form-error {
  margin-top: 0.8rem;
  color: #ffb4ab;
  font-size: 0.88rem;
  min-height: 1.2em;
}

.job {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.9rem;
  padding: 0.7rem 0.9rem;
  background: var(--inset);
  border-left: 2px solid var(--hot);
  font-size: 0.9rem;
  color: var(--text-dim);
}

.spinner {
  flex: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--hot);
  animation: spin 0.8s linear infinite;
}

.progress {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--red);
  transition: width 0.2s ease;
}

.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 1rem;
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  background: var(--inset);
  text-align: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.drop:hover,
.drop.over {
  border-color: rgba(255, 43, 43, 0.6);
  background: rgba(255, 43, 43, 0.06);
}

.drop strong {
  color: var(--text);
}

.toasts {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: min(380px, calc(100vw - 2rem));
}

.toast {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  background: rgba(7, 9, 15, 0.92);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--green);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 0.9rem;
  line-height: 1.45;
  animation: toast-in 0.25s ease;
}

.toast.err {
  border-left-color: #ef6b5f;
}

.toast.out {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.footer {
  padding: 1.4rem 1.5rem;
  text-align: center;
  font: 500 11px/1.8 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1680px) {
  .nav-user .who {
    display: none;
  }
}

@media (max-width: 560px) {
  .card {
    padding: 1.15rem 1rem 1.1rem;
  }
  .field {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .page-head,
  .toast {
    animation: none;
  }
  .btn,
  .btn:hover {
    transform: none;
  }
  .chip.on .dot,
  .spinner {
    animation: none;
  }
}

.np-actions .btn-primary,
.np-actions .listen-btn {
  min-width: 130px;
}

.listen-btn.on,
.listen-btn.on:hover:not(:disabled) {
  --edge: rgba(74, 222, 128, 0.55);
  --fill: rgba(74, 222, 128, 0.14);
  color: var(--green);
}

.lic {
  font-size: 1rem;
  line-height: 1;
}

.vol {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-faint);
  font-size: 0.9rem;
}

.vol input {
  width: 110px;
  accent-color: var(--hot);
}

.station {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.1rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(90deg, rgba(255, 43, 43, 0.16), rgba(217, 20, 39, 0.04) 85%);
  border: 1px solid rgba(255, 43, 43, 0.3);
  border-left: 2px solid var(--hot);
}

.station-ic {
  --c: 8px;
  flex: none;
  width: 42px;
  height: 42px;
  clip-path: polygon(var(--c, 10px) 0, 100% 0, 100% calc(100% - var(--c, 10px)), calc(100% - var(--c, 10px)) 100%, 0 100%, 0 var(--c, 10px));
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: rgba(255, 90, 110, 0.18);
}

.station-text {
  min-width: 0;
}

.station-text small {
  display: block;
  font: 500 0.66rem/1.3 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ff8b9a;
  margin-bottom: 0.2rem;
}

.station-text strong {
  display: block;
  font: 600 clamp(1.05rem, 2.2vw, 1.3rem)/1.25 var(--display);
  letter-spacing: -0.01em;
  word-break: break-word;
}

.np-next {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.np-next b {
  color: var(--text);
  font-weight: 700;
}

.ann {
  margin-top: 1.1rem;
  padding: 0.85rem 1rem 0.9rem;
  background: var(--inset);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.ann .hint {
  margin-top: 0.55rem;
}

.ann-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.mic-btn {
  min-width: 150px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.mic-btn.rec,
.mic-btn.rec:hover:not(:disabled) {
  --edge: #ffb3bb;
  --fill: #e0192d;
  color: #fff;
  transform: none;
  animation: rec-pulse 1s ease-in-out infinite;
}

@keyframes rec-pulse {
  50% {
    --fill: #ff4d5c;
  }
}

.mic-btn.rec .lic {
  animation: pulse 1s ease-in-out infinite;
}

.ann-meter {
  flex: 1 1 120px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.ann-meter span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red-deep), var(--hot));
}

.ann-time {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.ann-review {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.ann-review audio {
  width: 100%;
  height: 40px;
}

.ann-where {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.ann-where b {
  color: var(--text);
  font-weight: 700;
}

.ann-acts {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

@media (prefers-reduced-motion: reduce) {
  .mic-btn.rec .lic,
  .mic-btn.rec {
    animation: none;
  }
}

.admin-card {
  margin-top: 1.25rem;
}

.sub-head {
  margin: 1.2rem 0 0.4rem;
  font: 500 0.72rem/1.3 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.admin-list li {
  flex-wrap: wrap;
  row-gap: 0.45rem;
}

.admin-list .av {
  --c: 6px;
  flex: none;
  width: 30px;
  height: 30px;
  object-fit: cover;
  background: #141720;
  clip-path: polygon(var(--c, 10px) 0, 100% 0, 100% calc(100% - var(--c, 10px)), calc(100% - var(--c, 10px)) 100%, 0 100%, 0 var(--c, 10px));
}

.admin-list .av.blank {
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-faint);
}

.admin-list .who {
  flex: 1;
  min-width: 140px;
  overflow: hidden;
}

.admin-list .who b,
.admin-list .who small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-list .who small {
  color: var(--text-faint);
  font-size: 0.78rem;
}

.admin-list .meta {
  color: var(--text-faint);
  font-size: 0.78rem;
  white-space: nowrap;
}

.admin-list .acts {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin-left: auto;
}

.select {
  background: var(--inset);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  padding: 0.38rem 0.55rem;
  font-size: 0.84rem;
  color: var(--text);
  outline: none;
}

.select:focus {
  border-color: var(--hot);
  box-shadow: inset 3px 0 0 var(--hot);
}

.select option {
  background: #0b0d14;
  color: var(--text);
}

.nav-user:empty {
  display: none;
}

.mobile-user {
  display: none;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--text-dim);
  text-align: center;
}

.mobile-user b {
  color: var(--text);
}

.mobile-user button {
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, 0.25);
  color: var(--text-dim);
  font: 500 10.5px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  flex: none;
  white-space: nowrap;
}

.mobile-user button:hover,
.mobile-user button:focus-visible {
  color: var(--text);
  background: var(--red-soft);
  box-shadow: inset 2px 0 0 var(--hot);
  outline: none;
}

@media (max-width: 560px) {
  .nav-user {
    display: none;
  }
  .mobile-user {
    display: flex;
  }
}

.auth-row {
  margin-bottom: 1.25rem;
}

.login-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: 2rem 2.1rem;
  --bk: var(--hot);
  --bl: 22px;
  --bw: 2px;
  background: radial-gradient(120% 160% at 0% 0%, rgba(255, 43, 43, 0.16), transparent 55%), var(--card-bg);
  border-color: rgba(255, 43, 43, 0.3);
  box-shadow: inset 0 0 50px -18px rgba(217, 20, 39, 0.3), 0 30px 60px -34px rgba(0, 0, 0, 0.85);
}

.login-hero::after {
  filter: drop-shadow(0 0 6px var(--hot-glow));
}

.login-title {
  margin: 0 0 0.45rem;
  font: 600 clamp(1.5rem, 3vw, 2.15rem)/1.15 var(--display);
  letter-spacing: -0.025em;
  color: var(--text);
}

.login-lead {
  color: var(--text-dim);
  font-size: 0.98rem;
  line-height: 1.55;
}

.login-hero .steps {
  margin: 1.2rem 0 0;
}

.login-form {
  display: grid;
  gap: 0.75rem;
  padding: 1.4rem;
  background: var(--inset);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-label {
  font: 500 0.68rem/1.3 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.login-form .form-error {
  margin-top: 0;
  min-height: 0;
}

.login-form .form-error:empty {
  display: none;
}

.login-form .hint {
  margin-top: 0;
  text-align: center;
}

.btn-lg {
  --c: 12px;
  padding: 0.9rem 1.6rem;
  font-size: 1.02rem;
}

@media (max-width: 900px) {
  .login-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.4rem;
    padding: 1.5rem;
  }
}

.admin-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 0 1.1rem;
}

.stat-sub {
  display: block;
  font-size: 0.74rem;
  color: var(--text-faint);
}

.stat-sub:empty {
  display: none;
}

@media (max-width: 700px) {
  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.pager:empty {
  display: none;
}

.tool {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tool + .job + .tool,
.job + .tool {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.tool-text {
  flex: 1;
  min-width: 0;
}

.tool .sub-head {
  margin-top: 0.2rem;
}

.tool .hint {
  margin-top: 0.3rem;
}

.tool + .field,
.tool + .tool {
  margin-top: 0.8rem;
}

.tool + .tool {
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.job.bad {
  color: #ffb4ab;
}

#activityList .who b,
#profileActivity .who b {
  white-space: normal;
  font-weight: 600;
}

@media (max-width: 560px) {
  .tool {
    flex-direction: column;
    align-items: stretch;
  }
}

.pv-btn.on,
.pv-btn.on:hover:not(:disabled) {
  --edge: rgba(255, 43, 43, 0.55);
  --fill: rgba(255, 43, 43, 0.14);
  color: #ff8b9a;
}

.admin-list li.pv-row {
  background: rgba(255, 43, 43, 0.06);
  box-shadow: inset 2px 0 0 var(--hot);
  padding: 0.55rem 0.6rem;
}

.pv-track {
  flex: 1 0 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.pv-bar {
  flex: 1;
  position: relative;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  outline: none;
}

.pv-bar::before {
  content: "";
  position: absolute;
  inset: -8px 0;
}

.pv-bar:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 90, 110, 0.35);
}

.pv-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red-deep), var(--hot));
}

.pv-time {
  flex: none;
  min-width: 5.5rem;
  text-align: right;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.pv-now {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.2rem 0 0.4rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.pv-now b {
  color: var(--text);
}

.linkish {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.linkish:hover,
.linkish:focus-visible {
  color: #ff8b9a;
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.admin-list .who small .linkish {
  color: var(--text-dim);
}

.admin-list .who small.wl-until {
  color: var(--amber);
  white-space: normal;
}

.admin-list .acts {
  flex-wrap: wrap;
  justify-content: flex-end;
}

#mySongsList {
  margin-top: 0.2rem;
}

#myFilter {
  margin-bottom: 0.4rem;
}

.people {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.people .empty {
  grid-column: 1 / -1;
}

.person {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--inset);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.person:hover,
.person:focus-visible {
  border-color: rgba(255, 43, 43, 0.45);
  background: rgba(255, 43, 43, 0.08);
  box-shadow: inset 2px 0 0 var(--hot);
  transform: translateY(-1px);
  outline: none;
}

.person .av,
.profile-head .av {
  --c: 7px;
  flex: none;
  width: 38px;
  height: 38px;
  object-fit: cover;
  background: #141720;
  clip-path: polygon(var(--c, 10px) 0, 100% 0, 100% calc(100% - var(--c, 10px)), calc(100% - var(--c, 10px)) 100%, 0 100%, 0 var(--c, 10px));
}

.person .av.blank,
.profile-head .av.blank {
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-faint);
}

.person-text,
.profile-text {
  min-width: 0;
  flex: 1;
}

.person-text b,
.person-text small,
.profile-text b,
.profile-text small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-text b {
  font: 600 0.95rem/1.3 var(--display);
}

.person-text small,
.profile-text small {
  font-size: 0.78rem;
  color: var(--text-faint);
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0.9rem 0 0.6rem;
  padding: 0.9rem 1rem;
  background: var(--inset);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-head .av {
  --c: 9px;
  width: 52px;
  height: 52px;
}

.profile-head .av.blank {
  font-size: 1.1rem;
}

.profile-text b {
  font: 600 1.2rem/1.3 var(--display);
  color: var(--text);
}

.profile-head .chip {
  margin-left: auto;
  flex: none;
}

@media (max-width: 760px) {
  .people {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #adminTabs {
    overflow-x: auto;
    scrollbar-width: none;
  }
  #adminTabs button {
    flex: 1 0 auto;
    padding: 0.55rem 0.8rem;
  }
  .people {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .admin-list .acts {
    gap: 0.35rem;
  }
  .admin-list .acts .btn-sm {
    padding: 0.38rem 0.62rem;
    font-size: 0.8rem;
  }
  .admin-list .acts:has(select) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
  }
  .admin-list .acts:has(select) .select,
  .admin-list .acts:has(select) .btn-sm {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
}

@media (min-width: 901px) {
  #viewMain {
    align-items: stretch;
  }
  #viewMain > div {
    display: flex;
    flex-direction: column;
  }
  #viewMain > div > .card:not([hidden]):not(:has(~ .card:not([hidden]))) {
    flex: 1 1 auto;
  }
  #addCard {
    display: flex;
    flex-direction: column;
  }
  #addCard > [data-pane="library"] {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
  }
  #addCard > [data-pane="library"] > * {
    flex: none;
  }
  #addCard > [data-pane="library"] > #libResults {
    flex: 1 1 0;
    min-height: 228px;
    max-height: none;
  }
}

.stations-card {
  margin-top: 1.25rem;
}

.stations-hint {
  margin: -0.4rem 0 0.4rem;
}

.list-more {
  display: block;
  margin: 0.7rem auto 0;
}

.stations-card .who small b {
  display: inline;
  color: var(--text);
  font-weight: 600;
}

.station-pick {
  width: auto;
  max-width: 12rem;
  margin-right: 0.5rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.stations-card .acts .select {
  width: auto;
  min-width: 7rem;
}

@media (max-width: 560px) {
  #nowCard .card-head {
    flex-wrap: wrap;
  }
  .station-pick {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
    margin: 0.45rem 0 0;
  }
}

.page-cta {
  display: flex;
  justify-content: center;
  margin-top: 1.4rem;
}

.cm {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 3, 8, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: cm-fade 0.2s ease both;
}

.cm-box {
  --c: 14px;
  --edge: rgba(255, 255, 255, 0.16);
  --fill: rgba(7, 9, 15, 0.9);
  position: relative;
  width: min(420px, 100%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  animation: cm-in 0.28s ease both;
}

.cm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.cm-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11.5px/1.2 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
}

.cm-title::before {
  content: "";
  flex-shrink: 0;
  width: 14px;
  height: 5px;
  background: var(--hot);
  transform: skewX(-35deg);
  box-shadow: 0 0 8px var(--hot-glow);
}

.cm-x {
  background: none;
  border: none;
  padding: 2px 8px;
  color: #aab3c5;
  font-size: 18px;
  line-height: 1.2;
  cursor: pointer;
}

.cm-x:hover,
.cm-x:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.cm-body {
  display: grid;
  gap: 1rem;
  padding: 1.4rem 1.4rem 1.3rem;
  text-align: center;
}

.cm-lead {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dim);
}

.cm-handle {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem 0.75rem 0.7rem 0.95rem;
  background: rgba(88, 101, 242, 0.14);
  border: 1px solid rgba(88, 101, 242, 0.4);
  border-left: 2px solid #8f99ff;
  text-align: left;
}

.cm-ic {
  flex: none;
  width: 28px;
  height: 28px;
  color: #8f99ff;
}

.cm-handle-text {
  flex: 1;
  min-width: 0;
  display: grid;
  line-height: 1.2;
}

.cm-handle-text small {
  font: 500 0.66rem/1.4 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.cm-handle-text b {
  font-size: 1.2rem;
  font-weight: 700;
  overflow-wrap: anywhere;
  user-select: all;
}

.cm-open {
  width: 100%;
}

.cm-hint {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-dim);
}

@keyframes cm-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}

@keyframes cm-fade {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cm-box,
  .cm-backdrop {
    animation: none;
  }
}

@media (max-width: 560px) {
  .input,
  .select {
    font-size: 16px;
  }
  .btn-sm {
    min-height: 38px;
  }
  .mobile-user button {
    min-height: 36px;
    padding: 0.35rem 0.9rem;
  }
}

@media (hover: none) {
  .btn:hover {
    transform: none;
  }
  .btn-primary:hover:not(:disabled)::after {
    transform: translateX(-120%);
  }
}

@media (max-width: 520px) {
  #nowCard .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
  }
  #nowCard .stat {
    padding: 0.6rem 0.65rem;
  }
  #nowCard .stat small {
    letter-spacing: 0.06em;
  }
}

.nav-user .cog {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-user .cog svg {
  width: 17px;
  height: 17px;
  transition: transform 0.35s ease;
}

.nav-user .cog:hover,
.nav-user .cog:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 2px 0 0 var(--hot);
  outline: none;
}

.nav-user .cog:hover svg {
  transform: rotate(60deg);
}

.mobile-user .mu-acts {
  display: inline-flex;
  gap: 0.5rem;
}

.mobile-user .set {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mobile-user .set svg {
  width: 15px;
  height: 15px;
}

.mic-btn.busy,
.mic-btn.busy:hover {
  opacity: 0.75;
  cursor: progress;
  transform: none;
}

.sm-body {
  display: grid;
  gap: 1rem;
  padding: 1.2rem 1.3rem 1.3rem;
}

.pref-head {
  font: 500 0.68rem/1.3 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 0.55rem;
}

.pref {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  background: var(--inset);
  border: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.pref-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.pref-text b {
  font-size: 0.95rem;
  font-weight: 700;
}

.pref-text small {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--text-dim);
}

.switch {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  position: relative;
  width: 44px;
  height: 24px;
  margin: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch:checked {
  background: #e0192d;
  border-color: #ff4d5c;
}

.switch:checked::after {
  transform: translateX(20px);
}

.switch:focus-visible {
  outline: 2px solid var(--hot);
  outline-offset: 2px;
}

.switch:disabled {
  opacity: 0.5;
  cursor: progress;
}

.sm-note {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text-faint);
}

@media (prefers-reduced-motion: reduce) {
  .nav-user .cog svg,
  .switch,
  .switch::after {
    transition: none;
  }
}

#settingsModal .cm-box {
  width: min(840px, 100%);
}

.profile-sub {
  margin: 1.4rem 0 0.6rem;
}

#ownerList .acts .chip {
  align-self: center;
}

#ownerList .who small {
  white-space: normal;
}

#ownerList + #wlHead {
  margin-top: 1.6rem;
}

.res-card {
  margin-bottom: 1.25rem;
}

.res-card .card-head h2 {
  white-space: nowrap;
}

.res-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.res-live i {
  width: 7px;
  height: 7px;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
}

.res-live.stale i {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 183, 62, 0.18);
}

.res-err {
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
  color: #ffb4ab;
}

.res-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.res-tile {
  background: var(--inset);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.85rem 0.95rem 0.7rem;
  min-width: 0;
}

.res-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 1.3rem;
}

.res-top small {
  font: 500 0.64rem/1.3 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.res-lvl {
  font: 600 0.66rem/1.3 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.14rem 0.5rem;
}

.res-lvl.warn {
  color: #0b0b0b;
  background: var(--amber);
}

.res-lvl.crit {
  color: #fff;
  background: var(--red-deep);
}

.res-val {
  display: block;
  margin-top: 0.15rem;
  font: 600 2rem/1.1 var(--display);
  line-height: 1.1;
}

.res-sub {
  display: block;
  min-height: 1.2em;
  margin-top: 0.15rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.res-meter {
  height: 8px;
  margin: 0.75rem 0 0.9rem;
  background: rgba(143, 180, 255, 0.16);
  overflow: hidden;
}

.res-meter span {
  display: block;
  width: 0;
  height: 100%;
  background: #8fb4ff;
  transition: width 0.6s ease, background-color 0.3s ease;
}

.res-meter.warn {
  background: rgba(245, 183, 62, 0.16);
}

.res-meter.warn span {
  background: var(--amber);
}

.res-meter.crit {
  background: rgba(255, 90, 110, 0.18);
}

.res-meter.crit span {
  background: var(--red);
}

.res-spark {
  position: relative;
  height: 56px;
  cursor: crosshair;
  touch-action: pan-y;
}

.res-spark:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.res-spark svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.res-spark .base {
  stroke: rgba(255, 255, 255, 0.14);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.res-spark .line {
  fill: none;
  stroke: rgba(244, 246, 251, 0.55);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.res-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: #8fb4ff;
  box-shadow: 0 0 0 2px #10131c;
  pointer-events: none;
}

.res-dot.hover {
  background: #fff;
}

.res-x {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.35);
  pointer-events: none;
}

.res-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  display: grid;
  gap: 0.05rem;
  padding: 0.3rem 0.55rem;
  background: rgba(7, 9, 15, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 2;
}

.res-tip.left {
  transform: none;
}

.res-tip.right {
  transform: translateX(-100%);
}

.res-tip b {
  font-size: 0.9rem;
  font-weight: 800;
}

.res-tip small {
  font-size: 0.72rem;
  color: var(--text-faint);
}

.res-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 0.3rem;
  font-size: 0.7rem;
  color: var(--text-faint);
}

.res-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.res-table th {
  padding: 0 0.5rem 0.4rem 0;
  text-align: left;
  font: 500 0.64rem/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.res-table td {
  padding: 0.45rem 0.5rem 0.45rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.res-table th:not(:first-child),
.res-table td:not(:first-child) {
  width: 6.5rem;
  padding-right: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.res-table td.off {
  color: var(--text-faint);
}

.res-table tr.other td {
  color: var(--text-dim);
}

.res-foot {
  margin-top: 0.8rem;
}

@media (max-width: 620px) {
  .res-tiles {
    grid-template-columns: minmax(0, 1fr);
  }

  #resCores {
    display: none;
  }

  .res-table th:not(:first-child),
  .res-table td:not(:first-child) {
    width: 5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .res-meter span {
    transition: none;
  }
}

.btn,
.cm-box {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  clip-path: polygon(var(--c, 10px) 0, 100% 0, 100% calc(100% - var(--c, 10px)), calc(100% - var(--c, 10px)) 100%, 0 100%, 0 var(--c, 10px));
  background:
    linear-gradient(var(--edge), var(--edge)) var(--c, 10px) 0 / 100% var(--bw, 1px) no-repeat,
    linear-gradient(var(--edge), var(--edge)) 100% 0 / var(--bw, 1px) calc(100% - var(--c, 10px)) no-repeat,
    linear-gradient(var(--edge), var(--edge)) 0 100% / calc(100% - var(--c, 10px)) var(--bw, 1px) no-repeat,
    linear-gradient(var(--edge), var(--edge)) 0 var(--c, 10px) / var(--bw, 1px) 100% no-repeat,
    linear-gradient(to bottom right, transparent 50%, var(--edge) 0, var(--edge) calc(50% + var(--bw, 1px) + 0.3px), transparent 0) 0 0 / var(--c, 10px) var(--c, 10px) no-repeat,
    linear-gradient(to bottom right, transparent calc(50% - var(--bw, 1px) - 0.3px), var(--edge) 0, var(--edge) 50%, transparent 0) 100% 100% / var(--c, 10px) var(--c, 10px) no-repeat,
    var(--fill);
  transition: --edge 0.2s ease, --fill 0.2s ease, color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

:is(.btn):focus-visible {
  outline: none;
  --edge: #fff;
  --bw: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary::after {
    display: none;
  }
}
