/* Avatar-Werkzeug (/tools/avatar/) – ergaenzt /css/style.css */

.av { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.av-karte { padding: 1.3rem 1.4rem; }
.av-karte > :last-child { margin-bottom: 0; }

.av-schritt { display: flex; align-items: center; gap: .6rem; }
.av-nr {
  display: inline-grid; place-items: center;
  width: 1.7rem; height: 1.7rem; flex: none;
  border-radius: 50%;
  font-size: .95rem; font-weight: 800;
  color: #15110a; background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
}
.av-klein { font-size: .9rem; color: var(--text-muted); margin: .6rem 0 0; }
.av-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Meldungen */
.av-meldung {
  margin: .8rem 0 0; padding: .65rem .9rem;
  border-radius: .6rem; border: 1px solid var(--gold-border);
  background: rgba(201, 162, 39, .06); color: var(--text);
}
.av-meldung--fehler { border-color: rgba(224, 53, 53, .5); background: rgba(204, 41, 41, .12); }
.av-meldung--ok { border-color: rgba(90, 200, 120, .5); background: rgba(60, 170, 90, .12); }
.av-meldung--achtung { border-color: rgba(226, 191, 65, .55); background: rgba(201, 162, 39, .12); }

/* Anmelden */
.av-login { display: flex; flex-wrap: wrap; gap: .8rem 1rem; align-items: end; margin-top: .4rem; }
.av-feld { display: grid; gap: .3rem; flex: 1 1 12rem; }
.av-feld span { font-size: .9rem; color: var(--text-muted); }
.av-feld input {
  font: inherit; color: var(--text);
  padding: .65rem .8rem; border-radius: .55rem;
  border: 1px solid rgba(201, 162, 39, .3); background: rgba(0, 0, 0, .35);
  min-height: 2.9rem;
}
.av-feld input:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 1px; border-color: transparent; }
.av-knopf { cursor: pointer; font-family: inherit; min-height: 2.9rem; }
.av-knopf:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none !important; filter: grayscale(.5); }

.av-link {
  font: inherit; color: var(--gold-light); background: none; border: 0; padding: 0;
  cursor: pointer; text-decoration: underline; text-decoration-color: rgba(226, 191, 65, .35);
  text-underline-offset: 2px;
}
.av-link:hover, .av-link:focus-visible { color: var(--red-light); text-decoration-color: currentColor; }
.av-link--rot { color: #ff8a80; }
.av-mini {
  font: inherit; font-size: .9rem; cursor: pointer;
  padding: .35rem .8rem; border-radius: .5rem; min-height: 2.2rem;
  color: var(--text); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .18);
}
.av-mini--rot { background: var(--red); border-color: var(--red-light); color: #fff; }
.av-frage { display: inline-flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.av-frage--gross { display: grid; gap: .7rem; justify-items: start; }
.av-frage--gross p { margin: 0; }
[hidden] { display: none !important; }

/* Konto */
.av-konto { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: flex-start; justify-content: space-between; }
.av-konto__info { flex: 1 1 18rem; min-width: 0; }
.av-aktuell { margin: 0; padding: .7rem; border-radius: .7rem; flex: 0 1 auto; max-width: 100%; background: #05070a !important; }
.av-aktuell__bild { display: block; width: 222px; max-width: 100%; height: auto; image-rendering: pixelated; }
.av-aktuell figcaption { display: grid; gap: .35rem; margin-top: .5rem; font-size: .85rem; color: var(--text-muted); }

/* Werkstatt */
.av-werkstatt { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
.av-spalte, #avBearbeiten { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; align-content: start; }
@media (min-width: 1000px) {
  .av-werkstatt { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .av-spalte--vorschau { position: sticky; top: 5.5rem; }
}

.av-ablage {
  position: relative; display: grid; justify-items: center; gap: .3rem;
  padding: 1.6rem 1rem; border-radius: .8rem; cursor: pointer; text-align: center;
  border: 2px dashed rgba(201, 162, 39, .4); background: rgba(201, 162, 39, .04);
  transition: background .15s, border-color .15s;
}
.av-ablage:hover, .av-ablage.ist-drueber, .av-ablage:focus-within {
  border-color: var(--gold-light); background: rgba(201, 162, 39, .1);
}
.av-ablage input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.av-ablage svg { width: 2.6rem; height: 2.6rem; fill: none; stroke: var(--gold-light); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.av-ablage__haupt { font-weight: 700; font-size: 1.1rem; color: var(--gold-light); }
.av-ablage__neben { font-size: .88rem; color: var(--text-muted); }
.av-ablage__datei { font-size: .85rem; color: var(--text); overflow-wrap: anywhere; }
.av-ablage__datei:empty { display: none; }

.av-formate { display: flex; flex-wrap: wrap; gap: .5rem; border: 0; padding: 0; margin: 0 0 .9rem; }
.av-formate label { flex: 1 1 7rem; }
.av-formate input { position: absolute; opacity: 0; pointer-events: none; }
.av-formate span {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.8rem; padding: .4rem .7rem; border-radius: .6rem; cursor: pointer;
  border: 1px solid rgba(201, 162, 39, .25); background: rgba(0, 0, 0, .25);
  font-size: .95rem; color: var(--text-muted);
}
.av-formate input:checked + span { border-color: var(--gold-light); color: var(--text); background: rgba(201, 162, 39, .14); }
.av-formate input:focus-visible + span { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.av-form { display: inline-block; border: 2px solid currentColor; border-radius: 2px; }
.av-form--quadrat { width: 14px; height: 14px; }
.av-form--breit { width: 18px; height: 12px; }

.av-zuschnitt { display: flex; justify-content: center; border-radius: .6rem; overflow: hidden; background: rgba(0, 0, 0, .35); }
#avZuschnitt { display: block; max-width: 100%; touch-action: none; cursor: grab; }
#avZuschnitt.ist-gezogen { cursor: grabbing; }
#avZuschnitt:focus-visible { outline: 2px solid var(--gold-light); outline-offset: -2px; }

.av-regler { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 3.4rem; gap: .7rem; align-items: center; margin: .7rem 0; }
.av-regler span { font-size: .95rem; color: var(--text-muted); }
.av-regler output { font-variant-numeric: tabular-nums; text-align: right; font-size: .9rem; color: var(--text); }
.av-regler input[type=range] { width: 100%; accent-color: var(--gold); min-height: 2rem; }
.av-zuschnitt + .av-regler { grid-template-columns: 6.5rem minmax(0, 1fr); }
.av-schalter { display: flex; align-items: center; gap: .55rem; margin: 1rem 0 .4rem; cursor: pointer; }
.av-schalter input { width: 1.2rem; height: 1.2rem; accent-color: var(--gold); }

/* Vorschau */
.av-tabs { display: flex; gap: .4rem; margin-bottom: .7rem; }
.av-tab {
  font: inherit; font-family: "Courier New", Courier, monospace; font-size: .95rem; cursor: pointer;
  padding: .4rem .9rem; border-radius: .5rem; min-height: 2.4rem;
  color: var(--text-muted); background: rgba(0, 0, 0, .3); border: 1px solid rgba(201, 162, 39, .2);
}
.av-tab.ist-aktiv { color: var(--text); border-color: var(--gold-light); background: rgba(201, 162, 39, .14); }
.av-terminal { border-radius: .6rem; overflow: hidden; background: #05070a; border: 1px solid rgba(255, 255, 255, .08); }
#avVorschau { display: block; width: 100%; height: auto; }
.av-terminal__leer { margin: 0; padding: 3rem 1.5rem; text-align: center; color: var(--text-muted); font-family: "Courier New", Courier, monospace; }
.av-speichern { margin-top: 1.1rem; display: grid; gap: .5rem; justify-items: start; }

/* Wissen */
.av-wissen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.1rem; margin-top: .4rem; }
@media (min-width: 900px) { .av-wissen { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.av-liste { margin: .2rem 0 0; padding-left: 1.1rem; display: grid; gap: .45rem; }
.av-wissen p { margin: .2rem 0 0; }

@media (max-width: 520px) {
  .av-karte { padding: 1.1rem 1rem; }
  .av-regler { grid-template-columns: 5.4rem minmax(0, 1fr) 3rem; gap: .5rem; }
  .av-login .av-knopf { width: 100%; }
  .av-formate { gap: .35rem; }
  .av-formate label { flex: 1 1 0; min-width: 0; }
  .av-formate span { flex-direction: column; gap: .25rem; padding: .45rem .2rem; font-size: .82rem; }
}

/* Bildrechte: Hinweis im Kopf, Kasten bei Schritt 2, Pflicht-Haekchen */
.av-kopfhinweis {
  display: flex; gap: .55rem; align-items: flex-start; max-width: 46rem;
  margin: .9rem 0 0; padding: .65rem .9rem; border-radius: .6rem;
  font-size: .95rem; line-height: 1.5; color: var(--text);
  border: 1px solid rgba(240, 179, 90, .5); background: rgba(240, 179, 90, .1);
}
.av-kopfhinweis span { color: #f0b35a; font-size: 1.1rem; line-height: 1.3; }
.av-rechte {
  margin: .2rem 0 1rem; padding: 1rem 1.1rem; border-radius: .8rem;
  border: 1px solid rgba(240, 179, 90, .55); background: rgba(240, 179, 90, .07);
}
.av-rechte h3 { display: flex; align-items: center; gap: .55rem; margin: 0 0 .45rem; font-size: 1.08rem; color: #f6d9a6; }
.av-rechte__zeichen {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; flex: none; border-radius: 50%;
  font-size: 1rem; font-weight: 800; color: #15110a; background: #f0b35a;
}
.av-rechte > p { margin: 0 0 .7rem; font-size: .93rem; color: var(--text-muted); }
.av-rechte__spalten { display: grid; grid-template-columns: minmax(0, 1fr); gap: .7rem; }
/* zweispaltig nur, wenn der Kasten selbst breit genug ist (auf dem Desktop
   steht er in der schmaleren linken Spalte) */
.av-rechte { container-type: inline-size; }
@container (min-width: 600px) { .av-rechte__spalten { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.av-rechte__ja, .av-rechte__nein { padding: .7rem .85rem; border-radius: .6rem; background: rgba(0, 0, 0, .25); }
.av-rechte__ja { border: 1px solid rgba(90, 200, 120, .4); }
.av-rechte__nein { border: 1px solid rgba(224, 53, 53, .45); }
.av-rechte h4 { margin: 0 0 .35rem; font-size: .8rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.av-rechte__ja h4 { color: #6fd690; }
.av-rechte__nein h4 { color: #ff8a80; }
.av-rechte ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .35rem; }
.av-rechte li { position: relative; padding-left: 1.35rem; font-size: .9rem; line-height: 1.45; }
.av-rechte__ja li::before { content: '✓'; position: absolute; left: 0; color: #6fd690; font-weight: 800; }
.av-rechte__nein li::before { content: '✕'; position: absolute; left: 0; color: #ff8a80; font-weight: 800; }
.av-bestaetigen {
  display: flex; gap: .7rem; align-items: flex-start; margin-top: .9rem; padding: .8rem .9rem;
  border-radius: .6rem; cursor: pointer; font-size: .93rem; line-height: 1.5; color: var(--text);
  border: 2px solid rgba(240, 179, 90, .6); background: rgba(0, 0, 0, .3);
  transition: border-color .15s, background .15s;
}
.av-bestaetigen__zusatz { display: block; margin-top: .45rem; padding-top: .45rem; border-top: 1px solid rgba(240, 179, 90, .25); }
.av-bestaetigen input { flex: none; width: 1.3rem; height: 1.3rem; margin: .1rem 0 0; accent-color: #5ac878; cursor: pointer; }
.av-bestaetigen:has(input:checked) { border-color: rgba(90, 200, 120, .65); background: rgba(60, 170, 90, .1); }
.av-bestaetigen:has(input:focus-visible) { outline: 2px solid var(--gold-light); outline-offset: 2px; }
.av-ablage.ist-gesperrt { cursor: not-allowed; opacity: .5; filter: grayscale(.6); border-style: dotted; }
/* gesperrtes Dateifeld wuerde den Klick schlucken: zur Ablage durchreichen */
.av-ablage.ist-gesperrt input { pointer-events: none; }
.av-ablage.ist-gesperrt:hover { background: rgba(201, 162, 39, .04); }

