:root {
  --color-gold: #d4af37;
  --color-etikett: #f4e8d1;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0; height: 100dvh; display: flex; align-items: center; justify-content: center;
  background: url('biergarten.jpg') no-repeat center center; background-size: cover;
  font-family: 'Georgia', serif; overflow: hidden;
}

#copyright {
  position: absolute;
  bottom: 8px; left: 50%;
  transform: translateX(-50%);
  color: rgba(212,175,55,0.7);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.5px;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}

/* Deckblatt */
#cover {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px; cursor: pointer;
  background: transparent;
}
#cover-cap-wrap {
  position: relative; width: 300px; height: 300px;
  background: transparent;
  border-radius: 50%; overflow: hidden;
  border: 4px solid var(--color-gold);
  box-shadow: 0 0 20px var(--color-gold), 0 0 40px rgba(212,175,55,0.4);
}
#cover-cap {
  width: 120%; height: 120%; object-fit: cover;
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.2s; display: block;
}
#cover:hover #cover-cap { transform: translate(-50%, -50%) scale(1.06); }
#cover-text {
  position: absolute; top: 47%; left: 50%;
  transform: translate(-50%, -50%);
  color: #fff; font-family: 'Georgia', serif;
  font-size: 1.1rem; text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,0.9);
  line-height: 1.5; margin: 0; padding: 0; pointer-events: none;
  font-weight: bold; width: 200px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}

@keyframes coverSpin {
  0%   { transform: translate(-50%, -50%) rotate(0deg) scale(1.06); }
  100% { transform: translate(-50%, -50%) rotate(360deg) scale(1.06); }
}
#cover-cap.cover-spin {
  animation: coverSpin 0.35s ease-out forwards;
}

#app.hidden { display: none; }
@keyframes unfold {
  0%   { transform: scaleY(0); transform-origin: top center; opacity: 0; }
  100% { transform: scaleY(1); transform-origin: top center; opacity: 1; }
}
#app.unfolding { animation: unfold 0.6s ease-out forwards; }

#app {
  display: flex; flex-direction: row;
  width: 320px; height: 600px; overflow: hidden;
}

#panel {
  width: 66px; height: 100%; flex-shrink: 0;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  gap: 10px; padding: 12px 8px;
  border-radius: 40px 0 0 40px;
  background: rgba(0,0,0,0.45); backdrop-filter: blur(5px);
}

.floor-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: url('kronkorken.jpg') no-repeat center center; background-size: cover;
  border: 2px solid #666; cursor: pointer; transition: 0.2s; flex-shrink: 0;
}

.floor-btn.active { border-color: var(--color-gold); box-shadow: 0 0 15px var(--color-gold); transform: scale(1.1); }

@keyframes spin {
  0%   { transform: scale(1.1) rotate(0deg); }
  100% { transform: scale(1.1) rotate(360deg); }
}
.floor-btn.spinning { animation: spin 0.6s ease-out; }

#shaft {
  flex: 1; height: 100%; position: relative;
  display: flex; align-items: center; justify-content: center;
  background: #0e0c08; border-radius: 0 20px 20px 0; overflow: hidden;
}

#bottle-img { height: 115%; width: auto; filter: drop-shadow(10px 10px 20px rgba(0,0,0,0.5)); }

#content-area {
  position: absolute; top: 62%; left: calc(49% + 5px); transform: translate(-50%, -40%);
  width: 165px; height: 355px; background: var(--color-etikett);
  padding: 12px; text-align: center; color: #3d2b1f;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  box-shadow: inset 0 0 15px rgba(0,0,0,0.1), 2px 2px 5px rgba(0,0,0,0.2);
  border-radius: 8px; z-index: 5;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  line-height: 1.4;
}

#content-area h3 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
  margin: 0 0 10px 0;
}

#content-area p {
  margin: 0;
  font-size: 0.75rem;
  width: 100%;
}

.nowrap { white-space: nowrap; }

.emoji-row {
  display: block;
  margin-bottom: 8px;
  font-size: 0.7rem;
}

.jubilar-img {
  display: block;
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 4px;
  margin: 8px auto;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@keyframes rollUp {
  0%   { transform: translate(-50%, -40%) scaleY(1); }
  100% { transform: translate(-50%, -40%) scaleY(0); }
}
@keyframes rollDown {
  0%   { transform: translate(-50%, -40%) scaleY(0); }
  100% { transform: translate(-50%, -40%) scaleY(1); }
}
#content-area.rolling-up   { animation: rollUp   0.25s ease-in  forwards; }
#content-area.rolling-down { animation: rollDown 0.35s ease-out forwards; }

/* Gutschein */
.gutschein {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 10px; padding: 14px 6px;
  border: 2px dashed var(--color-gold);
  border-radius: 6px;
  background: linear-gradient(180deg, #fdf6e3, #f4e8d1);
}
.gutschein-label {
  font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 1px; color: #6b5028; font-weight: bold;
}
.gutschein-code {
  font-size: 1rem; color: #2a1a0e;
  letter-spacing: 2px; padding: 5px 8px;
  background: rgba(212,175,55,0.18);
  border-radius: 4px;
}

/* Formular */
#rsvp { font-size: 0.7rem; width: 100%; text-align: left; font-family: Arial, Helvetica, sans-serif; }
#rsvp .rsvp-label { font-weight: bold; margin: 8px 0 4px; color: #2a1a0e; display: block; font-size: 0.7rem; }
#rsvp .rsvp-row { display: flex; flex-direction: column; gap: 2px; margin-bottom: 2px; }
#rsvp label { font-size: 0.68rem; display: flex; align-items: center; gap: 5px; font-weight: normal; }
#rsvp textarea {
  width: 100%; height: 50px; font-size: 0.65rem;
  padding: 4px; border: 1px solid #bbb; border-radius: 4px;
  resize: none; font-family: Arial, Helvetica, sans-serif; margin-top: 2px;
  background: #fffdf7;
}
#rsvp button {
  margin-top: 6px;
  background: linear-gradient(180deg, #e8d5a0, #d4af37, #a8862a);
  color: #2a1a0e;
  border: none; border-radius: 4px; padding: 5px 10px;
  font-size: 0.68rem; cursor: pointer; width: 100%;
  font-family: Arial, Helvetica, sans-serif; font-weight: bold;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: box-shadow 0.2s, transform 0.1s;
}
#rsvp button:hover {
  box-shadow: 0 0 14px rgba(212,175,55,0.7), inset 0 1px 0 rgba(255,255,255,0.4);
}
#rsvp button:active {
  transform: scale(0.98);
}

/* Desktop */
@media (min-width: 768px) {
  #app { width: 380px; height: 750px; }
  .floor-btn { width: 50px; height: 50px; }
  #panel { width: 72px; gap: 12px; }
  #content-area { width: 165px; height: 355px; }
}

/* Handy */
@media (max-width: 480px) {
  #app { transform: scale(0.82); transform-origin: center center; }
  #copyright { font-size: 0.6rem; bottom: 8px; }
  #content-area { width: 130px; height: 310px; padding: 9px; font-size: 0.65rem; }
  #content-area h3 { font-size: 0.78rem; margin-bottom: 6px; }
  #content-area p { font-size: 0.65rem; }
  .jubilar-img { width: 70px; height: 70px; margin: 6px auto; }
  .emoji-row { font-size: 0.65rem; margin-bottom: 6px; }
  #bottle-img { height: calc(115% + 10px); }
  .floor-btn { width: 40px; height: 40px; }
  #panel { gap: 8px; padding: 10px 6px; }
  .gutschein { gap: 6px; padding: 10px 4px; }
  .gutschein-label { font-size: 0.5rem; letter-spacing: 0.5px; }
  .gutschein-code { font-size: 0.78rem; letter-spacing: 1px; padding: 3px 6px; }
  #rsvp { font-size: 0.55rem; }
  #rsvp .rsvp-label { font-size: 0.58rem; margin: 5px 0 3px; }
  #rsvp label { font-size: 0.53rem; }
  #rsvp textarea { height: 35px; font-size: 0.52rem; }
  #rsvp button { font-size: 0.55rem; padding: 4px 8px; margin-top: 5px; }
}