/* ═══════════════════════════════════════════════════════════════════════
   singularite.css — HUD Atlas mapping (accent : cyan + violet)
   ═══════════════════════════════════════════════════════════════════════ */

body.singularite-body {
  --accent:        #6cc6ff;
  --accent-bright: #a4dfff;
  --accent-dim:    #2b6ea0;
  --accent-violet: #c78bff;
  --accent-rgb:    108, 198, 255;
  background: #000 !important;
  color: var(--atlas-text);
  font-family: var(--atlas-mono);
  margin: 0;
}
body.singularite-body code { color: var(--accent-bright); }

.sg-grain, .sg-vignette { display: none; }
.sg-particles {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.sg-particle {
  position: absolute; width: 2px; height: 2px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 6px var(--accent);
  opacity: 0.6;
  animation: sg-drift 18s linear infinite;
}
.sg-particle:nth-child(1) { left: 15%; top: 22%; animation-delay: 0s;  }
.sg-particle:nth-child(2) { left: 38%; top: 68%; animation-delay: -4s; background: var(--accent-violet); box-shadow: 0 0 8px var(--accent-violet); }
.sg-particle:nth-child(3) { left: 72%; top: 18%; animation-delay: -8s; }
.sg-particle:nth-child(4) { left: 88%; top: 70%; animation-delay: -12s; background: var(--accent-violet); box-shadow: 0 0 8px var(--accent-violet); }
.sg-particle:nth-child(5) { left: 50%; top: 88%; animation-delay: -16s; }
@keyframes sg-drift {
  0%   { transform: translate(0,0); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.5; }
  100% { transform: translate(-30vw, -60vh); opacity: 0; }
}

/* ════════ TOPBAR ════════ */
.sg-topbar {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 24px;
  padding: 18px clamp(20px, 4vw, 48px);
  background: rgba(0,0,0,0.72); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--atlas-line-soft);
}
.sg-topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent) 50%, transparent);
  opacity: 0.5;
}
.sg-back {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 0 8px 24px;
  font-family: var(--atlas-mono); font-size: 0.72rem;
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--atlas-text-2);
  text-decoration: none; position: relative;
}
.sg-back::before {
  content: '«'; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  font-family: var(--atlas-display); font-size: 1.2rem; color: var(--accent);
}
.sg-back:hover { color: var(--atlas-text); }
.sg-back-arrow { display: none; }

.sg-title {
  justify-self: center;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--atlas-display); font-weight: 700;
  font-size: 0.92rem; letter-spacing: 0.42em;
  color: var(--atlas-text); text-transform: uppercase;
}
.sg-title-glyph { color: var(--accent); font-size: 0.65rem; font-weight: 400; }
.sg-title-text::before { content: '{'; color: var(--accent); font-weight: 200; font-size: 1.4rem; margin-right: 8px; }
.sg-title-text::after  { content: '}'; color: var(--accent); font-weight: 200; font-size: 1.4rem; margin-left: 8px; }

.sg-char-chip {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  background: transparent; border: 1px solid var(--atlas-line);
  color: var(--atlas-text); font-family: var(--atlas-mono);
  cursor: pointer; transition: border-color 0.25s;
}
.sg-char-chip:hover { border-color: var(--accent); }
.sg-chip-avatar {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04); border: 1px solid var(--atlas-line-soft);
  font-size: 0.85rem; color: var(--accent);
}
.sg-chip-body { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.sg-chip-name { font-family: var(--atlas-display); font-weight: 600; font-size: 0.8rem; color: var(--atlas-text); }
.sg-chip-meta { font-size: 0.697rem;font-family:'AquireLight','Rajdhani',sans-serif!important; letter-spacing: 0.18em; color: var(--atlas-text-d); }
.sg-chip-caret { color: var(--accent); font-size: 0.8rem; margin-left: 4px; }

/* ════════ HERO ════════ */
.sg-hero {
  position: relative; z-index: 5;
  padding: 80px clamp(20px, 4vw, 56px) 30px;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 28px;
  max-width: 1280px; margin: 0 auto;
}
.sg-hero-left { max-width: 60ch; }
.sg-hero-eyebrow {
  font-family: var(--atlas-mono); font-size: 0.72rem;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--atlas-text-d);
  display: inline-flex; align-items: center; gap: 14px;
  margin-bottom: 26px;
}
.sg-hero-arrows {
  color: var(--accent-bright);
  font-family: var(--atlas-display); font-weight: 700;
}
.sg-hero-title {
  font-family: var(--atlas-display); font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  letter-spacing: 0.32em; text-transform: uppercase;
  color: var(--atlas-text);
  line-height: 1.05; margin: 0 0 18px;
}
.sg-hero-title .br-open, .sg-hero-title .br-close {
  font-weight: 200; color: var(--accent); margin: 0 0.2em;
}
.sg-hero-sub {
  font-family: var(--atlas-mono); font-size: 0.74rem;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--atlas-text-3); line-height: 1.7;
  max-width: 56ch;
}
.sg-hero-num {
  font-family: var(--atlas-display); font-weight: 900;
  font-size: clamp(5rem, 14vw, 14rem); line-height: 0.78;
  color: var(--accent); opacity: 0.15;
  letter-spacing: -0.04em;
  justify-self: end;
}

/* ════════ MAIN ════════ */
.sg-main {
  position: relative; z-index: 5;
  max-width: 1280px; margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px) 80px;
}

/* ════════ STATE ════════ */
.sg-state {
  max-width: 640px; margin: 80px auto;
  padding: 40px 32px;
  border-left: 2px solid var(--accent);
  text-align: left;
}
.sg-spinner {
  display: inline-block; font-family: var(--atlas-display); font-weight: 700;
  font-size: 1.6rem; color: var(--accent);
  animation: sg-spin 3s linear infinite; margin-bottom: 14px;
}
@keyframes sg-spin { to { transform: rotate(360deg); } }
.sg-state-glyph { font-family: var(--atlas-display); font-size: 2.4rem; color: var(--accent); margin-bottom: 14px; }
.sg-state-title {
  font-family: var(--atlas-display); font-weight: 800; font-size: 2rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--atlas-text);
  margin-bottom: 12px;
}
.sg-state-text { font-family: var(--atlas-display); font-size: 0.95rem; line-height: 1.6; color: var(--atlas-text-2); }
.sg-text-dim { color: var(--atlas-text-d); }

/* ════════ STATUS BAND ════════ */
.sg-status {
  display: grid; grid-template-columns: auto 1fr auto auto;
  align-items: center; gap: 20px;
  padding: 18px 22px; margin: 24px 0 18px;
  background: rgba(108,198,255,0.025);
  border: 1px solid var(--atlas-line);
  border-left: 2px solid var(--accent);
  position: relative;
}
.sg-status::before, .sg-status::after {
  content: ''; position: absolute; width: 10px; height: 10px;
  border: 1px solid var(--accent);
}
.sg-status::before { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.sg-status::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.sg-status-glyph {
  width: 48px; height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(108,198,255,0.06);
  border: 1px solid var(--accent-dim);
  font-family: var(--atlas-display); font-size: 1.3rem; color: var(--accent-bright);
}
.sg-status-label, .sg-status-cap-sub {
  font-family: var(--atlas-mono); font-size: 0.62rem;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--atlas-text-d);
  margin-bottom: 4px;
}
.sg-status-value, .sg-status-cap {
  font-family: var(--atlas-display); font-weight: 700; font-size: 1.05rem;
  letter-spacing: 0.16em; color: var(--atlas-text);
}
.sg-status-cap { color: var(--accent-bright); }

/* ════════ STEPS INDICATOR ════════ */
.sg-steps {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 22px; flex-wrap: wrap;
}
.sg-step {
  padding: 7px 14px;
  font-family: var(--atlas-mono); font-size: 0.66rem;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--atlas-text-d);
  border: 1px solid var(--atlas-line);
}
.sg-step.is-active {
  color: var(--accent-bright);
  border-color: var(--accent);
  background: rgba(108,198,255,0.06);
}
.sg-step-arrow {
  color: var(--atlas-text-d);
  font-family: var(--atlas-display); font-size: 0.85rem;
}

/* ════════ 3-COL LAYOUT ════════ */
.sg-layout {
  display: grid; gap: 16px;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: start;
}
.sg-panel {
  padding: 18px 18px 16px;
  background: rgba(255,255,255,0.012);
  border: 1px solid var(--atlas-line);
  position: relative;
}
.sg-panel::before, .sg-panel::after {
  content: ''; position: absolute; width: 8px; height: 8px;
  border: 1px solid var(--accent);
}
.sg-panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.sg-panel::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.sg-panel-title {
  font-family: var(--atlas-mono); font-size: 0.66rem;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--accent-bright);
  margin-bottom: 12px;
}

.sg-noyaux-grid, .sg-type-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.sg-noyaux-grid > *, .sg-type-grid > * {
  padding: 10px;
  background: transparent; border: 1px solid var(--atlas-line);
  cursor: pointer;
  font-family: var(--atlas-mono); font-size: 0.74rem;
  letter-spacing: 0.06em; color: var(--atlas-text-2);
  text-align: center;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.sg-noyaux-grid > *:hover, .sg-type-grid > *:hover { border-color: var(--accent); color: var(--accent-bright); }
.sg-noyaux-grid > *.is-selected, .sg-type-grid > *.is-selected {
  border-color: var(--accent);
  background: rgba(108,198,255,0.10);
  color: var(--accent-bright);
}

.sg-empty-preview {
  padding: 14px 12px;
  font-family: var(--atlas-mono); font-size: 0.7rem;
  letter-spacing: 0.10em; color: var(--atlas-text-d);
  text-align: center;
}

.sg-form-group { display: flex; flex-direction: column; gap: 6px; }
.sg-form-label {
  font-family: var(--atlas-mono); font-size: 0.62rem;
  letter-spacing: 0.20em; text-transform: uppercase; color: var(--atlas-text-d);
}
.sg-input {
  width: 100%; padding: 9px 12px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--atlas-line);
  color: var(--atlas-text); font-family: var(--atlas-mono);
  font-size: 0.85rem; outline: none;
  transition: border-color 0.25s;
}
.sg-input:focus { border-color: var(--accent); }

/* Icon picker */
.sg-icon-picker {
  display: flex; gap: 0; border: 1px solid var(--atlas-line); margin-bottom: 8px;
}
.sg-icon-tab {
  flex: 1; padding: 8px 12px;
  background: transparent; border: 0;
  font-family: var(--atlas-mono); font-size: 0.66rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--atlas-text-3); cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.sg-icon-tab:not(:last-child) { border-right: 1px solid var(--atlas-line); }
.sg-icon-tab:hover { color: var(--accent-bright); }
.sg-icon-tab.is-active {
  background: rgba(108,198,255,0.10);
  color: var(--accent-bright);
}

.sg-icon-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 6px;
  max-height: 200px; overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--atlas-line);
}
.sg-icon-gallery::-webkit-scrollbar { width: 4px; }
.sg-icon-gallery::-webkit-scrollbar-thumb { background: var(--atlas-line); }
.sg-icon-gallery > * {
  width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--atlas-line-soft);
  font-size: 1.3rem; cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.sg-icon-gallery > *:hover { border-color: var(--accent); }
.sg-icon-gallery > *.is-selected {
  border-color: var(--accent);
  background: rgba(108,198,255,0.10);
}
.sg-icon-drop {
  display: block; padding: 22px 16px;
  border: 1px dashed var(--atlas-line);
  text-align: center; cursor: pointer;
  font-family: var(--atlas-mono); font-size: 0.7rem;
  letter-spacing: 0.12em; color: var(--atlas-text-3);
}
.sg-icon-drop input { display: none; }
.sg-icon-drop:hover { border-color: var(--accent); color: var(--accent-bright); }

/* ════════ PREVIEW + SLOTS ════════ */
.sg-preview {
  text-align: center; padding: 14px 12px 18px;
  border-bottom: 1px solid var(--atlas-line-soft);
  margin-bottom: 14px;
}
.sg-preview-frame {
  width: 110px; height: 110px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--accent);
  margin-bottom: 10px;
  background: rgba(108,198,255,0.06);
  position: relative;
}
.sg-preview-frame::before, .sg-preview-frame::after {
  content: ''; position: absolute; width: 8px; height: 8px;
  border: 1px solid var(--accent-bright);
}
.sg-preview-frame::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.sg-preview-frame::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.sg-preview-glyph { font-family: var(--atlas-display); font-size: 3.6rem; color: var(--accent-bright); line-height: 1; }
.sg-preview-name {
  font-family: var(--atlas-display); font-weight: 700; font-size: 1rem;
  letter-spacing: 0.10em; color: var(--atlas-text);
}
.sg-preview-rarity {
  font-family: var(--atlas-mono); font-size: 0.66rem;
  letter-spacing: 0.20em; text-transform: uppercase;
  margin-top: 2px;
}

.sg-slots {
  display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin-bottom: 18px;
}
.sg-slots > * {
  padding: 10px;
  border: 1px dashed var(--atlas-line);
  text-align: center; cursor: pointer;
  font-family: var(--atlas-mono); font-size: 0.7rem;
  letter-spacing: 0.06em; color: var(--atlas-text-3);
  transition: border-color 0.25s, background 0.25s, color 0.25s;
  min-height: 56px;
  display: flex; align-items: center; justify-content: center;
}
.sg-slots > *:hover { border-color: var(--accent); color: var(--accent-bright); }
.sg-slots > *.is-filled {
  border-style: solid; border-color: var(--accent);
  background: rgba(108,198,255,0.06);
  color: var(--atlas-text);
}

/* ════════ ACTIONS ════════ */
.sg-actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  margin-top: 14px;
}
.sg-btn-gold, #sg-forge-btn, #confirm-forge-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  padding: 13px 26px;
  font-family: var(--atlas-mono); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.30em; text-transform: uppercase;
  color: #000;
  background: var(--accent);
  border: 1px solid var(--accent);
  cursor: pointer; transition: filter 0.25s, transform 0.25s;
}
.sg-btn-gold:hover, #sg-forge-btn:hover, #confirm-forge-btn:hover { filter: brightness(1.1); transform: translateX(2px); }
.sg-btn-gold:disabled, #sg-forge-btn:disabled, #confirm-forge-btn:disabled { opacity: 0.4; cursor: not-allowed; filter: none; transform: none; }

.sg-btn-ghost {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  font-family: var(--atlas-mono); font-weight: 600;
  font-size: 0.7rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--atlas-text-2);
  background: transparent; border: 1px solid var(--atlas-line);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.sg-btn-ghost:hover { border-color: var(--accent); color: var(--atlas-text); }

/* ════════ STATS LIST + INSTABILITY ════════ */
.sg-stats-list {
  display: grid; gap: 0;
  border: 1px solid var(--atlas-line-soft);
  margin-bottom: 14px;
}
.sg-stats-list > * {
  display: grid; grid-template-columns: 1fr auto;
  padding: 8px 12px;
  font-family: var(--atlas-mono); font-size: 0.78rem;
  border-bottom: 1px solid var(--atlas-line-soft);
  color: var(--atlas-text-2);
}
.sg-stats-list > *:last-child { border-bottom: 0; }
.sg-stats-list > * > *:last-child { color: var(--accent-bright); font-weight: 700; }

.sg-instab {
  padding: 12px 14px;
  border: 1px solid var(--atlas-line);
  background: rgba(255,255,255,0.012);
}
.sg-instab-head {
  display: flex; justify-content: space-between;
  font-family: var(--atlas-mono); font-size: 0.66rem;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--atlas-text-3);
  margin-bottom: 6px;
}
.sg-instab-value { color: var(--accent-bright); font-weight: 700; }
.sg-instab-bar {
  height: 6px; background: rgba(255,255,255,0.05);
  border: 1px solid var(--atlas-line-soft);
}
.sg-instab-bar-fill {
  height: 100%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  transition: width 0.4s, background 0.4s;
}
.sg-instab-label {
  margin-top: 6px;
  font-family: var(--atlas-mono); font-size: 0.66rem;
  letter-spacing: 0.16em; color: var(--atlas-text-3);
}

/* ════════ MODAL — line-text-frame ════════ */
.sg-modal[hidden] { display: none !important; }
.sg-modal {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.92); backdrop-filter: blur(10px);
  animation: sg-modal-fade 0.25s ease;
}
@keyframes sg-modal-fade { from { opacity: 0; } to { opacity: 1; } }
.sg-modal-bg { position: absolute; inset: 0; cursor: pointer; }
.sg-modal-content {
  position: relative; z-index: 1;
  width: min(680px, 94vw); max-height: 88vh; overflow-y: auto;
  padding: 38px 36px 30px;
  background: #000;
  border: 1px solid var(--atlas-line);
  animation: sg-modal-rise 0.35s cubic-bezier(.16,1,.3,1);
}
.sg-modal-content::-webkit-scrollbar { width: 6px; }
.sg-modal-content::-webkit-scrollbar-thumb { background: var(--atlas-line); }
.sg-modal-content::before, .sg-modal-content::after {
  content: ''; position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--accent);
}
.sg-modal-content::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.sg-modal-content::after  { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
@keyframes sg-modal-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.sg-modal-close {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px;
  background: transparent; border: 1px solid var(--atlas-line);
  color: var(--atlas-text-2);
  font-family: var(--atlas-display); font-size: 0.85rem; cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
  z-index: 2;
}
.sg-modal-close:hover { border-color: var(--accent); color: var(--atlas-text); }

.sg-modal-eyebrow {
  font-family: var(--atlas-mono); font-size: 0.66rem;
  letter-spacing: 0.30em; text-transform: uppercase; color: var(--atlas-text-d);
  display: inline-flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.sg-modal-eyebrow::before {
  content: '››'; color: var(--accent); font-family: var(--atlas-display); font-weight: 700;
}
.sg-modal-title {
  font-family: var(--atlas-display); font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--atlas-text);
  margin: 0 0 6px; line-height: 1.05;
}

.sg-material-browser {
  margin-top: 14px;
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.sg-material-browser > * {
  padding: 10px; border: 1px solid var(--atlas-line);
  font-family: var(--atlas-mono); font-size: 0.74rem;
  color: var(--atlas-text-2); cursor: pointer;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.sg-material-browser > *:hover { border-color: var(--accent); background: rgba(108,198,255,0.06); color: var(--accent-bright); }

@media (max-width: 1080px) {
  .sg-layout { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .sg-hero { grid-template-columns: 1fr; gap: 12px; padding-top: 50px; }
  .sg-hero-num { justify-self: start; opacity: 0.10; }
  .sg-status { grid-template-columns: 1fr; }
  .sg-status > *:not(:first-child) { text-align: left; }
}

/* ════════ RENDER CLASSES (JS-emitted, atlas-aligned) ════════ */
/* Noyaux (cores) */
.sg-noyau {
  position: relative;
  display: grid; grid-template-columns: auto 1fr; gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255,255,255,0.012);
  border: 1px solid var(--atlas-line);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.sg-noyau:hover { border-color: var(--accent); background: rgba(108,198,255,0.06); transform: translateY(-1px); }
.sg-noyau.is-selected { border-color: var(--accent); background: rgba(108,198,255,0.10); }
.sg-noyau.is-disabled { opacity: 0.4; cursor: not-allowed; }
.sg-noyau-ico {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--atlas-display); font-size: 1.4rem;
  color: var(--accent-bright);
  background: rgba(108,198,255,0.06);
  border: 1px solid var(--accent-dim);
}
.sg-noyau-body { display: flex; flex-direction: column; gap: 2px; }
.sg-noyau-name {
  font-family: var(--atlas-display); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.06em; color: var(--atlas-text);
}
.sg-noyau-rarity {
  font-family: var(--atlas-mono); font-size: 0.62rem;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent-bright);
}
.sg-noyau-meta {
  font-family: var(--atlas-mono); font-size: 0.66rem;
  letter-spacing: 0.12em; color: var(--atlas-text-3);
}

/* Item type tiles */
.sg-type {
  display: inline-flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 18px; min-width: 110px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--atlas-line);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.sg-type:hover { border-color: var(--accent); background: rgba(108,198,255,0.06); }
.sg-type.is-selected { border-color: var(--accent-violet); background: rgba(199,139,255,0.08); }
.sg-type-ico {
  font-family: var(--atlas-display); font-size: 1.6rem;
  color: var(--accent-bright);
}
.sg-type-label {
  font-family: var(--atlas-mono); font-size: 0.7rem;
  letter-spacing: 0.20em; text-transform: uppercase; color: var(--atlas-text-2);
}

/* Materials in browser */
.sg-mat-card {
  position: relative;
  padding: 12px 14px;
  background: rgba(255,255,255,0.012);
  border: 1px solid var(--atlas-line);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.sg-mat-card:hover { border-color: var(--accent); background: rgba(108,198,255,0.06); transform: translateY(-1px); }
.sg-mat-card.is-disabled { opacity: 0.4; cursor: not-allowed; }
.sg-mat-head {
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 10px; margin-bottom: 6px;
}
.sg-mat-ico { font-family: var(--atlas-display); font-size: 1.4rem; color: var(--accent-bright); }
.sg-mat-name {
  font-family: var(--atlas-display); font-weight: 700; font-size: 0.88rem;
  color: var(--atlas-text);
}
.sg-mat-qty {
  font-family: var(--atlas-mono); font-size: 0.7rem;
  letter-spacing: 0.14em; color: var(--accent-bright);
  font-variant-numeric: tabular-nums;
}
.sg-mat-effect {
  font-family: var(--atlas-mono); font-size: 0.72rem; line-height: 1.5;
  color: var(--atlas-text-3);
}
.sg-mat-instab {
  font-family: var(--atlas-mono); font-size: 0.62rem;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-violet);
  margin-top: 4px;
}

/* Slots (filled materials) */
.sg-slot-ico { font-family: var(--atlas-display); font-size: 1.2rem; color: var(--accent-bright); }
.sg-slot-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.sg-slot-name {
  font-family: var(--atlas-display); font-weight: 700; font-size: 0.82rem;
  color: var(--atlas-text);
}
.sg-slot-effect {
  font-family: var(--atlas-mono); font-size: 0.66rem;
  letter-spacing: 0.06em; color: var(--atlas-text-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sg-slot-remove {
  background: transparent; border: 1px solid var(--atlas-line);
  color: var(--atlas-text-2);
  width: 24px; height: 24px;
  font-family: var(--atlas-display); font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}
.sg-slot-remove:hover { border-color: var(--atlas-warn); color: var(--atlas-warn); }

/* Stats rows */
.sg-stat-row {
  display: grid; grid-template-columns: 1fr auto auto;
  align-items: center; gap: 14px;
  padding: 6px 10px;
  font-family: var(--atlas-mono); font-size: 0.78rem;
  border-bottom: 1px solid var(--atlas-line-soft);
  color: var(--atlas-text-2);
}
.sg-stat-row:last-child { border-bottom: 0; }
.sg-stat-row.is-capped { color: var(--accent-bright); }
.sg-stat-label {
  letter-spacing: 0.16em; text-transform: uppercase;
}
.sg-stat-value {
  font-variant-numeric: tabular-nums;
  font-family: var(--atlas-display); font-weight: 700;
  color: var(--accent-bright);
}
.sg-stat-cap {
  font-size: 0.66rem;
  color: var(--atlas-text-d);
}

/* Buttons */
.sg-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px;
  background: transparent; border: 1px solid var(--accent-dim);
  color: var(--accent-bright);
  font-family: var(--atlas-mono); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}
.sg-btn:hover:not(:disabled) { background: rgba(108,198,255,0.10); border-color: var(--accent); }
.sg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.sg-btn-magenta {
  border-color: var(--accent-violet);
  color: var(--accent-violet);
}
.sg-btn-magenta:hover:not(:disabled) {
  background: rgba(199,139,255,0.10);
  border-color: var(--accent-violet);
  color: #f0d8ff;
}

/* Forge animation */
.sg-forge-anim {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 24px;
  background: radial-gradient(circle at center, rgba(108,198,255,0.08), transparent 70%);
  border: 1px solid var(--accent-dim);
}
.sg-forge-core {
  font-family: var(--atlas-display); font-size: 4rem;
  color: var(--accent-bright);
  animation: sg-pulse 1.4s ease-in-out infinite;
  margin-bottom: 16px;
}
.sg-forge-text {
  font-family: var(--atlas-mono); font-size: 0.85rem;
  letter-spacing: 0.30em; text-transform: uppercase;
  color: var(--atlas-text);
}
@keyframes sg-pulse {
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50%      { transform: scale(1.12); opacity: 1; }
}

/* Preview */
.sg-preview-img {
  width: 100%; max-width: 220px;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--atlas-line);
  font-family: var(--atlas-display); font-size: 3.6rem;
  color: var(--accent-bright);
  margin: 0 auto 14px;
}

/* Icon tiles */
.sg-icon-tile {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--atlas-line);
  font-family: var(--atlas-display); font-size: 1.4rem;
  color: var(--accent-bright);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
}
.sg-icon-tile:hover { border-color: var(--accent); background: rgba(108,198,255,0.06); }
.sg-icon-tile.is-selected { border-color: var(--accent-violet); background: rgba(199,139,255,0.10); }

/* Toast */
.sg-toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  padding: 12px 22px; z-index: 10000;
  font-family: var(--atlas-mono); font-size: 0.8rem;
  letter-spacing: 0.20em; text-transform: uppercase;
  background: rgba(0,0,0,0.95); border: 1px solid var(--accent);
  color: var(--atlas-text);
  animation: sg-toast-in 0.3s ease;
}
.sg-toast.is-error { border-color: var(--atlas-warn); color: var(--atlas-warn); }
.sg-toast.is-success { border-color: var(--accent); }
@keyframes sg-toast-in { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
