/* Artemis Lab + play shell chrome */
.artemis-file-warning {
  margin: 0;
  padding: 14px 18px;
  background: #451a03;
  color: #fde68a;
  border-bottom: 1px solid rgba(251, 191, 36, 0.35);
  font-size: 0.9rem;
  line-height: 1.5;
}

.artemis-file-warning code {
  color: #fef3c7;
}
.artemis-lab-back,
.artemis-variant-badge,
.artemis-variant-warn {
  position: fixed;
  z-index: 12000;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.3;
  border-radius: 10px;
  padding: 6px 10px;
  text-decoration: none;
  backdrop-filter: blur(8px);
}

.artemis-rules-bar {
  position: fixed;
  top: 48px;
  left: 72px;
  z-index: 12000;
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(11, 18, 35, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.artemis-gravity-bar {
  position: fixed;
  top: 10px;
  left: 72px;
  z-index: 12000;
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(11, 18, 35, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.artemis-gravity-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #9eb2d1;
  background: transparent;
}

.artemis-gravity-btn[aria-pressed='true'] {
  color: #fff;
  background: rgba(99, 102, 241, 0.5);
}

.artemis-gravity-btn:hover {
  color: #eef4ff;
}

.artemis-lab-back {
  top: 10px;
  left: 10px;
  color: #eef4ff;
  background: rgba(11, 18, 35, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.artemis-lab-back:hover {
  color: #fff;
  border-color: rgba(99, 102, 241, 0.55);
}

.artemis-variant-badge {
  top: 10px;
  right: 10px;
  color: #c8d9f5;
  background: rgba(11, 18, 35, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.artemis-variant-warn {
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(92vw, 520px);
  text-align: center;
  color: #fde68a;
  background: rgba(69, 26, 3, 0.88);
  border: 1px solid rgba(251, 191, 36, 0.35);
}

html.artemis-lunar .board-panel {
  box-shadow: inset 0 -24px 48px rgba(99, 102, 241, 0.12);
}

html.artemis-palette-mono:not(.artemis-mono-patterns) .board-game-view {
  filter: saturate(0.15) contrast(1.05);
}

/* —— Lab brand (Logo + Wordmark) —— */
.artemis-lab-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 16px;
}

.artemis-lab-brand:hover .artemis-lab-brand-wordmark {
  opacity: 0.85;
}

.artemis-lab-brand-logo {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 18px rgba(99, 102, 241, 0.4));
}

.artemis-lab-brand-wordmark {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(125deg, #ffffff 12%, #c7d2fe 38%, #22d3ee 72%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: opacity 0.15s ease;
}

@supports not (background-clip: text) {
  .artemis-lab-brand-wordmark {
    color: #eef4ff;
  }
}

/* —— Lab hub page —— */
.artemis-lab-page {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #eef4ff;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 240, 255, 0.14), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(124, 58, 237, 0.2), transparent 30%),
    linear-gradient(145deg, #07111f, #130f2a 60%, #060816);
}

.artemis-lab-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 20px 48px;
}

.artemis-lab-wrap h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
  font-weight: 800;
}

.artemis-lab-lead {
  margin: 0 0 24px;
  color: #9eb2d1;
  line-height: 1.55;
}

.artemis-lab-toggles {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.artemis-lab-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(11, 18, 35, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.artemis-lab-toggle-row label {
  font-weight: 600;
  font-size: 0.95rem;
}

.artemis-lab-toggle-row .hint {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: #9eb2d1;
  margin-top: 2px;
}

.artemis-lab-switch {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.artemis-lab-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9eb2d1;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.artemis-lab-switch button[aria-pressed='true'] {
  background: rgba(99, 102, 241, 0.45);
  color: #fff;
}

.artemis-lab-switch button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.artemis-lab-switch .lab-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.artemis-lab-presets {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.artemis-lab-preset-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.artemis-lab-preset-wrap.is-active .artemis-lab-preset-row,
.artemis-lab-preset-wrap.is-active .artemis-lab-preview-hit {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.28);
}

.artemis-lab-preset-row {
  flex: 1;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 18, 35, 0.65);
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.artemis-lab-preset-row:hover {
  border-color: rgba(99, 102, 241, 0.45);
}

.artemis-lab-preset-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  color: #eef4ff;
  font: inherit;
  cursor: pointer;
  position: relative;
}

.artemis-lab-preset-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65em;
  flex-wrap: nowrap;
  white-space: nowrap;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  min-width: 0;
}

.artemis-lab-mission-lv {
  flex-shrink: 0;
  margin-left: auto;
  font-weight: 800;
  color: #a5b4fc;
}

.artemis-lab-preset-sep {
  flex-shrink: 0;
  color: #6b7a99;
  font-weight: 500;
}

.artemis-lab-preset-title {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.artemis-lab-lv-done {
  flex-shrink: 0;
  color: #4ade80;
  font-weight: 800;
}

.artemis-lab-preset-sub {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 400;
  color: #9eb2d1;
  line-height: 1.35;
  white-space: normal;
}

.artemis-lab-preset-sub .artemis-lab-lv-done {
  margin-left: auto;
  flex-shrink: 0;
  line-height: 1;
}

.artemis-lab-preview-hit {
  flex-shrink: 0;
  display: block;
  padding: 3px;
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(6, 10, 20, 0.92);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

.artemis-lab-preview-hit:hover {
  border-color: rgba(99, 102, 241, 0.65);
  transform: scale(1.04);
}

.artemis-lab-preview-mini {
  width: 30px;
  height: 60px;
  display: block;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}

.artemis-lab-preset-wrap--done .artemis-lab-preset-row {
  border-color: rgba(74, 222, 128, 0.35);
}

.artemis-lab-missions {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(11, 18, 35, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.artemis-lab-missions-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
}

.artemis-lab-mission-sub {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #9eb2d1;
  line-height: 1.35;
}

.artemis-lab-mission-wrap.is-finale .artemis-lab-mission-sub {
  color: #c7d2fe;
}

.artemis-lab-mission-wrap.is-finale.is-complete .artemis-lab-mission-row {
  border-color: rgba(167, 139, 250, 0.4);
}

.artemis-lab-mission-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.artemis-lab-mission-wrap:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.artemis-lab-mission-wrap.is-locked {
  opacity: 0.72;
}

.artemis-lab-mission-row {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  min-width: 0;
}

.artemis-lab-mission-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.artemis-lab-mission-start {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.artemis-lab-mission-start:hover {
  filter: brightness(1.08);
}

.artemis-lab-mission-progress {
  font-size: 0.8rem;
  color: #9eb2d1;
  white-space: nowrap;
}

.artemis-lab-mission-complete {
  margin: 0;
  font-size: 0.92rem;
  color: #c8d9f5;
}

.artemis-lab-mission-complete strong {
  color: #86efac;
}

.artemis-lab-mission-locked {
  margin: 0;
  font-size: 0.9rem;
  color: #9eb2d1;
}

.artemis-lab-mission-hint {
  margin: 0;
  font-size: 0.75rem;
  color: #7c8fad;
}

.artemis-lab-mission-row.is-locked {
  flex-direction: column;
  align-items: flex-start;
}

.artemis-lab-mission-row.is-complete {
  justify-content: flex-start;
}

.artemis-lab-play {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 8px 28px rgba(99, 102, 241, 0.35);
}

.artemis-lab-play:hover {
  filter: brightness(1.06);
}

/* —— Tabs —— */
.artemis-lab-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.artemis-lab-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9eb2d1;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.artemis-lab-tab:hover {
  color: #eef4ff;
}

.artemis-lab-tab.is-active {
  color: #fff;
  border-bottom-color: #818cf8;
}

.artemis-lab-panel {
  animation: labFadeIn 0.15s ease;
}

@keyframes labFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* —— Daten (Import / Export) —— */
.artemis-lab-data {
  padding: 14px;
  border-radius: 14px;
  background: rgba(11, 18, 35, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.artemis-lab-data-title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  font-weight: 800;
}

.artemis-lab-data-desc {
  margin: 0 0 18px;
  font-size: 0.85rem;
  color: #9eb2d1;
  line-height: 1.5;
}

.artemis-lab-data-section {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.artemis-lab-data-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.artemis-lab-data-section h3 {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #c8d9f5;
}

.artemis-lab-data-btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  margin-right: 8px;
  margin-bottom: 8px;
}

.artemis-lab-data-btn:hover {
  filter: brightness(1.08);
}

.artemis-lab-data-btn--secondary {
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
}

.artemis-lab-data-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.3);
  color: #eef4ff;
  font: inherit;
  font-size: 0.82rem;
  resize: vertical;
}

.artemis-lab-data-textarea::placeholder {
  color: #7c8fad;
}

.artemis-lab-data-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.artemis-lab-data-file-label {
  display: inline-block;
  cursor: pointer;
}

.artemis-lab-data-feedback {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: #9eb2d1;
  min-height: 1.2em;
}

/* —— Figuren —— */
.artemis-lab-figuren {
  padding: 14px;
  border-radius: 14px;
  background: rgba(11, 18, 35, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.artemis-lab-difficulty {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.artemis-lab-difficulty-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #9eb2d1;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.artemis-lab-difficulty-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.artemis-lab-difficulty-btn.is-active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.artemis-lab-difficulty-hint {
  margin: 0 0 14px;
  font-size: 0.78rem;
  color: #9eb2d1;
  text-align: center;
}

.artemis-lab-shape-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
}

.artemis-lab-shape-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.2s, border-color 0.2s;
}

.artemis-lab-shape-card.is-locked {
  opacity: 0.35;
  border-color: transparent;
}

.artemis-lab-shape-card.is-toggleable {
  cursor: pointer;
}

.artemis-lab-shape-card.is-toggleable:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.06);
}

.artemis-lab-shape-card.is-pro-locked {
  border-color: rgba(99, 102, 241, 0.25);
}

.artemis-lab-shape-canvas {
  image-rendering: pixelated;
}

.artemis-lab-shape-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: #e2e8f0;
  text-align: center;
}

.artemis-lab-shape-tier {
  font-size: 0.68rem;
  color: #64748b;
  text-align: center;
}

/* —— Credits —— */
.artemis-lab-credits {
  padding: 14px;
  border-radius: 14px;
  background: rgba(11, 18, 35, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  line-height: 1.6;
}

.artemis-lab-credits p {
  margin: 0 0 14px;
  font-size: 0.9rem;
}

.artemis-lab-credits p:last-child {
  margin-bottom: 0;
}

.artemis-lab-credits a {
  color: #a5b4fc;
}

.artemis-lab-credits-footnote {
  font-size: 0.8rem !important;
  color: #9eb2d1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
  margin-top: 16px !important;
}
