:root[data-theme="dark"] body.nickcolor-page { background: #0c1016; }

.nick-page {
  --surface: #141a23;
  --field: #10151d;
  --stroke: #2a3442;
  --title: #f0f3f8;
  --muted: #a7b3c2;
  --accent: #a5ceff;
  color: var(--title);
  max-width: 1032px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 72px) 24px clamp(48px, 7vw, 88px);
}

.nick-intro { margin-bottom: 32px; }
.nick-back { color: var(--accent); font-size: .875rem; text-underline-offset: 4px; }
.nick-intro h1 {
  margin: 12px 0 8px;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -.035em;
}
.nick-intro p { margin: 0; color: var(--muted); line-height: 1.6; }

.nick-editor {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  overflow: hidden;
}
.nick-editor h2 { margin: 0 0 16px; font-size: 1rem; line-height: 1.4; font-weight: 600; }
.nick-controls, .nick-stage, .nick-export { padding: clamp(16px, 3vw, 28px); min-width: 0; }
.nick-colors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nick-colors label, .nick-label { display: block; color: var(--muted); font-size: .875rem; }
.nick-swatch, #nick-preview-input {
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--field);
  color: var(--title);
}
.nick-swatch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  font: .81rem ui-monospace, Consolas, monospace;
  cursor: pointer;
}
.nick-swatch input {
  flex: none;
  appearance: none;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.nick-swatch input::-webkit-color-swatch-wrapper { padding: 0; }
.nick-swatch input::-webkit-color-swatch { border: 1px solid #ffffff24; border-radius: 4px; }
.nick-swatch input::-moz-color-swatch { border: 1px solid #ffffff24; border-radius: 4px; }
#gradient-bar {
  height: 12px;
  margin: 16px 0 24px;
  border-radius: 4px;
  background: linear-gradient(90deg, #38bdf8, #c084fc);
}
#nick-preview-input { display: block; padding: 8px 12px; font: inherit; }
#nick-preview-input::placeholder { color: #8c9aad; }

.nick-stage {
  display: grid;
  grid-template-rows: auto 1fr;
  border-left: 1px solid var(--stroke);
  background: #0e131b;
}
.nick-stage h2 { display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.nick-stage kbd {
  padding: 4px 8px;
  color: var(--title);
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 4px;
  font: .75rem ui-monospace, Consolas, monospace;
}
.nick-player {
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: #090d13;
}
.nick-player img { flex: none; object-fit: contain; image-rendering: pixelated; }
#nick-preview {
  color: var(--accent);
  font: 600 clamp(1.25rem, 3.2vw, 2.5rem)/1.2 ui-monospace, Consolas, monospace;
  overflow-wrap: anywhere;
}

.nick-export { grid-column: 1 / -1; border-top: 1px solid var(--stroke); }
.nick-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--field);
}
.nick-export code { font: .9rem ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
#copy {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #edf2fb;
  color: #10151d;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}
#copy:hover { background: #d8e6fa; }
.nick-page :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.nick-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 12px; }
.nick-meta p { margin: 0; color: var(--muted); font-size: .875rem; }
.nick-meta #feedback { color: var(--accent); }
.nick-meta #feedback:empty { display: none; }

@media (max-width: 680px) {
  .nick-page { padding-inline: 16px; }
  .nick-editor { grid-template-columns: minmax(0, 1fr); }
  .nick-stage { border-left: 0; border-top: 1px solid var(--stroke); }
  .nick-command { padding: 12px; }
  #copy { width: 100%; }
}
