* {
    box-sizing: border-box;
  }
  



  @font-face {
    font-family: "addressans";
    src: url("fonts/addressans.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
  }
  

  @font-face {
    font-family: "MeineSchrift";
    src: url("signs4/fonts/Krungthep.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
  }

    
  #infoText {
    font-family: 'addressans', sans-serif;
    line-height: 1.6; /* Zeilenhöhe für bessere Lesbarkeit */
    color: white; /* Textfarbe */
    margin: 20px; /* Abstand um den Text */
  }

  body {
    margin: 0;
    background: #39ff14;
    height: 100vh;
    overflow: hidden;
    font-family: "MeineSchrift", sans-serif;
  }
  
  #app {
    width: 100vw;
    height: 100vh;
    position: relative;
  
    display: flex;
    justify-content: center;
    align-items: center;
  
    gap: 48px;
  
    padding: 70px 64px 95px;
  }

  
  /* Linkes Archivfeld */
 /* Linkes Archivfeld */
 #archivePanel {
  width: 34vw;
  height: 76vh;

  flex-shrink: 0;
  position: relative;

  border: 2px solid black;
  background: white;

  display: grid;
  grid-template-rows: auto 1fr auto auto;
  align-items: center;

  overflow: visible;
}
  
  /* Pfeil nach oben */

  .segmentButton {
    position: absolute;
    top: -20px; /* Position über dem Segment */
    right: 40px; /* Abstand zu den anderen Buttons */
    width: 24px;
    height: 24px;

    display: flex;
    justify-content: center;
    align-items: center;

    background-color: #ff69b4; /* Pink */
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
  }

  .segmentButton:hover {
    background-color: #ff1493; /* Dunkleres Pink beim Hover */
  }

  
  /* Mittelbereich: links/rechts Pfeile + Zeichen */

  
  /* Pfeil nach unten */
  
  #signDisplay {
    width: 80%;
    height: 80%;
  
    min-height: 0;
    overflow: hidden;
  
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  #signImage {
    max-width: 80%;
    max-height: 80%;
  
    width: auto;
    height: auto;
  
    object-fit: contain;
    display: block;
  }
  
  .arrowButton {
    position: static;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid black;
    background: #39ff14;
    color: black;
    font-size: 22px;
    cursor: pointer;
  }
  
  .arrowButton:hover {
    background: black;
    color: white;
  }
  
  #signInfo {
    width: 100%;
    padding: 14px 18px;
  
    display: flex;
    justify-content: center;
    align-items: center;
  }
  
  #alphabetTitle {
    margin: 0 0 4px 0;
    font-weight: bold;
  }
  
  
  #signDescription {
    margin: 0;
  }
  
  /* Rechtes Zeichenraster */
  #drawPanel {
    --cell-size: min(3vw, 3.7vh);
  
    width: 54vw;
    height: 76vh;
  
    flex-shrink: 0;
  
    border: 2px solid black;
    background: white;
  
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  
    gap: 14px;
    padding: 12px;
    overflow: visible;
  }
  


  #letterDisplay {
    width: 110px;
    height: 70px;
    border: 2px solid black;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 48px;
    font-weight: bold;
    background: #ff1fd0;
  }
  
  #shapePalette {
    width: 100%;
    max-width: 100%;
  
    min-height: 100px;
  
    display: flex;
    justify-content: center;
    align-items: center;
  
    gap: 16px;
    padding: 14px 10px;
  
    background: transparent;
  
    overflow-x: auto;
    overflow-y: hidden;
  }
  
  .shapeOption {
    width: 80px;
    height: 80px;
    object-fit: contain;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 4px;
  }
  
  .shapeOption:hover {
    border: 1px solid black;
  }
  
  #drawingArea {
    position: relative;
  
    width: 100%;
    max-width: 100%;
  
    flex: 1;
    min-height: 0;
  
    background: white;
  
    overflow: hidden;
  }
  
  .cell.active {
    background: black;
  }
  
  #freeDrawCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    display: none;
    cursor: crosshair;
    z-index: 3;
  }
  
  #modeButton {
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
  }
  
  
  /* Buttons unten */
  button {
    position: fixed;
    padding: 14px 22px;
    border: 2px solid black;
    border-radius: 999px;
    background: #ff1fd0;
    color: black;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  
  button:hover {
    background: black;
    color: white;
  }
  
  #resetButton {
    left: 32px;
    bottom: 28px;
    font-family: "MeineSchrift", sans-serif;
  }
  
  #lockButton {
    position: fixed;
    bottom: 28px;
    font-family: "MeineSchrift", sans-serif;
  
    left: calc(50% + 18vw);
    transform: translateX(-50%);
  }

  #placedShapesLayer {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: visible;
  }
  
  .placedShape {
    position: absolute;
  
    transform-origin: center;
    cursor: grab;
  }

  .placedShape:active {
    cursor: grabbing;
  }
  
  .placedShape > img {
    width: 100%;
    height: 100%;
  
    display: block;
  
    object-fit: contain;
  
    transform: scaleX(1);
    transform-origin: center;
  
    transition: transform 0.16s ease;
  
    pointer-events: none;
  }

  .placedShape.is-flipped > img {
    transform: scaleX(-1);
  }

  .placedShape.is-selected {
    outline: none !important;
    border: none !important;
    filter: drop-shadow(0 0 6px #ff1fd0);
  }

  .deleteShapeButton {
    position: absolute;
    top: -13px;
    right: -13px;
    width: 22px;
    height: 22px;
    border: 2px solid black;
    background: #ff1fd0;
    color: black;
    font-size: 14px;
    line-height: 16px;
    padding: 0;
    cursor: pointer;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    text-transform: none;
    letter-spacing: 0;
  }
  
  .deleteShapeButton:hover {
    background: black;
    color: white;
  }
  
  .rotateHandle {
    position: absolute;
    top: -13px;
    left: -13px;
    width: 22px;
    height: 22px;
    border: 2px solid black;
    background: white;
    color: black;
    font-size: 14px;
    line-height: 16px;
    padding: 0;
    cursor: grab;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    text-transform: none;
    letter-spacing: 0;
  }
  
  .rotateHandle:hover {
    background: black;
    color: white;
  }
  s
  .placedShape {
    position: absolute;
    transform-origin: center center;
    overflow: visible;
  }

  #archiveButton {
    position: fixed;
    top: 28px;
    right: 32px;
  
    padding: 14px 22px;
    border: 2px solid black;
  
    background: #ff1fd0;
    color: black;
  
    font-size: 16px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  
    z-index: 100;
  }
  
  #archiveButton:hover {
    background: black;
    color: white;
  }
  
  /* Diese Bedienelemente werden beim Speichern ausgeblendet */
  #drawingArea.exporting .deleteShapeButton,
  #drawingArea.exporting .rotateHandle,
  #drawingArea.exporting .resizeHandle {
    display: none;
  }
  
  #drawingArea.exporting .placedShape {
    outline: none;
  }

  #drawingArea.exporting {
    border: none !important;
  }
  
  #drawingArea.exporting #grid {
    border: none !important;
  }
  
  #drawingArea.exporting .cell {
    border: none !important;
  }
  
  #drawingArea.exporting .deleteShapeButton,
  #drawingArea.exporting .rotateHandle,
  #drawingArea.exporting .resizeHandle {
    display: none !important;
  }
  
  #drawingArea.exporting .placedShape {
    outline: none !important;
  }

/* Info-Assistent unten rechts */


.infoAssistant.is-open .infoPanel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: translate(-50%, -50%) scale(1) !important;
}

.infoParagraph {
  font-family: Futura Light, sans-serif;
}

.infoCircle {
  position: absolute;
  right: 0;
  bottom: 0;

  width: 72px;
  height: 72px;
  padding: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  border: 2px solid black;

  background: white;
  color: black;

  font-size: 32px;
  font-family: "MeineSchrift", sans-serif;
  line-height: 1;

  cursor: pointer;
  z-index: 1002;

  text-transform: none;
  letter-spacing: 0;
}

.startInfoButton {
  font-family: "Krungthep", sans-serif;
  position: static;

  width: 100%;
  margin-top: 8px;
  padding: 12px 18px;

  border: 2px solid black;
  background: #ff1fd0;
  color: #ff1fd0(0, 0, 0);

  cursor: pointer;
}

#modeButton {
  display: none;
}

/* Titelzeile mit Info-Button */

#alphabetTitleRow {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

#alphabetTitle {
  margin: 0;
  font-weight: bold;
}

/* Runder Info-Button */

#alphabetInfoButton {
  position: static;
  flex: 0 0 auto;

  padding: 10px 18px;

  border: 2px solid black;
  border-radius: 0;

  background: #ff1fd0;
  color: black;

  font-size: 14px;
  font-family: "MeineSchrift", sans-serif;
  font-style: normal;
  font-weight: normal;

  text-transform: uppercase;
  letter-spacing: 0.04em;

  cursor: pointer;
}

#alphabetInfoButton:hover,
#alphabetInfoButton.is-active {
  background: black;
  color: white;
}

#alphabetInfoButton:hover,
#alphabetInfoButton.is-active {
  background: black;
  color: white;
}

/* Informationsfeld */

/* Infofläche füllt das linke Panel */

#alphabetInfoPanel {
  position: absolute;

  top: 0;
  left: 0;
  right: 0;
  bottom: 74px;

  width: auto;
  max-height: none;

  padding: 25px 40px 50px;

  background: #ff1fd0;
  color: black;

  border: none;
  border-bottom: 2px solid black;
  box-shadow: none;

  z-index: 300;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: none;

  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

#alphabetInfoPanel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: none;
}

#alphabetInfoTextContainer {
  width: 100%;
  height: 100%;
  max-height: none;

  overflow-y: auto;
  scroll-behavior: smooth;
}

#alphabetInfoText {
  margin: 0;

  font-size: clamp(15px, 1.15vw, 20px);
  line-height: 1.08;
  font-weight: bold;

  color: black;
}

/* Weiterlesen-Button */

#alphabetReadMoreButton {
  position: static;

  width: 100%;
  margin-top: 3px;
  padding: 10px 12px;

  border: none;
  border-top: 1px solid black;

  background: white;
  color: black;

  font-size: 13px;
  font-family: "Krungthep";
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#alphabetReadMoreButton:hover {
  background: black;
  color: white;
}

#alphabetReadMoreButton.is-hidden {
  display: none;
}

#alphabetNavigation,
#signNavigation {
  width: 100%;
  padding: 14px 18px;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;

  background: white;
}

#alphabetNavigation {
  border-bottom: none;
}

.navigationLabel {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.navigationRow {
  width: 100%;

  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  justify-items: center;
  gap: 10px;
}

.navigationButton {
  position: static;

  width: 44px;
  height: 44px;
  padding: 0;
  font-weight: bold;

  border: 2px solid black;
  border-radius: 50%;
  background: #ff1fd0;
  color: black;

  font-size: 22px;
  cursor: pointer;
}

.navigationButton:hover {
  background: black;
  color: white;
}

#alphabetTitle {
  max-width: 100%;

  font-size: 16px;
  font-weight: bold;
  text-align: center;

  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navigationCounter,
#signCounter {
  font-size: 15px;
  letter-spacing: 0.08em;
}

#signDisplay {
  width: 100%;
  height: 100%;
  min-height: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;
}

#signImage {
  max-width: 78%;
  max-height: 78%;

  width: auto;
  height: auto;

  object-fit: contain;
  display: block;
}

#signInfo {
  width: 100%;
  padding: 14px 18px;
}

button,
#archiveButton {
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.35);
transform-origin: center;
}


#signImage {
  transition:
    transform 0.22s ease,
    filter 0.22s ease;
  transform-origin: center;
}

.logo {
  position: fixed;
  top: 50%;
  left: 50%;

  transform: translate(-50%, -50%);

  z-index: 999999;
  pointer-events: none;
}

.logo h1 {
  display: none;
}

.logo img {
  height: 50vmin;
  max-width: 80vw;

  transform: scale(0);

  will-change:
    transform,
    filter,
    opacity;

  filter:
    drop-shadow(-1px -1px 0 #000000);

  animation:
    logo-in 0.25s 0.05s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
    logo-out 0.5s 1.8s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;
}

@keyframes logo-in {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes logo-out {
  from {
    transform: scale(1);
    opacity: 1;
  }

  to {
    transform: scale(0);
    opacity: 0;
  }
}

/* Hauptinhalt ist beim Laden zunächst unsichtbar */

.appContent {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.98);

  transition:
    opacity 0.7s ease,
    transform 0.7s ease,
    visibility 0.7s ease;
}

/* Wird während der ausblendenden Intro-Animation sichtbar */

.appContent.is-visible {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

button,
#archiveButton,
#alphabetInfoButton,
.startInfoButton,
.infoCircle {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

button:hover,
#archiveButton:hover,
#alphabetInfoButton:hover,
.startInfoButton:hover,
.infoCircle:hover {
  transform: scale(1.06);
}

#lockButton {
  transform: translateX(-50%);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

#lockButton:hover {
  transform: translateX(-50%) scale(1.06);
}

#shapeControlPanel {
  position: absolute;

  right: 18px;
  bottom: 18px;

  width: 230px;
  padding: 30px 18px 18px;

  display: flex;
  flex-direction: column;
  gap: 12px;

  background: white;
  color: black;

  border: 2px solid black;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(8px);

  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;

  z-index: 100;
}

#shapeControlPanel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

#shapeControlPanel label {
  font-size: 13px;
  text-transform: uppercase;
}

#shapeControlPanel input[type="range"] {
  width: 100%;
  accent-color: black;
}

#flipShapeButton {
  position: static !important;

  width: 100% !important;
  padding: 10px 14px !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;

  transform: none !important;
}

#flipShapeButton:hover {
  background: black !important;
  color: white !important;
  transform: none !important;
}

#closeShapeControlPanelButton {
  position: absolute !important;

  top: -15px !important;
  right: -15px !important;

  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;

  padding: 0 !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  background: white !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 0 !important;

  font-size: 23px !important;
  line-height: 1 !important;

  box-shadow: none !important;
  transform: none !important;

  cursor: pointer;
}

#closeShapeControlPanelButton:hover {
  background: black !important;
  color: white !important;
  transform: none !important;
}

#flipShapeButton {
  position: static;
  width: 100%;
  padding: 10px 14px;
}

.placedShape {
  cursor: pointer;
}

.placedShape.is-selected {
  outline: 2px solid black;
}

/* 3D-Stil nur für Pfeile und Fragezeichen */

.arrowButton,
.infoCircle,
#infoCircle {
  position: relative !important;

  width: 70px !important;
  height: 70px !important;
  padding: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 4px solid black !important;
  border-radius: 0 !important;

  font-size: 32px !important;
  font-weight: bold !important;
  line-height: 1 !important;

  box-shadow:
    -7px 7px 0 #1a1a1a,
    -12px 12px 0 black !important;

  transform:
    perspective(500px)
    rotateX(0deg)
    rotateY(0deg);

  transform-origin: center;
  transform-style: preserve-3d;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease !important;

  cursor: pointer;
}

/* Drehung beim Hover */

.arrowButton:hover,
.infoCircle:hover,
#infoCircle:hover {
  background: #ff1fd0 !important;

  transform:
    perspective(500px)
    rotateX(9deg)
    rotateY(-14deg)
    translateY(-3px)
    scale(1.04) !important;

  box-shadow:
    -10px 10px 0 #1a1a1a,
    -16px 16px 0 black !important;
}

/* Gedrückter Zustand */

.arrowButton:active,
.infoCircle:active,
#infoCircle:active {
  transform:
    perspective(500px)
    rotateX(4deg)
    rotateY(-7deg)
    translate(-5px, 5px)
    scale(0.98) !important;

  box-shadow:
    -3px 3px 0 #1a1a1a,
    -6px 6px 0 black !important;
}

#prevSign,
#nextSign,
#prevAlphabet,
#nextAlphabet,
.infoCircle,
#infoCircle {
  position: relative !important;

  width: 70px !important;
  height: 70px !important;
  padding: 0 !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 4px solid black !important;
  border-radius: 0 !important;

  font-size: 32px !important;
  font-weight: bold !important;
  line-height: 1 !important;

  box-shadow:
    -7px 7px 0 #1a1a1a,
    -12px 12px 0 black !important;

  transform: perspective(500px) rotateX(0deg) rotateY(0deg);

  transform-origin: center;
  transform-style: preserve-3d;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease !important;

  cursor: pointer;
}

#prevSign:hover,
#nextSign:hover,
#prevAlphabet:hover,
#nextAlphabet:hover,
.infoCircle:hover,
#infoCircle:hover {
  background: #ff1fd0 !important;

  transform:
    perspective(500px)
    rotateX(9deg)
    rotateY(-14deg)
    translateY(-3px)
    scale(1.04) !important;

  box-shadow:
    -10px 10px 0 #1a1a1a,
    -16px 16px 0 black !important;
}

#prevSign:active,
#nextSign:active,
#prevAlphabet:active,
#nextAlphabet:active,
.infoCircle:active,
#infoCircle:active {
  transform:
    perspective(500px)
    rotateX(4deg)
    rotateY(-7deg)
    translate(-4px, 4px)
    scale(0.98) !important;

  box-shadow:
    -3px 3px 0 #1a1a1a,
    -6px 6px 0 black !important;
}

#prevSign,
#nextSign,
#prevAlphabet,
#nextAlphabet {
  width: 52px !important;
  height: 52px !important;
  font-size: 24px !important;

  box-shadow:
    -5px 5px 0 #1a1a1a,
    -8px 8px 0 black !important;
}

#closeInfoAssistantButton {
  position: absolute !important;

  top: -17px !important;
  right: -17px !important;

  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;

  padding: 0 !important;
  margin: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 50 !important;

  font-size: 24px !important;
  font-weight: 400 !important;
  line-height: 1 !important;

  box-shadow: none !important;
  transform: none !important;

  cursor: pointer;
  z-index: 1000;
}

.infoPanel {
  position: relative;
  overflow: visible;
}

#infoAssistant {
  position: fixed !important;
  right: 28px !important;
  bottom: 28px !important;
  z-index: 500;
}

.infoCircle {
  position: absolute !important;
  right: 0 !important;
  bottom: 0 !important;
}

/* ==================================================
   BESTÄTIGUNGSFENSTER NACH DEM SPEICHERN
   ================================================== */

   #saveConfirmation {
    position: fixed;
    inset: 0;
  
    display: none;
    align-items: center;
    justify-content: center;
  
    background: transparent;
  
    z-index: 99999;
  }
  
  #saveConfirmation.is-open {
    display: flex;
  }
  
  
  /* Weiße Karte */
  
  #saveConfirmationCard {
    position: relative;
  
    width: min(620px, calc(100vw - 80px));
    height: min(520px, calc(100vh - 100px));
  
    box-sizing: border-box;
  
    padding:
      clamp(45px, 6vh, 70px)
      clamp(40px, 5vw, 70px)
      28px;
  
    display: flex;
    flex-direction: column;
    align-items: center;
  
    background: white;
  
    border: 2px solid black;
    border-radius: 0;
  
    box-shadow: 10px 10px 0 black;
  
    transform-style: preserve-3d;
    overflow: visible;
  }
  
  
  /* Gespeichertes Zeichen */
  
  #savedLetterPreview {
    width: min(310px, 65%);
    height: min(300px, 55%);
  
    display: block;
  
    object-fit: contain;
    object-position: center;
  
    background: transparent;
  
    margin-bottom: 20px;
  }
  
  
  /* Distribution-Nummer und Datum */
  
  #distributionInformation {
    width: 100%;
  
    margin-top: auto;
    margin-bottom: 34px;
  
    color: black;
  
    font-family: monospace;
    font-size: clamp(17px, 1.5vw, 23px);
    font-weight: 700;
    line-height: 1.15;
  
    text-align: center;
  
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  #distributionNumber,
  #distributionDateTime {
    white-space: nowrap;
  }
  
  
  /* Kleiner Text unten */
  
  #distributionFooter {
    width: 100%;
  
    margin-top: 0;
  
    font-family: monospace;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.25;
  
    letter-spacing: 0.02em;
    text-align: center;
  
    color: black;
  
    display: block;
  }
  
  
  /* X-Button halb außerhalb der Karte */
  
  #closeSaveConfirmationButton {
    position: absolute !important;
  
    top: -19px !important;
    right: -19px !important;
  
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
  
    padding: 0 !important;
    margin: 0 !important;
  
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  
    background: white !important;
    color: black !important;
  
    border: 3px solid black !important;
    border-radius: 0 !important;
  
    font-size: 31px !important;
    font-family: Arial, sans-serif !important;
    font-weight: 400 !important;
    line-height: 1 !important;
  
    box-shadow: none !important;
    transform: none !important;
  
    cursor: pointer;
    z-index: 10;
  }
  
  #closeSaveConfirmationButton:hover {
    background: black !important;
    color: white !important;
  
    transform: none !important;
    box-shadow: none !important;
  }
  
  #closeSaveConfirmationButton:active {
    transform: none !important;
  }
  
  
  /* Kleinere Bildschirme */
  
  @media (max-width: 700px) {
    #saveConfirmationCard {
      width: calc(100vw - 50px);
      height: min(500px, calc(100vh - 80px));
  
      padding:
        50px
        25px
        24px;
    }
  
    #savedLetterPreview {
      width: 75%;
      height: 240px;
    }
  
    #distributionInformation {
      width: 80%;
      font-size: 17px;
    }
  }

  #shapeControlPanel {
    transition:
      opacity 0.18s ease,
      transform 0.18s ease;
  }
  
  #shapeControlPanel:not(.is-open) {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
  }
  
  #shapeControlPanel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  
  #shapeControlPanel input[type="range"] {
    width: 100%;
    margin: 4px 0 10px;
  
    cursor: ew-resize;
    accent-color: black;
  }
  
  .placedShape {
    position: absolute;
  
    transform-origin: center;
    cursor: grab;
  }

  .placedShape:active {
    cursor: grabbing;
  }
  
  .placedShape > img {
    width: 100%;
    height: 100%;
  
    display: block;
  
    object-fit: contain;
  
    transform: scaleX(1);
    transform-origin: center;
  
    transition: transform 0.16s ease;
  
    pointer-events: none;
  }

  .placedShape.is-flipped > img {
    transform: scaleX(-1);
  }


  #closeShapeControlPanelButton {
    position: absolute !important;
  
    top: -15px !important;
    right: -15px !important;
  
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  
    padding: 0 !important;
    margin: 0 !important;
  
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  
    background: white !important;
    color: black !important;
  
    border: 2px solid black !important;
    border-radius: 0 !important;
  
    font-size: 23px !important;
    line-height: 1 !important;
  
    box-shadow: none !important;
    transform: none !important;
  
    cursor: pointer;
  }
  
  #closeShapeControlPanelButton:hover {
    background: black !important;
    color: white !important;
  
    transform: none !important;
  }

  #grid {
    position: absolute;
    inset: 0;
  
    display: grid;
    grid-template-columns: repeat(26, 1fr);
    grid-template-rows: repeat(18, 1fr);
  
    width: 100%;
    height: 100%;
  
    z-index: 2;
  }
  
  .cell {
    border-right: 1px solid black;
    border-bottom: 1px solid black;
    background: transparent;
  }

/* ===== Neues Shape-System ohne Grid ===== */

#drawingArea {
  position: relative;
  width: calc(26 * var(--cell-size));
  height: calc(18 * var(--cell-size));
  background: white;
  overflow: visible;
}

#grid,
#freeDrawCanvas {
  display: none !important;
}

#placedShapesLayer {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: auto;
  overflow: visible;
}

.placedShape {
  position: absolute;
  width: 80px;
  height: 80px;

  transform-origin: center;
  cursor: grab;

  pointer-events: auto;
  outline: 2px solid black;
}

.placedShape:active {
  cursor: grabbing;
}

.placedShape > img {
  width: 100%;
  height: 100%;

  display: block;
  object-fit: contain;

  transform: scaleX(1);
  transform-origin: center;

  pointer-events: none;
}

.placedShape.is-flipped > img {
  transform: scaleX(-1);
}

/* Löschen */

.deleteShapeButton {
  position: absolute !important;
  top: -13px !important;
  right: -13px !important;

  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;

  padding: 0 !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  background: white !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 0 !important;

  font-size: 18px !important;
  line-height: 1 !important;

  box-shadow: none !important;
  transform: none !important;

  cursor: pointer;
  z-index: 30;
}

.deleteShapeButton:hover {
  background: black !important;
  color: white !important;
  transform: none !important;
}

/* Drehen */

.rotateHandle {
  position: absolute !important;
  top: -13px !important;
  left: -13px !important;

  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  min-height: 26px !important;

  padding: 0 !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  background: white !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 50% !important;

  font-size: 16px !important;
  line-height: 1 !important;

  box-shadow: none !important;
  transform: none !important;

  cursor: grab;
  z-index: 30;
}

.rotateHandle:hover {
  background: black !important;
  color: white !important;
  transform: none !important;
}

/* ===== Pinker Cursor: Punkt normal, Pfeil bei klickbaren Elementen ===== */

/* Normalzustand: pinker Punkt */

html,
body,
* {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='5' fill='%23ff1fd0' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 12 12, auto !important;
}


/* Bei klickbaren Elementen: pinker Pfeil */

button,
a,
.shapeOption,
.placedShape,
.deleteShapeButton,
.rotateHandle,
.infoCircle,
.startInfoButton,
#alphabetInfoButton,
#archiveButton,
#lockButton,
#resetButton,
#flipShapeButton,
#closeShapeControlPanelButton,
#closeAlphabetInfoButton,
#closeInfoAssistantButton,
#closeSaveConfirmationButton {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M4 3 L4 23 L10 17 L14 26 L18 24 L14 15 L23 15 Z' fill='%23ff1fd0' stroke='black' stroke-width='2'/%3E%3C/svg%3E") 4 3, auto !important;
}

/* ===== Schwarzer Offset-Schatten für alle Buttons ===== */

button,
#archiveButton,
.startInfoButton,
.infoCircle,
#alphabetInfoButton,
#lockButton,
#resetButton,
#modeButton,
#flipShapeButton,
#closeShapeControlPanelButton,
#closeAlphabetInfoButton,
#closeInfoAssistantButton,
#closeSaveConfirmationButton,
.deleteShapeButton,
.rotateHandle {
  box-shadow:
    -5px 5px 0 black !important;
}

button:hover,
#archiveButton:hover,
.startInfoButton:hover,
.infoCircle:hover,
#alphabetInfoButton:hover,
#lockButton:hover,
#resetButton:hover,
#modeButton:hover,
#flipShapeButton:hover,
#closeShapeControlPanelButton:hover,
#closeAlphabetInfoButton:hover,
#closeInfoAssistantButton:hover,
#closeSaveConfirmationButton:hover,
.deleteShapeButton:hover,
.rotateHandle:hover {
  box-shadow:
    -8px 8px 0 black !important;
}

body.save-confirmation-open #app,
body.save-confirmation-open #infoAssistant {
  opacity: 0.55 !important;
  filter: grayscale(0.1);
  pointer-events: none;
}

#saveConfirmationCard {
  opacity: 1 !important;
  filter: none !important;
}

/* ===== Blockschatten für weiße Flächen ===== */

#archivePanel,
#drawPanel,
#saveConfirmationCard,
.infoPanel,
#alphabetInfoPanel {
  box-shadow: 10px 10px 0 black !important;
}

/* ===== Sammelkarten-Animation nach dem Einloggen ===== */

#saveConfirmation.is-open #saveConfirmationCard {
  animation:
    cardFlipIn 1.35s cubic-bezier(0.16, 0.84, 0.24, 1) both,
    cardFinalFlash 0.8s ease-out 1.45s both;
}

@keyframes cardFlipIn {
  0% {
    opacity: 0;
    transform:
      perspective(1000px)
      rotateY(-95deg)
      rotateX(12deg)
      scale(0.78)
      translateY(18px);
  }

  45% {
    opacity: 1;
    transform:
      perspective(1000px)
      rotateY(18deg)
      rotateX(-5deg)
      scale(1.035)
      translateY(-4px);
  }

  68% {
    transform:
      perspective(1000px)
      rotateY(-7deg)
      rotateX(2deg)
      scale(1.01)
      translateY(0);
  }

  84% {
    transform:
      perspective(1000px)
      rotateY(3deg)
      rotateX(-1deg)
      scale(1.003)
      translateY(0);
  }

  100% {
    opacity: 1;
    transform:
      perspective(1000px)
      rotateY(0deg)
      rotateX(0deg)
      scale(1)
      translateY(0);
  }
}

@keyframes cardFinalFlash {
  0% {
    filter: brightness(1);
  }

  45% {
    filter: brightness(1.32) contrast(1.06);
  }

  100% {
    filter: brightness(1);
  }
}

#saveConfirmationCard::after {
  content: "";
  position: absolute;

  inset: 0;

  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.15) 45%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.15) 55%,
    transparent 62%,
    transparent 100%
  );

  background-size: 240% 100%;
  background-position: -140% 0;

  pointer-events: none;
  z-index: 20;

  opacity: 0;
}

#saveConfirmation.is-open #saveConfirmationCard::after {
  animation: cardShine 0.85s ease 0.95s both;
}

@keyframes cardShine {
  0% {
    background-position: -140% 0;
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  70% {
    opacity: 1;
  }

  100% {
    background-position: 160% 0;
    opacity: 0;
  }
}

#saveConfirmationCard::before {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      135deg,
      rgba(255, 31, 208, 0.18),
      transparent 28%,
      rgba(57, 255, 20, 0.16) 52%,
      transparent 78%,
      rgba(255, 31, 208, 0.18)
    );

  mix-blend-mode: multiply;
  opacity: 0.28;

  pointer-events: none;
  z-index: 1;
}

#savedLetterPreview,
#distributionInformation,
#distributionFooter,
#closeSaveConfirmationButton {
  position: relative;
  z-index: 5;
}

#closeSaveConfirmationButton {
  position: absolute !important;

  top: -20px !important;
  right: -20px !important;

  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  min-height: 42px !important;

  z-index: 999999 !important;

  background: white !important;
  color: black !important;

  border: 3px solid black !important;
  box-shadow: 5px 5px 0 black !important;

  transform: none !important;
}

/* ===== Linkes Start-Panel ===== */

#welcomePanel {
  position: fixed;
  inset: 0;

  z-index: 9000;

  pointer-events: none;
}

#welcomePanel:not(.is-open) {
  display: none;
}

.welcomeCard {
  position: absolute;

  left: 6.5vw;
  top: 50%;

  width: min(500px, 38vw);
  min-height: 68vh;

  transform: translateY(-50%);

  padding: 70px 42px 34px;

  background: white;
  color: black;

  border: 2px solid black;
  box-shadow: 10px 10px 0 black;

  display: flex;
  flex-direction: column;

  pointer-events: auto;
}

.welcomeCard p {
  margin: 0 0 30px;

  font-size: clamp(18px, 1.7vw, 28px);
  line-height: 1.16;
  font-weight: bold;
}

.welcomeHeadline {
  font-size: clamp(19px, 1.6vw, 26px);
  margin-bottom: 34px;
}

.welcomeHeadline span {
  color: #ff1fd0;
  text-shadow:
    -1px -1px 0 black,
    1px -1px 0 black,
    -1px 1px 0 black,
    1px 1px 0 black;
}

.welcomeHighlight {
  margin-top: auto;
  margin-bottom: 42px;

  color: #ff1fd0;
  letter-spacing: 0.06em;
}

#startWelcomeButton {
  position: static !important;

  width: 70%;
  align-self: center;

  padding: 18px 24px !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;
  box-shadow: 7px 7px 0 black !important;

  font-family: "MeineSchrift", sans-serif;
  font-size: clamp(18px, 1.7vw, 26px);
  font-weight: bold;

  transform: none !important;
}

#startWelcomeButton:hover {
  background: black !important;
  color: #ff1fd0 !important;
  transform: translate(-2px, 2px) !important;
  box-shadow: 4px 4px 0 black !important;
}

#closeWelcomePanelButton {
  position: absolute !important;

  top: -17px !important;
  right: -17px !important;

  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;

  padding: 0 !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  background: white !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 0 !important;

  box-shadow: 5px 5px 0 black !important;

  font-size: 24px !important;
  line-height: 1 !important;

  transform: none !important;

  cursor: pointer;
}

#closeWelcomePanelButton:hover {
  background: black !important;
  color: white !important;
  transform: none !important;
}

/* Interface im Hintergrund leicht transparent wie bei deinem rechten Infofeld */

body.welcome-open #app,
body.welcome-open #infoAssistant {
  opacity: 0.55 !important;
  pointer-events: none;
}

/* Kleine Öffnungsanimation */

#welcomePanel.is-open .welcomeCard {
  animation: welcomeCardIn 0.55s cubic-bezier(0.16, 0.84, 0.24, 1) both;
}

@keyframes welcomeCardIn {
  0% {
    opacity: 0;
    transform: translateY(-50%) translateX(-28px) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
  }
}

/* ===== Fragezeichen-Infofeld über rechtem Panel ===== */

#infoAssistant {
  position: fixed !important;

  right: auto !important;
  bottom: auto !important;

  left: calc(50% + 22vw) !important;
  top: 50% !important;

  transform: translate(-50%, -50%) !important;

  z-index: 5000;
}

.infoPanel {
  position: absolute !important;

  left: 50% !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;

  width: min(520px, 42vw) !important;
  min-height: 360px;

  padding: 42px 46px 38px !important;

  transform: translate(-50%, -50%) scale(0.96) !important;

  background: white;
  color: black;

  border: 2px solid black;
  box-shadow: 10px 10px 0 black;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.infoAssistant.is-open .infoPanel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: translate(-50%, -50%) scale(1) !important;
}

.infoPanel p {
  font-size: clamp(17px, 1.35vw, 24px);
  line-height: 1.2;
  font-weight: bold;
}

.infoCircle {
  position: fixed !important;

  right: 28px !important;
  bottom: 28px !important;

  transform: none !important;
}

/* Wenn Fragezeichenfeld offen ist: rechte Bedienelemente ausblenden */

body.info-open #letterDisplay,
body.info-open #shapePalette {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#letterDisplay,
#shapePalette {
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

body.info-open #placedShapesLayer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#placedShapesLayer {
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

/* Fragezeichenbutton unten rechts, rund, auf Höhe Fertig-Button */

#infoAssistant {
  position: static !important;
  transform: none !important;
  z-index: 5000;
}

.infoCircle {
  position: fixed !important;

  right: 32px !important;
  bottom: 28px !important;

  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  min-height: 64px !important;

  border-radius: 50% !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;
  box-shadow: 7px 7px 0 black !important;

  font-size: 34px !important;
  line-height: 1 !important;

  transform: none !important;

  z-index: 6000;
}

.infoCircle:hover {
  background: #ff1fd0 !important;
  color: black !important;

  transform: scale(1.04) !important;
  box-shadow: 9px 9px 0 black !important;
}

/* Kein Rahmen um eingefügte Segmente */

.placedShape {
  outline: none !important;
  border: none !important;
}

/* Beim Speichern: Hintergrund transparent machen */

#drawingArea.exporting {
  background: transparent !important;
}

#drawingArea.exporting #placedShapesLayer {
  background: transparent !important;
}

#drawingArea.exporting .deleteShapeButton,
#drawingArea.exporting .rotateHandle,
#drawingArea.exporting #shapeControlPanel {
  display: none !important;
}

#drawingArea.exporting .placedShape {
  outline: none !important;
  border: none !important;
  background: transparent !important;
}

/* ===== Linkes Start-Infofeld ===== */

.leftIntroPanel {
  position: fixed;
  inset: 0;

  z-index: 5200;

  pointer-events: none;
}

.leftIntroPanel:not(.is-open) {
  display: none;
}

.leftIntroCard {
  position: fixed;

  left: calc(50% - 29vw - 24px);
  top: 50%;

  width: min(520px, 34vw);
  min-height: 380px;

  padding: 46px 50px 42px;

  background: white;
  color: black;

  border: 2px solid black;
  box-shadow: 10px 10px 0 black;

  transform: translate(-50%, -50%) scale(1);

  pointer-events: auto;

  z-index: 5201;
}

.leftIntroCard p {
  margin: 0 0 26px;

  font-size: clamp(17px, 1.35vw, 24px);
  line-height: 1.2;
  font-weight: bold;
}

.leftIntroHeadline {
  margin-bottom: 32px;
}

.leftIntroHeadline span {
  color: #ff1fd0;
}

.leftIntroHighlight {
  margin-top: 34px;
  color: #ff1fd0;
  letter-spacing: 0.04em;
}

#closeLeftIntroPanelButton {
  position: absolute !important;

  top: -17px !important;
  right: -17px !important;

  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;

  padding: 0 !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  background: white !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 0 !important;

  box-shadow: 5px 5px 0 black !important;

  font-size: 24px !important;
  line-height: 1 !important;

  transform: none !important;

  cursor: pointer;
}

#closeLeftIntroPanelButton:hover {
  background: black !important;
  color: white !important;
}

/* Rechtes Infofeld weiter nach rechts */

.infoPanel {
  left: calc(50% + 29vw) !important;
  top: 50% !important;

  transform: translate(-50%, -50%) scale(0.96) !important;
}

.infoAssistant.is-open .infoPanel {
  transform: translate(-50%, -50%) scale(1) !important;
}

/* ===== TapType Startscreen ===== */

#startScreen {
  position: fixed;
  inset: 0;

  z-index: 999999;

  background: #39ff14;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  gap: 54px;
}

/* Website ist vor dem Start unsichtbar */
body:not(.site-started) #app,
body:not(.site-started) #infoAssistant,
body:not(.site-started) #leftIntroPanel {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}


/* Startbutton */
#startButton {
  opacity: 0;

  padding: 15px 40px !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;
  box-shadow: 8px 8px 0 black !important;

  font-family: "MeineSchrift", Arial, sans-serif;
  font-size: clamp(22px, 2.4vw, 36px);
  font-weight: 900;

  cursor: pointer;

  animation: startButtonIn 0.45s ease 0.55s both;
}

#startButton:hover {
  background: white !important;
  color: black !important;

  transform: translate(-3px, -3px) scale(1.04) !important;
  box-shadow: 11px 11px 0 black !important;
}

@keyframes startButtonIn {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Startscreen verschwindet nach Klick */
#startScreen.is-closing {
  animation: startScreenOut 0.55s ease both;
}

@keyframes startScreenOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.04);
  }
}

/* ===== Startbutton: automatischer Glanzeffekt ===== */

#startButton {
  position: relative !important;
  overflow: hidden !important;
}

#startButton::after {
  content: "";
  position: absolute;

  top: -45%;
  left: -80%;

  width: 45%;
  height: 190%;

  background: linear-gradient(
    115deg,
    transparent 0%,
    transparent 32%,
    rgba(255, 255, 255, 0.15) 42%,
    rgba(255, 255, 255, 0.85) 50%,
    rgba(255, 255, 255, 0.18) 58%,
    transparent 70%,
    transparent 100%
  );

  transform: rotate(10deg);

  pointer-events: none;
  z-index: 2;

  animation: startButtonShine 3s ease-in-out infinite;
}

@keyframes startButtonShine {
  0% {
    left: -80%;
    opacity: 0;
  }

  8% {
    opacity: 1;
  }

  24% {
    left: 130%;
    opacity: 1;
  }

  32% {
    opacity: 0;
  }

  100% {
    left: 130%;
    opacity: 0;
  }
}

/* ===== Startbutton immer exakt mittig ===== */

#startScreen {
  position: fixed !important;
  inset: 0 !important;

  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;

  text-align: center !important;
}

#startButton {
  position: relative !important;

  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;

  margin-left: auto !important;
  margin-right: auto !important;

  align-self: center !important;

  transform: none !important;
}

/* ===== GLTF 3D-Objekt ===== */

#start3DObject {
  position: absolute;

  left: 68%;
  top: 34%;

  width: 260px;
  height: 260px;

  z-index: 80;

  background: transparent;
  border: none;

  cursor: pointer;
  pointer-events: auto;
}

#start3DObject canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

#start3DObject.is-hidden {
  display: none;
}

/* ===== 3D-Form: Verschwinden mit Pop-Out ===== */

#start3DObject {
  transform-origin: center center;
  transition: none;
}

#start3DObject.is-vanishing {
  animation: vanish3DObject 0.48s cubic-bezier(0.7, 0, 0.95, 0.35) forwards;
  pointer-events: none;
}

@keyframes vanish3DObject {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  28% {
    opacity: 1;
    transform: scale(1.12);
  }

  100% {
    opacity: 0;
    transform: scale(0.02);
  }
}

#start3DObject.is-hidden {
  display: none !important;
}

/* ===== 3D-Form erscheint erst mit dem Startbutton ===== */

#start3DObject {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(18px) scale(0.92);

  transition:
    opacity 0.45s ease,
    visibility 0.45s ease,
    transform 0.45s cubic-bezier(0.16, 0.84, 0.24, 1);
}

#start3DObject.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: translateY(0) scale(1);
}

/* beim Wegklicken weiter sauber verschwinden lassen */
#start3DObject.is-vanishing {
  visibility: visible;
  pointer-events: none;
}

#start3DObject.is-hidden {
  display: none !important;
}

/* ===== 3D-Form: Hover-Scale und Sichtbarkeit ===== */

#start3DObject {
  transform-origin: center center !important;
}

#start3DObject.is-visible {
  transform: translateY(0) scale(1) !important;
}

#start3DObject.is-visible:hover {
  transform: translateY(0) scale(1.12) !important;
}

#start3DObject.is-vanishing {
  animation: vanish3DObject 0.48s cubic-bezier(0.7, 0, 0.95, 0.35) forwards !important;
  pointer-events: none !important;
}

@keyframes vanish3DObject {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  28% {
    opacity: 1;
    transform: translateY(0) scale(1.12);
  }

  100% {
    opacity: 0;
    transform: translateY(0) scale(0.02);
  }
}

/* ===== Kein rosa Schatten bei eingefügten Formen ===== */

.placedShape {
  filter: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

.placedShape img {
  filter: none !important;
  box-shadow: none !important;
}

/* ===== Segment-Buttons pink ===== */

.placedShape button,
.rotateHandle,
.deleteShapeButton {
  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 50% !important;

  box-shadow: 4px 4px 0 black !important;

  font-family: inherit !important;
  font-weight: 900 !important;

  cursor: pointer !important;

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease !important;
}

.placedShape button:hover,
.rotateHandle:hover,
.deleteShapeButton:hover {
  background: #ff1fd0 !important;
  color: black !important;

  transform: translate(-1px, -1px) !important;
  box-shadow: 5px 5px 0 black !important;
}

.placedShape button:active,
.rotateHandle:active,
.deleteShapeButton:active {
  transform: translate(1px, 1px) !important;
  box-shadow: 2px 2px 0 black !important;
}

/* ===== X-Button im Segment-Bedienfeld pink ===== */

#closeShapeControlPanelButton {
  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 50% !important;

  box-shadow: 4px 4px 0 black !important;

  font-size: 20px !important;
  font-weight: 900 !important;

  cursor: pointer !important;
}

#closeShapeControlPanelButton:hover {
  transform: translate(-1px, -1px) !important;
  box-shadow: 5px 5px 0 black !important;
}

#closeShapeControlPanelButton:active {
  transform: translate(1px, 1px) !important;
  box-shadow: 2px 2px 0 black !important;
}


/* Drawing Area bekommt den Platz zurück */
#drawingArea {
  margin-top: 0 !important;
}

/* ===== Drawing Area unten mehr Bewegungsraum ===== */

#drawPanel {
  overflow: visible !important;
}

#placedShapesLayer {
  overflow: visible !important;
}

/* ===== Drawing Area nicht weiß nach unten verlängern ===== */

#drawingArea {
  background: white !important;
  overflow: visible !important;
}

#placedShapesLayer {
  background: transparent !important;
  overflow: visible !important;
}

#drawPanel {
  overflow: visible !important;
}

/* ===== Finale Button-Rundungen ===== */

/* Pfeile links: Alphabet + Zeichen */
#prevSign,
#nextSign,
#prevAlphabet,
#nextAlphabet,
.navigationButton {
  width: 52px !important;
  height: 52px !important;

  padding: 0 !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  border-radius: 50% !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 4px solid black !important;

  box-shadow:
    -5px 5px 0 #1a1a1a,
    -8px 8px 0 black !important;

  font-size: 24px !important;
  font-weight: bold !important;
  line-height: 1 !important;

  text-transform: none !important;
  letter-spacing: 0 !important;

  transform-origin: center !important;
}

#prevSign:hover,
#nextSign:hover,
#prevAlphabet:hover,
#nextAlphabet:hover,
.navigationButton:hover {
  background: #ff1fd0 !important;
  color: black !important;

  transform:
    perspective(500px)
    rotateX(9deg)
    rotateY(-14deg)
    translateY(-3px)
    scale(1.04) !important;

  box-shadow:
    -10px 10px 0 #1a1a1a,
    -16px 16px 0 black !important;
}


/* Info-Button im linken Archivfeld */
#alphabetInfoButton {
  border-radius: 999px !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;

  box-shadow:
    -5px 5px 0 black !important;

  padding: 12px 22px !important;
}

#alphabetInfoButton:hover,
#alphabetInfoButton.is-active {
  background: #ff1fd0 !important;
  color: black !important;

  transform: scale(1.06) !important;

  box-shadow:
    -8px 8px 0 black !important;
}


/* Archiv-Button oben rechts */
#archiveButton {
  
  border-radius: 999px !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;

  box-shadow:
    -5px 5px 0 black !important;

  padding: 10px 24px !important;

  transform: translateY(-12px) !important;

  font-family: "MeineSchrift", sans-serif !important;
  font-size: 16px !important;
  font-weight: bold !important;

  text-decoration: none !important;
  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

#archiveButton:hover {
  background: #ff1fd0 !important;
  color: black !important;

  transform: scale(1.06) !important;

  box-shadow:
    -8px 8px 0 black !important;
}

/* ===== Alle Buttons: Hover schwarz / Text weiß ===== */

button:hover,
a:hover,
#archiveButton:hover,
#alphabetInfoButton:hover,
.startInfoButton:hover,
.infoCircle:hover,
#homeButton:hover,
#resetButton:hover,
#lockButton:hover,
#flipShapeButton:hover,
#closeShapeControlPanelButton:hover,
#closeAlphabetInfoButton:hover,
#closeInfoAssistantButton:hover,
#closeSaveConfirmationButton:hover,
.deleteShapeButton:hover,
.rotateHandle:hover,
.navigationButton:hover,
#prevSign:hover,
#nextSign:hover,
#prevAlphabet:hover,
#nextAlphabet:hover {
  background: black !important;
  color: white !important;
}

/* Falls Pfeil-Icons oder X-Buttons eigene Farben erben */
button:hover *,
a:hover *,
#archiveButton:hover *,
#alphabetInfoButton:hover *,
.startInfoButton:hover *,
.infoCircle:hover *,
#homeButton:hover *,
#resetButton:hover *,
#lockButton:hover *,
#flipShapeButton:hover *,
#closeShapeControlPanelButton:hover *,
#closeAlphabetInfoButton:hover *,
#closeInfoAssistantButton:hover *,
#closeSaveConfirmationButton:hover *,
.deleteShapeButton:hover *,
.rotateHandle:hover *,
.navigationButton:hover *,
#prevSign:hover *,
#nextSign:hover *,
#prevAlphabet:hover *,
#nextAlphabet:hover * {
  color: white !important;
}

/* ===== Reset + Fertig gemeinsam unter dem rechten Drawing Panel ===== */

#drawingActionButtons {
  position: fixed !important;

  left: calc(50% + 19vw) !important;
  bottom: 28px !important;

  transform: translateX(-50%) !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  gap: 150px !important;

  z-index: 1000 !important;
}

#drawingActionButtons #resetButton,
#drawingActionButtons #lockButton {
  position: static !important;

  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;

  transform: none !important;

  margin: 0 !important;

  padding: 14px 24px !important;

  border-radius: 999px !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;

  box-shadow: -5px 5px 0 black !important;

  font-family: "MeineSchrift", sans-serif !important;
  font-size: 16px !important;
  font-weight: bold !important;

  text-transform: uppercase !important;
  letter-spacing: 0.04em !important;
}

#drawingActionButtons #resetButton:hover,
#drawingActionButtons #lockButton:hover {
  background: black !important;
  color: white !important;

  transform: scale(1.06) !important;

  box-shadow: -8px 8px 0 black !important;
}

/* ===== Home-Info-Button links unten ===== */

#homeInfoButton {
  position: fixed !important;

  left: 28px !important;
  bottom: 28px !important;

  width: 72px !important;
  height: 72px !important;
  min-width: 72px !important;
  min-height: 72px !important;

  padding: 0 !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 4px solid black !important;
  border-radius: 50% !important;

  box-shadow:
    -7px 7px 0 #1a1a1a,
    -12px 12px 0 black !important;

  font-family: "MeineSchrift", sans-serif !important;
  font-size: 34px !important;
  font-weight: bold !important;
  line-height: 1 !important;

  text-transform: none !important;
  letter-spacing: 0 !important;

  cursor: pointer !important;
  z-index: 6000 !important;

  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease,
    color 0.22s ease !important;
}

#homeInfoButton:hover {
  background: black !important;
  color: white !important;

  transform:
    perspective(500px)
    rotateX(9deg)
    rotateY(-14deg)
    translateY(-3px)
    scale(1.04) !important;

  box-shadow:
    -10px 10px 0 #1a1a1a,
    -16px 16px 0 black !important;
}

#homeInfoButton:active {
  transform:
    perspective(500px)
    rotateX(4deg)
    rotateY(-7deg)
    translate(-4px, 4px)
    scale(0.98) !important;

  box-shadow:
    -3px 3px 0 #1a1a1a,
    -6px 6px 0 black !important;
}


/* ===== Home-Infofeld über dem linken Button ===== */

#homeInfoPanel {
  position: fixed !important;

  left: 64px !important;
  bottom: 118px !important;

  width: min(430px, 32vw) !important;
  min-height: 360px !important;

  padding: 46px 36px 34px !important;

  background: white !important;
  color: black !important;

  border: 2px solid black !important;
  box-shadow: 10px 10px 0 black !important;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translateY(18px) scale(0.96);

  z-index: 5900 !important;

  transition:
    opacity 0.24s ease,
    visibility 0.24s ease,
    transform 0.24s cubic-bezier(0.16, 0.84, 0.24, 1);
}

#homeInfoPanel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;

  transform: translateY(0) scale(1);
}

#homeInfoPanel p {
  margin: 0 0 20px;

  font-family: "Futura", sans-serif;
  font-size: clamp(20px, 1.1vw, 19px);
  line-height: 1.18;

  color: black;
}

#homeInfoPanel .homeInfoHeadline {
  font-family: "MeineSchrift", sans-serif !important;
  font-size: clamp(30px, 1.6vw, 26px) !important;
  line-height: 1.05 !important;
  color: #ff1fd0;
}


/* ===== X-Button am Home-Infofeld ===== */

#closeHomeInfoPanelButton {
  position: absolute !important;

  top: -20px !important;
  right: -20px !important;

  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;

  padding: 0 !important;
  margin: 0 !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 50% !important;

  box-shadow: -5px 5px 0 black !important;

  font-family: "MeineSchrift", sans-serif !important;
  font-size: 24px !important;
  font-weight: bold !important;
  line-height: 1 !important;

  text-transform: none !important;
  letter-spacing: 0 !important;

  cursor: pointer !important;
  z-index: 9999 !important;
}

#closeHomeInfoPanelButton:hover {
  background: black !important;
  color: white !important;

  transform: scale(1.06) !important;
  box-shadow: -8px 8px 0 black !important;
}


/* ===== Wenn Home-Info offen ist: linker Archiv-Content verschwindet ===== */

body.home-info-open #alphabetNavigation,
body.home-info-open #signDisplay,
body.home-info-open #signNavigation,
body.home-info-open #signInfo,
body.home-info-open #alphabetInfoPanel {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#alphabetNavigation,
#signDisplay,
#signNavigation,
#signInfo,
#alphabetInfoPanel {
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
}

/* ===== Home-Button links unten: kleiner, wie der Fragezeichen-Button ===== */

#homeInfoButton {
  position: fixed !important;

  left: 28px !important;
  bottom: 28px !important;

  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;

  padding: 0 !important;
  margin: 0 !important;

  display: flex !important;
  justify-content: center !important;
  align-items: center !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 50% !important;

  /* Schatten jetzt nach rechts */
  box-shadow: 6px 6px 0 black !important;

  cursor: pointer !important;
  z-index: 6000 !important;

  overflow: hidden !important;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    color 0.18s ease !important;
}

#homeInfoButton:hover {
  background: black !important;
  color: white !important;

  transform: scale(1.05) !important;
  box-shadow: 8px 8px 0 black !important;
}

#homeInfoButton:active {
  transform: translate(2px, 2px) scale(0.98) !important;
  box-shadow: 3px 3px 0 black !important;
}


/* ===== Haus-Icon im Button ===== */

#homeInfoIcon {
  width: 56% !important;
  height: 56% !important;

  display: block !important;
  object-fit: contain !important;

  /* optisch minimal mittig ausgleichen */
  transform: translateY(-1px) !important;

  pointer-events: none !important;
}


/* beim Hover soll das Icon weiß wirken */
#homeInfoButton:hover #homeInfoIcon {
  filter: brightness(0) invert(1) !important;
}

/* ===== Home-Infofeld mittig über dem linken Feld ===== */

#homeInfoPanel {
  position: fixed !important;

  left: calc(64px + 17vw) !important;
  top: 50% !important;
  bottom: auto !important;

  width: min(430px, 30vw) !important;

  transform: translate(-50%, -50%) scale(0.96) !important;
}

#homeInfoPanel.is-open {
  transform: translate(-50%, -50%) scale(1) !important;
}

/* ===== Lass-dich-inspirieren Button im Home-Infofeld ===== */

#startHomeInfoButton {
  position: static !important;

  width: 100% !important;

  margin-top: auto !important;
  padding: 12px 18px !important;

  background: #ff1fd0 !important;
  color: black !important;

  border: 2px solid black !important;
  border-radius: 999px !important;

  box-shadow: 5px 5px 0 black !important;

  font-family: "MeineSchrift", sans-serif !important;
  font-size: 16px !important;

  text-transform: none !important;
  letter-spacing: 0 !important;

  cursor: pointer !important;
}

#startHomeInfoButton:hover {
  background: black !important;
  color: white !important;

  transform: scale(1.04) !important;

  box-shadow: 7px 7px 0 black !important;
}

#startHomeInfoButton:active {
  transform: translate(2px, 2px) scale(0.98) !important;
  box-shadow: 3px 3px 0 black !important;
}

/* ===== Fragezeichen-Infofeld exakt mittig im rechten Drawing Panel ===== */

.infoPanel {
  position: fixed !important;

  left: calc(67vw + 24px) !important;
  top: 50% !important;

  right: auto !important;
  bottom: auto !important;

  transform: translate(-50%, -50%) scale(0.96) !important;

  width: min(520px, 42vw) !important;

  z-index: 5000 !important;
}

.infoAssistant.is-open .infoPanel {
  transform: translate(-50%, -50%) scale(1) !important;
}

#alphabetInfoText {
  text-align: justify;
  hyphens: auto;

  font-size: 18px;
  line-height: 1.35;

  margin: 0 0 18px;
}

#alphabetInfoText strong {
  font-weight: 500;
}

#alphabetInfoText .infoLead {
  font-family: "Krungthep";
  font-size: clamp(18px, 1.4vw, 24px);
  line-height: 1.18;
  font-weight: 600;
}

#alphabetInfoText .infoQuote {
  margin-top: 28px;

  font-family: "MeineSchrift", sans-serif;
  font-size: clamp(16px, 1.2vw, 21px);
  line-height: 1.15;

  text-align: left;
  color: black;
}
