:root {
  color-scheme: dark;
  --bg: #071012;
  --bg-warm: #1b1009;
  --panel: rgba(20, 21, 17, 0.94);
  --panel-2: rgba(26, 19, 15, 0.94);
  --line: rgba(234, 196, 62, 0.30);
  --line-strong: rgba(46, 163, 167, 0.58);
  --text: #f8f3e8;
  --muted: #c8baa9;

  --teal: #2ea3a7;
  --orange: #d7893a;
  --yellow: #eac43e;
  --green: #6fae82;
  --accent: #b63f2f;
  --accent-soft: #d46a5b;

  --discord: #5865f2;
  --danger: #d96a5c;
  --warning: #eac43e;
  --success: #6fae82;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.48);
  --radius-lg: 30px;
  --radius-md: 18px;
  --radius-sm: 12px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: #090d0d;
  background-image:
    radial-gradient(ellipse 58% 48% at 4% 3%, rgba(46, 163, 167, 0.52) 0%, rgba(46, 163, 167, 0.20) 35%, transparent 72%),
    radial-gradient(ellipse 54% 48% at 98% 4%, rgba(215, 137, 58, 0.48) 0%, rgba(215, 137, 58, 0.18) 36%, transparent 72%),
    radial-gradient(ellipse 48% 38% at 55% 46%, rgba(234, 196, 62, 0.22) 0%, transparent 74%),
    radial-gradient(ellipse 52% 44% at 8% 98%, rgba(111, 174, 130, 0.40) 0%, rgba(111, 174, 130, 0.14) 42%, transparent 76%),
    radial-gradient(ellipse 42% 36% at 92% 94%, rgba(182, 63, 47, 0.30) 0%, transparent 74%),
    linear-gradient(135deg, #061113 0%, #17110b 48%, #120b0b 100%);
  background-attachment: fixed;
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    linear-gradient(rgba(234, 196, 62, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(46, 163, 167, 0.030) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
  background: conic-gradient(from 218deg at 50% 45%, rgba(46, 163, 167, 0.10), rgba(234, 196, 62, 0.08), rgba(215, 137, 58, 0.10), rgba(182, 63, 47, 0.08), rgba(111, 174, 130, 0.10), rgba(46, 163, 167, 0.10));
  filter: blur(80px);
}

button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.page-shell {
  position: relative;
  width: min(1460px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(234, 196, 62, 0.34);
}

.brand {
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--yellow) 0%, var(--orange) 34%, var(--teal) 68%, var(--green) 100%);
  color: #160d09;
  font-weight: 900;
  box-shadow:
    0 10px 28px rgba(46, 163, 167, 0.2),
    0 0 30px rgba(234, 196, 62, 0.12);
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 0.98rem; letter-spacing: 0.01em; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 0.76rem; }

.profile-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 50px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 8px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(46, 163, 167, 0.12), rgba(215, 137, 58, 0.10));
  backdrop-filter: blur(14px);
}

.profile-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line-strong);
}

.profile-avatar--fallback {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--orange), var(--yellow));
  color: #160d09;
  font-weight: 900;
}

.profile-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.profile-copy strong {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.profile-copy small {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.72rem;
}

.profile-logout {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 0.76rem;
  font-weight: 700;
}

.profile-logout:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }

main { flex: 1; padding: 40px 0 26px; }

.hero {
  position: relative;
  max-width: 1240px;
  margin: 10px auto 34px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(980px, 88vw);
  height: 330px;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 16% 42%, rgba(46, 163, 167, 0.30), transparent 44%),
    radial-gradient(circle at 84% 36%, rgba(215, 137, 58, 0.28), transparent 43%),
    radial-gradient(circle at 52% 82%, rgba(234, 196, 62, 0.19), transparent 42%),
    radial-gradient(circle at 42% 18%, rgba(182, 63, 47, 0.15), transparent 35%);
  filter: blur(17px);
  pointer-events: none;
}

.hero-copy { position: relative; }

.eyebrow, .section-kicker {
  color: #b63f2f;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  margin: 0;
  padding: 0.48rem 0.78rem;
  border: 1px solid rgba(182, 63, 47, 0.44);
  border-radius: 999px;
  background: rgba(182, 63, 47, 0.10);
  box-shadow: 0 0 34px rgba(182, 63, 47, 0.12);
}

.hero h1 {
  max-width: 1180px;
  margin: 18px auto 0;
  color: var(--text);
  font-size: clamp(2.65rem, 5.15vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.052em;
  text-align: center;
  text-wrap: balance;
  text-shadow: 0 12px 42px rgba(0, 0, 0, 0.38);
}

.text-accent {
  color: var(--accent);
  text-shadow: 0 0 38px rgba(182, 63, 47, 0.2);
}

.card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 0% 0%, rgba(46, 163, 167, 0.15), transparent 38%),
    radial-gradient(circle at 100% 100%, rgba(215, 137, 58, 0.14), transparent 42%),
    linear-gradient(145deg, rgba(29, 22, 17, 0.95), rgba(8, 18, 19, 0.96));
  border: 1px solid rgba(234, 196, 62, 0.34);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow),
    -30px -20px 105px rgba(46, 163, 167, 0.15),
    32px 24px 110px rgba(215, 137, 58, 0.12),
    0 0 70px rgba(234, 196, 62, 0.055);
  backdrop-filter: blur(18px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), var(--yellow), var(--orange), transparent);
  opacity: 1;
  pointer-events: none;
}

.gate-card {
  max-width: 780px;
  margin: 0 auto 26px;
  padding: 34px;
  text-align: center;
}

.gate-card h2 {
  margin: 9px 0 10px;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  letter-spacing: -0.035em;
}

.gate-card p {
  max-width: 630px;
  margin: 0 auto 22px;
  color: var(--muted);
  line-height: 1.65;
}

.gate-card--login {
  max-width: 840px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px 42px 36px;
}

.discord-login-title {
  margin: 0 0 13px !important;
  color: #b63f2f !important;
  font-size: clamp(1.55rem, 2.25vw, 2.25rem) !important;
  line-height: 1;
  letter-spacing: 0.075em !important;
  text-transform: uppercase;
  text-shadow: 0 0 34px rgba(182, 63, 47, 0.30);
}

.gate-card--login p {
  max-width: 670px;
  margin: 0 auto 24px;
  font-size: 0.95rem;
}

input, select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(7, 18, 19, 0.94), rgba(25, 16, 10, 0.92));
  color: var(--text);
  outline: none;
  padding: 0 14px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus, select:focus {
  border-color: rgba(46, 163, 167, 0.72);
  box-shadow: 0 0 0 4px rgba(46, 163, 167, 0.11);
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 16px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 800;
  text-decoration: none;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.button:disabled { cursor: not-allowed; opacity: 0.52; }

.button--primary {
  background: linear-gradient(135deg, var(--yellow), var(--orange));
  color: #160d09;
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(215, 137, 58, 0.17);
}

.button--ghost { background: transparent; }

.button--discord {
  background: var(--discord);
  color: #fff;
  border-color: transparent;
  box-shadow:
    0 14px 34px rgba(88, 101, 242, 0.24),
    0 0 0 1px rgba(234, 196, 62, 0.08);
}

.button--discord:hover:not(:disabled) {
  box-shadow:
    0 18px 40px rgba(88, 101, 242, 0.3),
    0 0 34px rgba(46, 163, 167, 0.11);
}

.button--large {
  min-height: 58px;
  padding: 0 28px;
  border-radius: 15px;
  font-size: 1rem;
}

.button--apply {
  background: linear-gradient(135deg, var(--teal), var(--green));
  color: #07100d;
  border-color: transparent;
  min-width: 210px;
  box-shadow: 0 13px 32px rgba(46, 163, 167, 0.16);
}

.workspace { display: grid; gap: 24px; }
.is-hidden { display: none !important; }

.dino-overview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 26px 28px;
}

.dino-overview h2, .color-editor h2 {
  margin: 7px 0 0;
  letter-spacing: -0.025em;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(290px, 0.72fr) minmax(0, 1.8fr);
  gap: 24px;
  align-items: start;
}

.preview-card {
  padding: 24px;
  position: sticky;
  top: 18px;
}

.preview-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.palette-preview {
  margin: 22px 0;
  min-height: 255px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #070b0b;
}

.palette-preview div { min-height: 110px; transition: background-color 150ms ease; }

.appearance-controls { display: grid; gap: 18px; }
.control-group { min-width: 0; }

.control-group > label,
.control-label-row label,
.sex-control legend {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.control-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.control-label-row output {
  color: var(--yellow);
  font-size: 0.9rem;
  font-weight: 900;
}

.range-control {
  min-height: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none !important;
  accent-color: var(--orange);
}

.sex-control {
  margin: 0;
  padding: 0;
  border: 0;
}

.sex-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sex-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(7, 18, 19, 0.94), rgba(25, 16, 10, 0.92));
  color: var(--muted);
  font-weight: 800;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.sex-button:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--line-strong); }

.sex-button.is-selected {
  border-color: rgba(111, 174, 130, 0.72);
  background: rgba(111, 174, 130, 0.14);
  color: #d9f1df;
  box-shadow: 0 0 0 3px rgba(111, 174, 130, 0.07);
}

.color-editor { padding: 26px; }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; }

.editor-note {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.92rem;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.color-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  border-radius: 16px;
}

.color-picker-wrap {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
}

.color-picker-wrap input[type="color"] {
  width: 76px;
  height: 76px;
  min-height: 0;
  border: 0;
  padding: 0;
  margin: -10px;
  cursor: pointer;
}

.color-field { min-width: 0; }
.color-field label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-size: 0.84rem; font-weight: 800; }
.color-field label span { color: var(--muted); font-size: 0.7rem; font-weight: 600; }
.color-field input[type="text"] { min-height: 42px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

.apply-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(234, 196, 62, 0.30);
}

.request-status { display: grid; gap: 4px; }
.request-status strong { font-size: 0.9rem; }
.request-status span { color: var(--muted); font-size: 0.82rem; line-height: 1.45; }
.request-status--error strong { color: var(--danger); }
.request-status--success strong { color: var(--success); }
.request-status--working strong { color: var(--warning); }

footer {
  min-height: 90px;
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  border-top: 1px solid rgba(234, 196, 62, 0.30);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 40px));
  padding: 14px 16px;
  background: var(--green);
  color: #07100d;
  border-radius: 14px;
  box-shadow: var(--shadow);
  font-weight: 800;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: var(--accent-soft); color: #fff; }

@media (max-width: 980px) {
  .editor-layout { grid-template-columns: 1fr; }
  .preview-card { position: static; }
  .hero { margin-top: 8px; }
  .hero h1 { font-size: clamp(2.75rem, 8vw, 4.8rem); }
  .gate-card--login { min-height: 0; max-width: 820px; }
}

@media (max-width: 720px) {
  .page-shell { width: min(100% - 20px, 1460px); }
  .site-header { min-height: 76px; }
  .profile-copy small, .profile-logout { display: none; }
  .profile-copy strong { max-width: 110px; }
  main { padding-top: 30px; }
  .hero { margin-bottom: 30px; }
  .hero h1 { font-size: clamp(2.35rem, 11.5vw, 4rem); }
  .gate-card, .dino-overview, .color-editor, .preview-card { padding: 20px; border-radius: 22px; }
  .gate-card--login { min-height: 0; padding: 26px 20px 30px; }
  .discord-login-title { font-size: clamp(1.45rem, 6vw, 2rem) !important; }
  .color-grid { grid-template-columns: 1fr; }
  .dino-overview, .editor-heading, .apply-bar { align-items: stretch; flex-direction: column; }
  .button--apply { width: 100%; }
  .palette-preview { min-height: 210px; }
  .palette-preview div { min-height: 90px; }
}
/* === miniEniac v9 skin editor === */

.editor-layout {
  align-items: stretch;
}

.preview-card,
.color-editor {
  height: 100%;
}

.preview-card {
  position: static;
  display: flex;
  flex-direction: column;
}

.color-editor {
  display: flex;
  flex-direction: column;
}

.palette-preview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(105px, 1fr));
  min-height: 230px;
  border-color: rgba(0, 0, 0, 0.88);
  background: #050606;
}

.palette-preview div {
  min-height: 105px;
  border: 1px solid rgba(0, 0, 0, 0.34);
}

.appearance-controls {
  margin-top: auto;
}

#patternIndex {
  appearance: auto;
  color-scheme: dark;
  color: #ffffff;
  background: #080a0a;
  border-color: rgba(234, 196, 62, 0.30);
}

#patternIndex option {
  color: #ffffff;
  background: #080a0a;
}

.color-grid {
  grid-auto-flow: row;
}

.color-row {
  border-color: rgba(0, 0, 0, 0.72);
}

.color-picker-wrap {
  border: 1px solid #000000;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.88);
}

.color-picker-wrap:focus-within {
  border-color: #000000;
  box-shadow: 0 0 0 1px #000000;
}

.color-picker-wrap input[type="color"],
.color-picker-wrap input[type="color"]:focus {
  border: 0;
  outline: 0;
  box-shadow: none;
}

.color-field label {
  justify-content: flex-start;
}

.editor-heading {
  margin-bottom: 20px;
}

.reset-button {
  gap: 9px;
  white-space: nowrap;
}

.reset-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.apply-bar {
  margin-top: auto;
  justify-content: flex-end;
}

.request-status:empty {
  display: none;
}

.button--apply {
  min-width: 150px;
}

@media (max-width: 980px) {
  .preview-card,
  .color-editor {
    height: auto;
  }

  .appearance-controls {
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  .palette-preview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(72px, 1fr));
    min-height: 160px;
  }

  .palette-preview div {
    min-height: 72px;
  }

  .reset-button {
    width: 100%;
  }
}
/* === miniEniac v10 preset library === */

.preset-panel {
  padding: 28px;
}

.preset-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.preset-header h2 {
  margin: 7px 0 8px;
  letter-spacing: -0.025em;
}

.preset-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.preset-transfer-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.preset-save-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(234, 196, 62, 0.24);
}

.preset-name-field {
  min-width: 0;
}

.preset-name-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

#savePresetButton {
  min-width: 150px;
}

.preset-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 26px;
  margin-bottom: 13px;
}

.preset-library-heading > div {
  display: grid;
  gap: 3px;
}

.preset-library-heading strong {
  font-size: 1rem;
}

.preset-library-heading span:not(.preset-counter) {
  color: var(--muted);
  font-size: 0.8rem;
}

.preset-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(234, 196, 62, 0.38);
  border-radius: 999px;
  background: rgba(234, 196, 62, 0.08);
  color: var(--yellow);
  font-size: 0.82rem;
  font-weight: 900;
}

.preset-list {
  display: grid;
  gap: 11px;
}

.preset-empty {
  padding: 24px;
  border: 1px dashed rgba(234, 196, 62, 0.28);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.preset-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 15px;
  border: 1px solid rgba(234, 196, 62, 0.22);
  border-radius: 17px;
  background:
    linear-gradient(
      135deg,
      rgba(46, 163, 167, 0.055),
      rgba(215, 137, 58, 0.045)
    );
}

.preset-item-copy {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.preset-item-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-item-copy small {
  color: var(--muted);
}

.preset-swatches {
  display: grid;
  grid-template-columns: repeat(8, 22px);
  gap: 4px;
}

.preset-swatch {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(0, 0, 0, 0.78);
  border-radius: 6px;
}

.preset-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.preset-action {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(234, 196, 62, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
}

.preset-action:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.preset-action--load {
  border-color: rgba(111, 174, 130, 0.44);
  background: rgba(111, 174, 130, 0.09);
}

.preset-action--delete {
  border-color: rgba(217, 106, 92, 0.38);
  color: #f0b0a8;
}

@media (max-width: 820px) {
  .preset-header,
  .preset-save-row,
  .preset-item {
    grid-template-columns: 1fr;
  }

  .preset-header {
    flex-direction: column;
  }

  .preset-transfer-actions,
  .preset-item-actions {
    justify-content: flex-start;
  }

  #savePresetButton {
    width: 100%;
  }

  .preset-item {
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .preset-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .preset-transfer-actions {
    display: grid;
    width: 100%;
  }

  .preset-transfer-actions .button {
    width: 100%;
  }

  .preset-swatches {
    grid-template-columns: repeat(8, minmax(16px, 1fr));
  }

  .preset-swatch {
    width: 100%;
  }

  .preset-item-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
/* === miniEniac v14 right-aligned skin actions === */

.color-editor .apply-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.color-editor .apply-bar .request-status {
  min-width: 0;
  margin-right: auto;
}

.skin-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: auto;
}

.skin-action-buttons .button {
  white-space: nowrap;
}

.skin-action-buttons #applyButton {
  min-width: 150px;
}

@media (max-width: 720px) {
  .color-editor .apply-bar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .color-editor .apply-bar .request-status {
    width: 100%;
    margin-right: 0;
  }

  .skin-action-buttons {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    margin-left: 0;
  }

  .skin-action-buttons .button,
  .skin-action-buttons #applyButton {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .skin-action-buttons {
    grid-template-columns: 1fr;
  }
}
/* === miniEniac v15 reset warning === */

.reset-control {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: end;
  gap: 11px;
}

.reset-warning {
  color: #ff5f56;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(255, 95, 86, 0.26);
}

@media (max-width: 720px) {
  .reset-control {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .reset-control .reset-button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .reset-warning {
    font-size: 0.72rem;
    white-space: normal;
  }
}
/* === miniEniac v17 low-lag rendering === */

/*
 * The original fixed blurred layers required the browser to repaint a
 * very large filtered surface while scrolling or using color controls.
 */
body::before,
body::after,
.hero::before {
  display: none !important;
  filter: none !important;
}

/*
 * Disable real-time background blurring. The opaque gradients below
 * retain the same dark teal/orange appearance without GPU-heavy glass.
 */
.profile-card,
.card {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.profile-card {
  background:
    linear-gradient(
      135deg,
      rgba(17, 38, 39, 0.98),
      rgba(39, 27, 18, 0.98)
    ) !important;
}

.card {
  background:
    radial-gradient(
      circle at 0% 0%,
      rgba(46, 163, 167, 0.10),
      transparent 38%
    ),
    radial-gradient(
      circle at 100% 100%,
      rgba(215, 137, 58, 0.09),
      transparent 42%
    ),
    linear-gradient(
      145deg,
      rgba(29, 22, 17, 0.99),
      rgba(8, 18, 19, 0.99)
    ) !important;

  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.34) !important;
}

/*
 * Contain repaints produced by native color pickers and their previews.
 */
.color-row,
.preview-swatch {
  contain: layout paint;
}

/*
 * Avoid expensive smooth-scrolling calculations on long editor pages.
 */
html {
  scroll-behavior: auto !important;
}

/* === miniEniac v18 responsive interaction === */

/*
 * The native picker itself handles the interaction. Avoid adding browser
 * transitions to the preview while it receives frequent live colors.
 */
.preview-swatch,
[data-preview] {
  transition: none !important;
}

/*
 * Isolate each editable row so color updates do not trigger unnecessary
 * paint calculations across the whole editor panel.
 */
.color-row {
  contain: layout paint style;
}

.color-picker-wrap {
  contain: layout paint;
}
