/* Generator-Seite: seitenspezifische Styles (Basis in base.css, Header in header.css) */

/* Seitenrahmen */
#generator-page {
  width:100%;
  max-width:1440px;
  margin:0 auto;
  padding:0 24px 56px;
}
.heading {
  padding:28px 0 20px;
  h1 {
    margin:0 0 2px;
    font-size:26px;
    font-weight:700;
  }
  .hint {
    margin:0;
  }
}
.hint {
  color:var(--sub);
  font-size:14px;
}

/* Arbeitsbereich */
.workspace {
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:20px;
  align-items:start;
  > * {
    min-width:0;
  }
}
.pane {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:clip;
  .panetitle {
    padding:12px 16px;
    border-bottom:1px solid var(--line);
    font-weight:600;
  }
}
.editor {
  display:flex;
  flex-direction:column;
  min-height:560px;
  .content {
    flex:1;
    padding:24px;
  }
}

/* Schritte als Tab-Leiste */
.steptabs {
  display:flex;
  padding:0 12px;
  border-bottom:1px solid var(--line);
  background:var(--panel);
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  button {
    display:flex;
    align-items:center;
    gap:8px;
    padding:14px 12px 13px;
    background:none;
    border:0;
    color:var(--sub);
    font-weight:500;
    white-space:nowrap;
    &:hover {
      color:var(--ink);
    }
    &.active {
      color:var(--ink);
      font-weight:600;
      box-shadow:inset 0 -2px var(--accent);
      .stepnum {
        color:var(--accent-ink);
      }
    }
  }
}
.stepnum {
  color:var(--faint);
  font-variant-numeric:tabular-nums;
}
.stephead {
  margin-bottom:2px;
  h3 {
    margin:0;
    font-size:19px;
    font-weight:600;
  }
}
/* Mehrere Einleitungsabsätze (z. B. im Rezept-Schritt) wirken wie einer */
.content > section > .tiny:first-of-type + .tiny {
  margin:-14px 0 20px;
  max-width:640px;
  font-size:15px;
}
.content > section > .tiny:first-of-type {
  margin:0 0 20px;
  max-width:640px;
  font-size:15px;
}
.editorfoot {
  position:sticky;
  bottom:0;
  z-index:5;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px 24px;
  background:var(--surface);
  border-top:1px solid var(--line);
  > div {
    display:flex;
    gap:8px;
  }
  .primary {
    min-width:110px;
  }
  .stepcount {
    color:var(--faint);
    font-size:14px;
    font-variant-numeric:tabular-nums;
  }
}

/* Formular-Grundelemente */
.label {
  display:block;
  margin:0 0 6px;
  color:var(--ink);
  font-size:14px;
  font-weight:600;
}
.field,.search {
  width:100%;
  min-width:0;
  padding:9px 11px;
  background:var(--surface);
  border:1px solid var(--line-strong);
  border-radius:var(--radius);
  color:var(--ink);
  &::placeholder {
    color:var(--faint);
  }
  &:hover {
    border-color:var(--line-hover);
  }
  &:focus {
    outline:none;
    border-color:var(--accent);
    box-shadow:0 0 0 2px var(--accent-soft);
  }
}
select.field {
  cursor:pointer;
}
input[type=color].field {
  height:38px;
  padding:3px;
}
input[type=checkbox] {
  accent-color:var(--accent);
}
.tiny {
  margin:8px 0;
  color:var(--sub);
  font-size:14px;
}
.gray {
  color:#5c5c58;
}
.tag {
  padding:1px 7px;
  background:var(--raised);
  border-radius:var(--radius-sm);
  color:var(--sub);
  font-size:12px;
  white-space:nowrap;
}

/* Umschalter (Kategorien, Level, Modi) */
.categorytabs {
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  padding:10px 12px 12px;
  button {
    padding:4px 9px;
    background:var(--surface);
    border:1px solid var(--line);
    border-radius:var(--radius-sm);
    color:var(--sub);
    font-size:13px;
    &:hover {
      border-color:var(--line-hover);
      color:var(--ink);
    }
    &.on {
      background:var(--ink);
      border-color:var(--ink);
      color:var(--surface);
    }
  }
}
.level-tabs {
  display:grid;
  margin-bottom:20px;
  border:1px solid var(--line-strong);
  border-radius:var(--radius);
  overflow:hidden;
  .level-tab {
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:1px;
    padding:9px 6px;
    background:var(--surface);
    border:0;
    color:var(--sub);
    & + .level-tab {
      border-left:1px solid var(--line-strong);
    }
    strong {
      font-weight:600;
    }
    small,span {
      color:var(--faint);
      font-size:12px;
    }
    &:hover {
      background:var(--panel);
      color:var(--ink);
    }
    &.active {
      background:var(--raised);
      color:var(--ink);
      box-shadow:inset 0 -2px var(--accent);
      span {
        color:var(--accent-ink);
      }
    }
  }
}
#trade-levels {
  grid-template-columns:repeat(5,minmax(0,1fr));
}
#visual-modes {
  grid-template-columns:repeat(3,minmax(0,1fr));
  max-width:420px;
}

/* Item-Katalog und Slots im Minecraft-Inventarstil */
.inventory {
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--panel);
}
.inventorytop {
  padding:12px 12px 0;
}
.catalog-nav {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 12px;
  color:var(--sub);
  font-size:13px;
  font-variant-numeric:tabular-nums;
  button {
    min-width:34px;
  }
}
.items {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(44px,1fr));
  gap:2px;
  max-height:300px;
  padding:8px;
  overflow:auto;
  align-content:start;
  background:var(--mc-gui);
  border-block:2px solid var(--mc-dark);
}
.item {
  position:relative;
  aspect-ratio:1;
  display:grid;
  place-items:center;
  padding:3px;
  overflow:hidden;
  content-visibility:auto;
  contain-intrinsic-size:44px 44px;
  background:var(--mc-slot);
  border:0;
  border-radius:0;
  box-shadow:inset 2px 2px var(--mc-slot-shadow),inset -2px -2px var(--mc-slot-light);
  color:#fff;
  &:hover {
    background:var(--mc-slot-hover);
  }
  &.active {
    background:var(--mc-slot-hover);
    outline:2px solid #fff;
    outline-offset:-4px;
  }
  .count {
    position:absolute;
    right:3px;
    bottom:0;
    font-size:11px;
    font-weight:800;
    text-shadow:1px 1px #3f3f3f;
  }
}
.texicon {
  display:block;
  width:32px;
  height:32px;
  flex:none;
  pointer-events:none;
  transform-origin:top left;
  object-fit:contain;
  image-rendering:auto;
}
.fallback {
  display:grid;
  place-items:center;
  width:100%;
  height:100%;
  font-size:20px;
  text-shadow:0 1px 2px #0008;
}
.slot {
  position:relative;
  display:grid;
  place-items:center;
  width:52px;
  height:52px;
  padding:2px;
  background:var(--mc-slot);
  box-shadow:inset 2px 2px var(--mc-slot-shadow),inset -2px -2px var(--mc-slot-light);
  cursor:pointer;
  &.empty .gray {
    font-size:18px;
  }
  &:hover {
    background:var(--mc-slot-hover);
  }
  &.drop {
    background:var(--mc-slot-hover);
    outline:2px dashed #fff;
    outline-offset:-5px;
  }
  &.selected {
    outline:2px solid #fff;
    outline-offset:-5px;
  }
  .texicon {
    transform:scale(1.02);
    margin:-2px;
  }
  .fallback {
    font-size:24px;
  }
  .clear {
    position:absolute;
    top:-7px;
    right:-7px;
    width:18px;
    height:18px;
    padding:0;
    border:0;
    border-radius:50%;
    background:var(--ink);
    color:var(--surface);
    font-size:13px;
    line-height:18px;
    opacity:0;
  }
  &:hover .clear,.clear:focus-visible {
    opacity:1;
  }
}

/* 01 Crafting */
.recipebody {
  display:grid;
  grid-template-columns:minmax(0,1fr) 250px;
  gap:20px;
  align-items:start;
}
.craft-panel {
  padding:16px;
  background:var(--mc-gui);
  border:2px solid var(--mc-dark);
  box-shadow:inset 2px 2px var(--mc-gui-light),inset -2px -2px var(--mc-gui-shade);
}
.crafttitle {
  margin-bottom:10px;
color:var(--mc-text);
  font-size:14px;
  font-weight:600;
}
.recipegrid {
  display:grid;
  grid-template-columns:repeat(3,52px);
  justify-content:center;
  width:max-content;
  margin:0 auto;
}
.craftresult {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  margin-top:14px;
  .slot {
    width:60px;
    height:60px;
  }
  .gold-arrow {
    color:var(--mc-arrow);
    font-size:26px;
    font-weight:900;
  }
}
/* Ergebnis-Slot: Workstation mit Spawn-Ei als Abzeichen */
.result-slot {
  .station-icon {
    width:46px;
    height:46px;
    margin:0;
    transform:none;
  }
  &:hover .mc-tooltip,&:focus-visible .mc-tooltip {
    display:block;
  }
}
.slot-badge {
  position:absolute;
  right:-8px;
  bottom:-8px;
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  background:var(--mc-slot);
  box-shadow:inset 2px 2px var(--mc-slot-shadow),inset -2px -2px var(--mc-slot-light);
  .texicon {
    width:18px;
    height:18px;
    margin:0;
    transform:none;
  }
}
/* Tooltip wie im Spiel: Name, darunter die echte Item-ID (wie mit F3+H) */
.mc-tooltip {
  display:none;
  position:absolute;
  top:calc(100% + 12px);
  left:50%;
  z-index:20;
  width:max-content;
  max-width:240px;
  padding:6px 9px 7px;
  transform:translateX(-50%);
  background:rgba(16,0,16,.95);
  border:2px solid #100010;
  box-shadow:inset 0 0 0 2px #3a138f;
  text-align:left;
  pointer-events:none;
  b {
    display:block;
    color:#fff;
    font-family:var(--pixel,var(--font));
    font-size:15px;
    font-weight:400;
    text-shadow:2px 2px 0 #3e3e3e;
  }
  small {
    display:block;
    margin-top:2px;
    color:#7d7d7d;
    font-family:var(--mono);
    font-size:12px;
  }
  em {
    display:block;
    margin-top:6px;
    color:#a8a8a8;
    font-size:12px;
    font-style:normal;
    white-space:normal;
  }
}
.rightdetail {
  margin-top:14px;
  padding:8px 10px;
  background:var(--mc-slot);
  box-shadow:inset 2px 2px var(--mc-slot-shadow),inset -2px -2px var(--mc-slot-light);
  color:var(--mc-text);
  text-align:center;
  overflow-wrap:anywhere;
  font-size:14px;
  small {
    color:var(--faint);
    font-size:12px;
  }
}
.clear-recipe {
  width:100%;
  margin-top:10px;
}

/* 02 Infos */
.infogrid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  max-width:720px;
  .full {
    grid-column:1/-1;
  }
}

/* 03 Trades */
.level-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:14px;
  font-size:16px;
  strong {
    font-weight:600;
  }
}
.tradehead {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:14px;
}
.tradepill {
  display:flex;
  flex-direction:column;
  gap:1px;
  max-width:100%;
  padding:7px 12px;
  background:var(--surface);
  border:1px solid var(--line-strong);
  border-radius:var(--radius);
  color:var(--ink);
  font-size:14px;
  font-weight:600;
  text-align:left;
  small {
    color:var(--faint);
    font-size:12px;
    font-weight:400;
  }
  &:hover {
    border-color:var(--line-hover);
  }
  &.active {
    border-color:var(--accent);
    box-shadow:inset 0 0 0 1px var(--accent);
  }
}
.empty-trades {
  padding:40px 16px;
  border:1px dashed var(--line-strong);
  border-radius:var(--radius);
  text-align:center;
  strong {
    font-size:16px;
  }
  .primary {
    margin-top:8px;
  }
}
.tradeframe {
  padding:18px;
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  strong {
    font-weight:600;
  }
}
.tradevisual {
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  padding:16px 14px;
  background:var(--mc-gui);
  border:2px solid var(--mc-dark);
  box-shadow:inset 2px 2px var(--mc-gui-light),inset -2px -2px var(--mc-gui-shade);
  .smallbutton {
    font-size:13px;
  }
}
.tradeitem {
  display:flex;
  flex:1;
  flex-direction:column;
  align-items:center;
  gap:8px;
  min-width:0;
  label {
color:var(--mc-text);
    font-size:13px;
    font-weight:600;
  }
  .slot {
    width:58px;
    height:58px;
  }
}
.itemcount {
  display:flex;
  align-items:center;
  background:var(--surface);
  border:1px solid #8a8a8a;
  border-radius:var(--radius-sm);
  overflow:hidden;
  button {
    width:26px;
    height:28px;
    background:var(--surface);
    border:0;
    color:var(--ink);
    &:hover {
      background:var(--raised);
    }
  }
  input {
    width:40px;
    height:28px;
    padding:0;
    background:var(--surface);
    border:0;
    border-inline:1px solid var(--line-strong);
    color:var(--ink);
    text-align:center;
    font-variant-numeric:tabular-nums;
    -moz-appearance:textfield;
    &::-webkit-outer-spin-button,&::-webkit-inner-spin-button {
      -webkit-appearance:none;
      margin:0;
    }
  }
}
.trade-arrow {
  color:var(--mc-arrow);
  font-size:26px;
  font-weight:900;
}
.trade-controls {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin:16px 0;
  label {
    color:var(--ink);
    font-size:13px;
    font-weight:600;
  }
  input,select {
    display:block;
    width:100%;
    margin-top:5px;
    padding:8px 10px;
    background:var(--surface);
    border:1px solid var(--line-strong);
    border-radius:var(--radius);
    color:var(--ink);
    font-weight:400;
    &:focus {
      outline:none;
      border-color:var(--accent);
    }
  }
}
.componentcards {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  border:1px solid var(--line-strong);
  border-radius:var(--radius);
  overflow:hidden;
  button {
    padding:8px 10px;
    background:var(--surface);
    border:0;
    color:var(--sub);
    font-size:14px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    & + button {
      border-left:1px solid var(--line-strong);
    }
    &:hover {
      color:var(--ink);
    }
    &.active {
      background:var(--raised);
      color:var(--ink);
      font-weight:600;
      box-shadow:inset 0 -2px var(--accent);
    }
  }
}
.componentbox {
  margin-top:12px;
  padding:16px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  .label {
    margin-top:14px;
  }
  .comp-row {
    margin:10px 0;
    padding:12px;
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:var(--radius);
  }
  .comp-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-bottom:8px;
    font-size:14px;
    font-weight:600;
    button {
      background:none;
      border:0;
      color:var(--faint);
      &:hover {
        color:var(--danger);
      }
    }
  }
  .comp-line {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
}

/* 04 Visuelles */
#visual-controls {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
  gap:16px;
  align-items:start;
  > .pane {
    padding:18px;
  }
  .viewer-controls {
    display:flex;
    flex-direction:column;
    gap:12px;
    p {
      margin:0;
      overflow-wrap:anywhere;
    }
  }
  .hat-editor {
    canvas {
      cursor:grab;
      touch-action:none;
    }
    .block-texture-inputs {
      grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
    }
  }
}
.visual-card-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin-bottom:2px;
  h2 {
    margin:0;
    font-size:16px;
    font-weight:600;
  }
}
.visual-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.resource-pack-editor .label {
  margin-top:14px;
}
.block-texture-inputs {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(130px,1fr));
  gap:8px;
  margin-top:12px;
}
.block-texture-upload {
  display:grid;
  gap:6px;
  padding:10px;
  border:1px dashed var(--line-strong);
  border-radius:var(--radius);
  color:var(--sub);
  font-size:13px;
  cursor:pointer;
  &:hover {
    border-color:var(--line-hover);
  }
  input {
    max-width:100%;
    font-size:13px;
  }
  img {
    width:64px;
    height:64px;
    object-fit:contain;
    image-rendering:pixelated;
    background:var(--sunken);
  }
}
.block-previews {
  display:flex;
  justify-content:center;
  margin-top:14px;
  figure {
    margin:0;
    min-width:0;
    background:var(--sunken);
    border:1px solid var(--line);
    border-radius:var(--radius);
    text-align:center;
  }
  canvas {
    display:block;
    width:min(100%,206px);
    height:auto;
    margin:auto;
    image-rendering:pixelated;
  }
  figcaption {
    padding:6px;
    border-top:1px solid var(--line);
    color:var(--faint);
    font-size:13px;
  }
}
input[data-viewer-control="texture-crisp"] {
  display:none;
}
.upload-texture-container {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:12px;
  > label:not(.primary):has(input[data-viewer-control="texture-crisp"]) {
    display:none;
  }
}
.upload-texture {
  position:relative;
  cursor:pointer;
  input {
    position:absolute;
    inset:0;
    opacity:0;
    cursor:pointer;
  }
}
.upload-texture-status {
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  .tiny:empty {
    display:none;
  }
}
.texture-preview {
  width:96px;
  height:96px;
  object-fit:contain;
  image-rendering:pixelated;
  background:repeating-conic-gradient(#2c2c2a 0% 25%,#222221 0% 50%) 0/12px 12px;
  border:1px solid var(--line-strong);
}

/* 3D-Viewer */
.viewer-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 285px;
  gap:20px;
}
.viewer-stage {
  position:relative;
  min-height:500px;
  overflow:hidden;
  background:linear-gradient(#2d2d2b,#1d1d1c);
  canvas {
    display:block;
    width:100%;
    height:520px;
    touch-action:none;
    cursor:grab;
    &:active {
      cursor:grabbing;
    }
    &:focus-visible {
      outline:2px solid var(--accent);
      outline-offset:-2px;
    }
  }
}
.viewer-instructions {
  position:absolute;
  left:12px;
  right:12px;
  bottom:10px;
  color:var(--faint);
  font-size:12px;
  text-align:center;
  pointer-events:none;
}

/* 05 Export */
.export-bundle {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:18px 20px;
  border:1px solid var(--line-strong);
  border-radius:var(--radius) var(--radius) 0 0;
  background:var(--panel);
  h4 {
    margin:0 0 2px;
    font-size:16px;
    font-weight:600;
  }
  p {
    margin:0;
    color:var(--sub);
  }
  button {
    flex:none;
    min-width:180px;
  }
}
.export-actions {
  border:1px solid var(--line-strong);
  border-top:0;
  border-radius:0 0 var(--radius) var(--radius);
}
.export-card {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 20px;
  & + & {
    border-top:1px solid var(--line);
  }
  h4 {
    margin:0;
    font-size:15px;
    font-weight:600;
  }
  p {
    margin:0;
    color:var(--sub);
    font-size:14px;
  }
  button {
    flex:none;
    min-width:180px;
  }
}
.profile-save-panel {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:12px 20px;
  margin-top:20px;
  color:var(--sub);
  p {
    margin:0;
  }
  .primary {
    background:var(--surface);
    border-color:var(--line-strong);
    color:var(--ink);
    box-shadow:none;
    &:hover {
      background:var(--panel);
      border-color:var(--line-hover);
    }
  }
  label {
    display:flex;
    align-items:center;
    gap:10px;
    color:var(--ink);
    cursor:pointer;
    input {
      width:16px;
      height:16px;
      margin:0;
    }
  }
}

/* Vorschau-Spalte */
.preview {
  position:sticky;
  top:20px;
}
.villagerpane {
  padding:16px;
  h2 {
    margin:14px 0 0;
    font-size:18px;
    font-weight:600;
    overflow-wrap:anywhere;
  }
  .import-config {
    position:relative;
    width:100%;
    margin-top:14px;
    cursor:pointer;
  }
}
.preview-switch {
  display:flex;
  margin-bottom:12px;
  border:1px solid var(--line-strong);
  border-radius:var(--radius);
  overflow:hidden;
  button {
    flex:1;
    padding:6px 8px;
    background:var(--surface);
    border:0;
    color:var(--sub);
    font-size:14px;
    & + button {
      border-left:1px solid var(--line-strong);
    }
    &:hover {
      color:var(--ink);
    }
    &.on {
      background:var(--raised);
      color:var(--ink);
      font-weight:600;
    }
  }
}
.preview-block {
  background:linear-gradient(#2d2d2b,#1d1d1c);
  canvas {
    display:block;
    width:100%;
    height:280px;
    object-fit:contain;
  }
}
.preview-3d.compact-viewer {
  width:100%;
  .viewer-layout {
    display:block;
  }
  .viewer-stage {
    min-height:0;
    border:0;
    border-radius:0;
    canvas {
      width:100%;
      height:280px;
    }
  }
  .viewer-instructions {
    font-size:11px;
  }
}
.mini-preview {
  margin:10px 0 0;
  .ministat {
    display:flex;
    justify-content:space-between;
    gap:12px;
    padding:7px 0;
    border-bottom:1px solid var(--line);
    font-size:14px;
    span {
      color:var(--sub);
    }
    b {
      font-weight:500;
      text-align:right;
      overflow-wrap:anywhere;
    }
    &:last-child {
      border-bottom:0;
    }
  }
}

/* Dialoge */
.modalback {
  position:fixed;
  inset:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,.6);
  .modal {
    width:100%;
    max-width:720px;
    max-height:88vh;
    overflow:auto;
    padding:20px;
    background:var(--surface);
    border:1px solid var(--line-strong);
    border-radius:var(--radius-lg);
    box-shadow:0 16px 48px rgba(0,0,0,.5);
    .modalhead {
      display:flex;
      justify-content:space-between;
      align-items:center;
      gap:8px;
      margin-bottom:6px;
      h2 {
        margin:0;
        font-size:18px;
        font-weight:600;
      }
      button {
        width:32px;
        height:32px;
        background:none;
        border:0;
        border-radius:var(--radius);
        color:var(--sub);
        font-size:16px;
        &:hover {
          background:var(--raised);
          color:var(--ink);
        }
      }
    }
    .help {
      margin:0 0 12px;
      color:var(--sub);
      font-size:14px;
    }
    .search {
      margin-bottom:4px;
    }
    .categorytabs {
      padding:8px 0 12px;
    }
    .items {
      max-height:420px;
      grid-template-columns:repeat(auto-fill,minmax(52px,1fr));
      border:2px solid var(--mc-dark);
    }
    pre {
      max-height:420px;
      overflow:auto;
      margin:0;
      padding:14px;
      background:var(--panel);
      border:1px solid var(--line);
      border-radius:var(--radius);
      color:var(--ink);
      font:13px/1.55 var(--mono);
    }
  }
}

/* Item-Tags im Katalog */
.tag-group {
  padding:12px;
  h3 {
    margin:0 0 10px;
color:var(--mc-text);
    font-size:14px;
    font-weight:600;
  }
}
.tag-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:6px;
}
.item.tag-item {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
  width:auto;
  height:auto;
  min-height:60px;
  aspect-ratio:auto;
  padding:10px;
  font-size:13px;
  text-align:left;
  text-shadow:1px 1px #3f3f3f;
  &:disabled {
    opacity:.45;
    cursor:not-allowed;
  }
  small {
    display:block;
    width:100%;
  }
}
.tag-icon {
  position:relative;
  display:inline-flex;
  flex-shrink:0;
  b {
    position:absolute;
    right:0;
    bottom:0;
    padding:0 3px;
    background:var(--mc-dark);
    color:#fff;
    border-radius:2px;
    font-size:13px;
  }
  .texicon {
    margin:0;
  }
}
.catalog-view:has(.tag-group) {
  max-height:420px;
  overflow:auto;
  background:var(--mc-gui);
}

/* Responsive Anpassungen */
@media(max-width:1180px) {
  .workspace {
    grid-template-columns:minmax(0,1fr) 280px;
  }
  .recipebody {
    grid-template-columns:1fr;
  }
  .craft-panel {
    justify-self:start;
    min-width:250px;
  }
}
@media(max-width:900px) {
  .workspace {
    grid-template-columns:1fr;
  }
  .preview {
    position:static;
  }
  .villagerpane {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:0 20px;
    > .preview-switch,> .preview-block,> .preview-3d {
      grid-column:1;
    }
    > h2,> .mini-preview,> .import-config {
      grid-column:2;
    }
    > h2 {
      grid-row:1;
      margin:0;
    }
    > .mini-preview {
      grid-row:2 / span 2;
    }
  }
}
@media(max-width:640px) {
  #generator-page {
    padding:0 16px 40px;
  }
  .heading {
    padding:20px 0 16px;
    h1 {
      font-size:22px;
    }
  }
  .steptabs {
    padding:0 4px;
    button {
      padding:12px 7px;
      font-size:14px;
    }
    .stepnum {
      display:none;
    }
  }
  .editor .content {
    padding:18px 16px;
  }
  .editorfoot {
    padding:10px 16px;
    [data-act="json"] {
      display:none;
    }
  }
  .villagerpane {
    display:block;
  }
  .craft-panel {
    justify-self:stretch;
  }
  .infogrid {
    grid-template-columns:1fr;
    .full {
      grid-column:auto;
    }
  }
  .tradevisual {
    gap:6px;
    padding:12px 8px;
    .tradeitem .slot {
      width:48px;
      height:48px;
    }
  }
  .trade-controls {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .componentcards {
    grid-template-columns:1fr;
    button + button {
      border-left:0;
      border-top:1px solid var(--line-strong);
    }
  }
  .export-bundle,.export-card {
    flex-direction:column;
    align-items:stretch;
  }
  #trade-levels .level-tab small {
    display:none;
  }
}
