/* Karte "Schick die Platte weiter" unten rechts */
.gift {
  position: fixed;
  right: 32px;
  bottom: 32px;
  z-index: 10;
  width: 128px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(22, 22, 22, 0.92);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(16px);
  transition: width 0.55s var(--ease-out), padding 0.55s var(--ease-out);
}

.gift.hov,
.gift.open {
  width: min(28vw, 380px);
  padding: 18px;
}

.gift.open {
  width: min(34vw, 460px);
  padding: 28px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
}

.bubble {
  position: absolute;
  right: 10px;
  bottom: calc(100% + 18px);
  padding: 9px 14px;
  border-radius: 16px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  animation: bob 3.4s ease-in-out infinite;
  transition: opacity 0.3s;
}

.bubble::before,
.bubble::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--text);
}

.bubble::before {
  width: 10px;
  height: 10px;
  right: 34px;
  bottom: -12px;
}

.bubble::after {
  width: 6px;
  height: 6px;
  right: 44px;
  bottom: -20px;
}

.gift.hov .bubble,
.gift.open .bubble {
  opacity: 0;
  animation: none;
}

@keyframes bob {
  50% {
    translate: 0 -4px;
  }
}

.gift .top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  cursor: pointer;
}

.gift.open .top {
  padding-right: 26px;
}

.gift .txt {
  min-width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-8px);
  white-space: nowrap;
  transition: opacity 0.25s, transform 0.4s;
}

.gift.hov .txt,
.gift.open .txt {
  opacity: 1;
  transform: none;
  transition-delay: 0.18s;
}

.gift.open .txt {
  white-space: normal;
}

.gift .txt b {
  display: block;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.05;
  /* darf umbrechen statt abgeschnitten zu werden (Syne läuft je nach Browser breiter) */
  white-space: normal;
  padding-right: 0.12em;
}

.gift .txt small {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--soft);
  overflow: hidden;
  text-overflow: ellipsis;
}

.gift .mini {
  position: relative;
  width: 96px;
  height: 72px;
}

.gift .mini img {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  width: 72px;
  height: 72px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 6px 14px -8px rgba(0, 0, 0, 0.7);
}

.gift .mini-vinyl {
  position: absolute;
  left: 8px;
  top: 4px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0 18%, #111 19% 100%),
    repeating-radial-gradient(circle, #0b0b0c 0 1px, #18181a 1.4px 2.4px);
  background-blend-mode: normal;
  transform: translateX(14px);
  transition: transform 0.5s var(--ease-out);
}

.gift.hov .mini-vinyl {
  transform: translateX(26px);
}

.gift.open .mini-vinyl {
  transform: translateX(30px) rotate(360deg);
  transition-duration: 1s;
}

.gift form {
  display: none;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.gift.open form {
  display: flex;
}

.gift .ln {
  font-size: 18px;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s, transform 0.6s var(--ease-out);
}

.gift.shown .ln {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.25s + var(--i) * 0.07s);
}

.gift .ln input,
.gift .ln textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  border-bottom: 1.5px dashed rgba(255, 255, 255, 0.2);
  outline: 0;
  padding: 0 0 2px;
  border-radius: 0;
  transition: border-color 0.2s;
}

.gift .ln input.auto {
  min-width: 2ch;
}

.gift .ln input:focus,
.gift .ln textarea:focus {
  border-bottom-color: var(--accent);
}

.gift .ln input::placeholder,
.gift .ln textarea::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.gift .lyr {
  display: flex;
  align-items: baseline;
  font-style: italic;
}

.gift .lyr .q {
  color: var(--accent);
}

.gift .lyr input {
  max-width: calc(100% - 1.2em);
}

.gift .lyr input::placeholder {
  color: rgba(204, 51, 204, 0.45);
}

.gift .ln textarea {
  display: block;
  width: 100%;
  min-height: 112px;
  max-height: 40vh;
  resize: none;
  overflow-y: auto;
  font-size: 16px;
  line-height: 1.5;
  padding: 10px 12px;
  border: 1.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
}

/* Betreffzeile: Vorlage zum Überschreiben, sieht aus wie eine Textzeile mit gestricheltem Strich */
.gift .subj {
  display: block;
}

.gift .subj textarea {
  display: block;
  width: 100%;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  font-size: 18px;
  line-height: 1.35;
  padding: 0 0 2px;
  border: 0;
  border-bottom: 1.5px dashed rgba(255, 255, 255, 0.2);
  border-radius: 0;
  cursor: text;
}

.gift .subj:hover textarea {
  border-bottom-color: rgba(204, 51, 204, 0.6);
}

.gift .subj .edit-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.gift .subj:focus-within .edit-hint {
  color: var(--accent);
}

.gift .sign {
  align-self: flex-end;
}

.gift .go .btn {
  width: 100%;
  height: 50px;
}

.gift.made .ln {
  display: none;
}

.gift .made {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: madeIn 0.5s var(--ease-out);
}

@keyframes madeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.gift .made .mt {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 26px;
  line-height: 1.05;
}

.gift .made .ms {
  font-size: 15px;
  line-height: 1.45;
  color: var(--soft);
  margin-bottom: 6px;
}

.gift .made .acts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gift .made .acts .btn {
  padding: 0.7rem 0.9rem;
}

/* Direkt teilen: runde Icon-Knöpfe je Netzwerk */
.gift .share-t {
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.gift .share-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(46px, 1fr));
  gap: 10px 2px;
  margin-top: 10px;
}

.gift .sh {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: var(--soft);
  text-decoration: none;
  cursor: pointer;
}

.gift .sh .ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
  color: #f3ebdd;
  transition: border-color 0.2s, box-shadow 0.25s, color 0.2s, transform 0.25s var(--ease-out);
}

.gift .sh svg {
  width: 19px;
  height: 19px;
}

.gift .sh svg .f {
  fill: currentColor;
  stroke: none;
}

.gift .sh .lb {
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
  transition: color 0.2s;
}

.gift .sh:hover .ico,
.gift .sh:focus-visible .ico {
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 18px var(--accent-glow), inset 0 0 10px var(--accent-soft);
  transform: translateY(-2px);
}

.gift .sh:hover .lb,
.gift .sh:focus-visible .lb {
  color: var(--text);
}

.gift .sh:focus-visible {
  outline: none;
}

.gift .share-hint {
  min-height: 1em;
  margin-top: 8px;
  font-size: 12px;
  color: var(--accent);
}

.gift .share-hint:empty {
  display: none;
}

.gift .sh-native {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding: 0.6rem 1rem;
  border: 1px solid var(--accent);
  border-radius: 50px;
  background: var(--accent-soft);
  font: inherit;
  font-size: 14px;
  color: var(--text);
  cursor: pointer;
  transition: box-shadow 0.25s, background 0.25s, transform 0.25s var(--ease-out);
}

.gift .sh-native svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.gift .sh-native:hover,
.gift .sh-native:focus-visible {
  background: rgba(204, 51, 204, 0.2);
  box-shadow: 0 0 18px var(--accent-glow);
  transform: translateY(-1px);
}

.gift .made .edit {
  align-self: flex-start;
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.gift .x {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--muted);
  display: none;
}

.gift.open .x {
  display: block;
}

.gift .x:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.cp-note {
  position: fixed;
  z-index: 99;
  pointer-events: none;
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 900px) {
  .gift,
  .gift.hov,
  .gift.open {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
  }

  .gift .bubble {
    display: none;
  }

  .gift .txt {
    opacity: 1;
    transform: none;
    white-space: normal;
  }

  .gift .txt b {
    font-size: 17px;
  }
}
