@font-face {
  font-family: "Corporate S";
  src: url("fonts/fonnts.com-Corporate_S_Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Corporate S";
  src: url("fonts/fonnts.com-Corporate_S_Light_Italic.otf") format("opentype");
  font-weight: 300;
  font-style: italic;
}

@font-face {
  font-family: "Corporate S";
  src: url("fonts/fonnts.com-Corporate_S.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Corporate S";
  src: url("fonts/fonnts.com-Corporate_S_Regular_Italic.otf") format("opentype");
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: "Corporate S";
  src: url("fonts/fonnts.com-Corporate_S_Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Corporate S";
  src: url("fonts/fonnts.com-Corporate_S_Demi.otf") format("opentype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Corporate S";
  src: url("fonts/fonnts.com-Corporate_S_Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: "Corporate S";
  src: url("fonts/fonnts.com-Corporate_S_ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
}

:root {
  --red: #cd1719;
  --red-dark: #8f1113;
  --ink: #565858;
  --strong: #3f4141;
  --grey: #7b7d7c;
  --muted: #7b7d7c;
  --line: transparent;
  --paper: #ffffff;
  --light-grey: #bbbdbd;
  --soft-grey: #f2f3f3;
  --mid-grey: #d9dbdb;
  --pure-green: #80bb34;
  --shadow: none;
  --box-radius: 25px;
  --button-radius: 15px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Corporate S";
}

body.admin-menu-open {
  overflow: hidden;
}

body,
button,
input,
select,
textarea {
  font: 16px/1.5 "Corporate S";
}

.input-on-grey {
  background-color: white;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 600;
  color: var(--strong);
}

h1 {
  font-size: clamp(42px, 7vw, 92px);
  max-width: 920px;
}

h2 {
  font-size: clamp(30px, 4.5vw, 58px);
}

button,
input,
select,
textarea {
  border-radius: var(--box-radius);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  width: 156px;
  max-height: 48px;
  object-fit: contain;
}

.nav-menu-logo {
  display: none;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 32px);
  margin-left: auto;
  color: var(--muted);
}

.main-nav a {
  transition: color 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover {
  color: var(--ink);
}

/* Letzter Link: «Personalisierte Jasskarten» — nur Text */
.main-nav .nav-highlight {
  color: var(--ink);
  font-weight: 500;
}

/* Burger-Button (nur Mobile) */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  margin-left: auto;
  background: none;
  border: 0;
  cursor: pointer;
  border-radius: var(--button-radius);
}

.nav-burger span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-burger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-burger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-action,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  padding: 14px 20px 10px;
  cursor: pointer;
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
  background: var(--soft-grey);
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  border-radius: var(--button-radius);
}

.nav-action {
  background: var(--soft-grey);
  color: var(--ink);
}

.button:hover,
.nav-action:hover {
  background: var(--mid-grey);
}

.button.primary {
  background: transparent;
  color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
}

.button.secondary {
  background: var(--soft-grey);
  color: var(--ink);
}

.button.dark {
  background: var(--soft-grey);
  color: var(--ink);
}

.button.primary:hover {
  background: var(--red);
  color: white;
  box-shadow: inset 0 0 0 1px var(--red);
}

.button.small {
  min-height: 40px;
  padding: 9px 14px;
  font-size: 14px;
}

.hero-section {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 77px);
  display: grid;
  align-items: start;
  padding: clamp(40px, 7vw, 90px) clamp(18px, 5vw, 70px);
  overflow: hidden;
  background: white;
  color: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: 0;
  background: white;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.9) 32%, rgba(255, 255, 255, 0.44) 58%, rgba(255, 255, 255, 0.06) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.12) 36%, rgba(255, 255, 255, 0) 100%);
}

.hero-media img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center center;
  filter: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin-top: clamp(34px, 7vh, 90px);
  padding-bottom: min(12vh, 90px);
}

.hero-content h1,
.form-hero h1,
.admin-login h1,
.dashboard-head h1 {
  display: block;
  color: var(--strong);
  background: transparent;
  padding: 0;
  clip-path: none;
}

.hero-copy {
  margin-top: 28px;
  max-width: 700px;
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-card {
  position: absolute;
  right: clamp(18px, 4vw, 56px);
  bottom: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 460px;
}

.hero-card span {
  border: 0;
  background: white;
  color: var(--ink);
  padding: 9px 13px;
  border-radius: var(--box-radius);
  font-weight: 500;
}

.eyebrow,
.form-step {
  color: var(--grey);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
}

.intro-band,
.feature-section,
.client-band,
.example-carousel-section,
.cta-band,
.form-page,
.admin-page {
  padding: clamp(56px, 8vw, 110px) clamp(18px, 5vw, 70px);
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(28px, 6vw, 80px);
  align-items: end;
  background: white;
}

.intro-band h2,
.feature-text h2,
.section-heading h2,
.cta-band h2 {
  position: relative;
  padding-bottom: 10px;
}

.feature-text h2 {
  margin-bottom: 0;
}

.intro-band h2::after,
.feature-text h2::after,
.section-heading h2::after {
  content: none;
  position: absolute;
  left: 0;
  bottom: 0;
  width: 160px;
  max-width: 50%;
  height: 4px;
  background: linear-gradient(90deg, var(--red) 0 42px, var(--light-grey) 42px 100%);
}

.intro-band p:last-child {
  color: var(--muted);
  font-size: 20px;
}

.feature-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: clamp(34px, 7vw, 96px);
  align-items: center;
}

.feature-section.reverse {
  grid-template-columns: minmax(320px, 1fr) minmax(280px, 0.9fr);
  background: var(--soft-grey);
}

.feature-section.reverse .feature-text {
  order: 2;
}

.feature-text p:not(.eyebrow) {
  color: var(--muted);
  font-size: 19px;
}

.check-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 26px 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 12px;
  height: 2px;
  background: var(--light-grey);
  border-radius: var(--box-radius);
}

.section-image {
  display: grid;
  place-items: center;
  min-height: 420px;
  overflow: hidden;
  background: white;
  border-radius: var(--box-radius);
}

.section-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
}

.client-band {
  background: var(--soft-grey);
  color: var(--ink);
  border-top: 0;
  border-bottom: 0;
  padding-top: clamp(52px, 7vw, 86px);
  padding-bottom: clamp(52px, 7vw, 86px);
}

.example-carousel-section {
  background: var(--soft-grey);
  color: var(--ink);
  overflow: hidden;
  padding: 40px 0;
}

#carousel-references-heading {
  margin: 0 auto 26px;
  color: var(--grey);
  font-size: 25px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}

.card-carousel {
  width: calc(100% + clamp(36px, 10vw, 140px));
  margin-left: calc(clamp(18px, 5vw, 70px) * -1);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.card-carousel.dragging {
  cursor: grabbing;
}

.card-carousel-track {
  display: flex;
  align-items: stretch;
  gap: clamp(18px, 2.6vw, 34px);
  width: max-content;
  will-change: transform;
}

.card-carousel-item {
  flex: 0 0 auto;
  width: clamp(190px, 22vw, 292px);
  margin: 0;
  text-align: center;
}

.card-carousel-item img {
  display: block;
  width: 100%;
  height: clamp(302px, 35vw, 468px);
  object-fit: contain;
  background: white;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(63, 65, 65, 0.12);
  pointer-events: none;
}

.card-carousel-item figcaption {
  margin-top: 14px;
  color: var(--strong);
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 700;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.example-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  border: 0;
  padding: 16px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  border-radius: var(--box-radius);
  transition: box-shadow 0.24s ease, transform 0.24s ease;
}

.example-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  background: var(--soft-grey);
  border-radius: var(--button-radius);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.example-card span {
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 700;
  transition: transform 0.24s ease;
  transform-origin: left center;
}

.example-card:hover {
  box-shadow: 0 18px 48px rgba(63, 65, 65, 0.16);
  transform: translateY(-3px);
}

.example-card:hover img,
.example-card:hover span {
  transform: scale(1.035);
}

.example-card:hover img {
  box-shadow: 0 12px 34px rgba(63, 65, 65, 0.16);
}

.example-lightbox {
  width: min(1040px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  background: transparent;
}

.example-lightbox::backdrop {
  background: rgba(31, 42, 55, 0.72);
}

.lightbox-content {
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  gap: 14px;
}

.example-lightbox figure {
  margin: 0;
  display: grid;
  gap: 14px;
  padding: clamp(16px, 3vw, 28px);
  background: white;
  border-radius: var(--box-radius);
  box-shadow: 0 24px 80px rgba(31, 42, 55, 0.24);
}

.example-lightbox img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: var(--soft-grey);
  border-radius: var(--button-radius);
}

.example-lightbox figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
}

.example-lightbox figcaption strong {
  color: var(--ink);
  font-size: 20px;
}

.lightbox-arrow,
.lightbox-close {
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  padding-top: 5px;
  line-height: 1;
  color: var(--ink);
  background: white;
  cursor: pointer;
  border-radius: 999px;
  box-shadow: 0 12px 34px rgba(31, 42, 55, 0.18);
}

.lightbox-arrow {
  width: 54px;
  height: 54px;
  font-size: 34px;
}

.lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 44px;
  height: 44px;
  font-size: 28px;
  transform: translate(35%, -35%);
}

.cta-band {
  text-align: center;
  background: var(--soft-grey);
  color: var(--ink);
  border-top: 0;
}

.cta-band p {
  max-width: 640px;
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 20px;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 26px clamp(18px, 5vw, 70px);
  color: var(--muted);
  background: white;
}

.footer-copy {
  text-align: center;
  font-size: 14px;
}

.footer-legal {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  font-size: 14px;
}

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--ink);
}

.footer-modal-trigger {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.footer-modal-trigger:hover {
  color: var(--ink);
}

/* ---- Legal Modals (Impressum / Datenschutz) ---- */
.legal-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 48px);
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  border-radius: var(--box-radius);
  box-shadow: 0 24px 80px rgba(31, 42, 55, 0.22);
  overflow: hidden;
}

.legal-modal::backdrop {
  background: rgba(15, 20, 30, 0.6);
  backdrop-filter: blur(4px);
}

.legal-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 48px);
  max-height: calc(100vh - 48px);
}

.legal-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  background: white;
  position: sticky;
  top: 0;
  z-index: 1;
}

.legal-modal-header h2 {
  font-size: 22px;
  margin: 0;
}

.legal-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  padding: 0;
  padding-top: 5px;
  border: 0;
  border-radius: 999px;
  background: var(--soft-grey);
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.legal-modal-close:hover {
  background: var(--mid-grey);
}

.legal-modal-body {
  padding: 28px 32px 36px;
  overflow-y: auto;
  color: var(--ink);
  line-height: 1.7;
}

.legal-modal-body h3 {
  font-size: 16px;
  margin: 24px 0 8px;
  color: var(--strong);
}

.legal-modal-body h3:first-child {
  margin-top: 0;
}

.legal-modal-body p,
.legal-modal-body ul {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 15px;
}

.legal-modal-body ul {
  padding-left: 20px;
}

.legal-modal-body li {
  margin-bottom: 4px;
}

.footer-logo {
  width: 150px;
  max-height: 46px;
  object-fit: contain;
}

.employee-login {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 0 0 1px rgba(86, 88, 88, 0.08);
  backdrop-filter: blur(10px);
}

.employee-login:hover {
  color: var(--red);
  background: white;
}

.form-page,
.admin-page {
  background: var(--soft-grey);
}

.form-hero h1,
.admin-login h1,
.dashboard-head h1 {
  font-size: clamp(34px, 5vw, 64px);
}

.form-hero p,
.admin-login p {
  margin-top: 30px;
}

.form-hero,
.admin-login,
.admin-dashboard {
  max-width: 1180px;
  margin: 0 auto;
}

.form-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 20px;
}

.form-shell {
  max-width: 1180px;
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.steps-panel,
.waitlist-form,
.user-panel,
.table-panel,
.admin-login,
.entry-dialog {
  background: white;
  border: 0;
  border-radius: var(--box-radius);
  box-shadow: var(--shadow);
}

.steps-panel {
  position: sticky;
  top: 104px;
  padding: 28px;
}

.steps-panel ol {
  display: grid;
  gap: 18px;
  padding-left: 22px;
}

.steps-panel li span {
  display: block;
  color: var(--muted);
}

.waitlist-form {
  padding: clamp(22px, 4vw, 42px);
}

.steps-panel h2,
.waitlist-form h2 {
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.15;
  padding-bottom: 8px;
}

.form-section {
  padding: 0 0 34px;
  margin-bottom: 34px;
  border-bottom: 0;
}

.form-section.compact {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  align-items: end;
  gap: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

label {
  display: grid;
  gap: 7px;
  font-weight: 500;
}

span.required {
  color: var(--red);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 0;
  background: var(--soft-grey);
  padding: 12px 13px;
  color: var(--ink);
}

textarea {
  resize: vertical;
}

.product-header,
.dashboard-head,
.table-toolbar,
.dialog-head,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.product-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  margin-top: 18px;
  background: var(--soft-grey);
  border: 0;
  border-radius: var(--box-radius);
}

.conditional-fields {
  display: grid;
  gap: 14px;
}

.card-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.card-options legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--muted);
  font-weight: 600;
}

.object-personalization-option.disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.45;
}

.object-personalization-option.disabled input {
  cursor: not-allowed;
}

.option-copy {
  display: grid;
  gap: 2px;
}

.object-minimum-note {
  display: none;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
}

.object-personalization-option.disabled .object-minimum-note {
  display: block;
}

.personalization-detail {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: white;
  border-radius: var(--button-radius);
}

.personalization-detail h4 {
  margin: 0;
  color: var(--strong);
  font-size: 19px;
}

.face-card-fields,
.object-card-fields {
  display: grid;
  gap: 14px;
}

.notes-label + .checkbox-row {
  margin-top: 50px;
}

.muted {
  color: var(--muted);
}

.submit-button {
  width: 100%;
}

.add-product-bottom {
  width: 100%;
  margin: -16px 0 34px;
}

.form-message {
  min-height: 24px;
  margin: 14px 0 0;
  font-weight: 500;
  color: var(--pure-green);
}

.admin-login {
  max-width: 560px;
  padding: clamp(26px, 5vw, 46px);
}

.admin-login h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
}

.login-form,
.mini-form {
  display: grid;
  gap: 16px;
}

.admin-dashboard {
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 84px;
  max-width: none;
  min-height: 100vh;
  padding-left: calc(var(--sidebar-width) + 20px);
  transition: padding-left 0.28s ease;
}

.admin-dashboard.sidebar-collapsed {
  padding-left: calc(var(--sidebar-collapsed-width) + 20px);
}

.mobile-sidebar-toggle,
.sidebar-backdrop {
  display: none;
}

.backend-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 25;
  width: var(--sidebar-width);
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 18px;
  padding: 24px 18px;
  overflow: hidden;
  background: white;
  box-shadow: 1px 0 0 rgba(86, 88, 88, 0.08);
  transition: width 0.28s ease, padding 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
}

.sidebar-collapse-toggle {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: var(--muted);
  background: var(--soft-grey);
  cursor: pointer;
  border-radius: 10px;
  font-weight: 700;
  transition: background 0.3s ease, color 0.3s ease, transform 0.28s ease;
}

.sidebar-collapse-toggle:hover {
  color: var(--ink);
  background: var(--mid-grey);
}

.admin-dashboard.sidebar-collapsed .backend-sidebar {
  width: var(--sidebar-collapsed-width);
  justify-items: center;
  padding: 22px 12px;
}

.admin-dashboard.sidebar-collapsed .sidebar-collapse-toggle {
  top: 18px;
  left: 12px;
  transform: none;
}

.admin-dashboard.sidebar-collapsed .backend-sidebar-brand {
  margin-top: 42px;
}

.admin-dashboard.sidebar-collapsed .backend-sidebar-brand .brand-logo {
  width: 46px;
  max-height: 46px;
  object-fit: contain;
}

.admin-dashboard.sidebar-collapsed .sidebar-brand-label,
.admin-dashboard.sidebar-collapsed .sidebar-account-label,
.admin-dashboard.sidebar-collapsed .tab-label,
.admin-dashboard.sidebar-collapsed .sidebar-action-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.admin-dashboard.sidebar-collapsed .sidebar-account,
.admin-dashboard.sidebar-collapsed .backend-tab,
.admin-dashboard.sidebar-collapsed #logout-button {
  width: 58px;
  justify-content: center;
  padding: 10px;
}

.admin-dashboard.sidebar-collapsed .sidebar-account {
  grid-template-columns: 1fr;
  justify-items: center;
}

.admin-dashboard.sidebar-collapsed .tab-short {
  display: inline-grid;
}

.admin-dashboard.sidebar-collapsed .logout-icon {
  display: block;
}

#logout-button {
  align-self: end;
  min-height: 40px;
  padding: 8px 14px;
  gap: 8px;
}

.backend-sidebar-brand {
  display: grid;
  justify-items: center;
  gap: 60px;
  margin-top: 42px;
  color: var(--strong);
  font-weight: 700;
  text-align: center;
}

.backend-sidebar-brand .brand-logo {
  width: 210px;
  max-height: 76px;
}

.sidebar-account {
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 0;
  background: var(--soft-grey);
  color: var(--strong);
  cursor: pointer;
  border-radius: var(--button-radius);
  font-weight: 600;
  text-align: left;
}

.tab-short,
.logout-icon {
  display: none;
}

.tab-short {
  place-items: center;
  width: 34px;
  height: 34px;
  color: currentColor;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.logout-icon {
  position: relative;
  width: 18px;
  height: 18px;
  box-shadow: inset 0 0 0 2px currentColor;
  border-radius: 5px;
}

.logout-icon::before,
.logout-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.logout-icon::before {
  right: -4px;
  top: 8px;
  width: 12px;
  height: 2px;
}

.logout-icon::after {
  right: -4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  background: transparent;
  transform: rotate(45deg);
}

.gear-symbol {
  display: inline-block;
  margin-left: 6px;
  color: var(--muted);
}

.sidebar-account:hover,
.sidebar-account.active {
  background: var(--mid-grey);
}

.sidebar-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
  background: var(--red);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

.analysis-page-links {
  position: absolute;
  top: 40px;
  right: 40px;
  display: flex;
  gap: 8px;
}

.analysis-page-link {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  color: var(--muted);
  background: var(--soft-grey);
  border-radius: var(--button-radius);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.analysis-page-link:hover {
  color: var(--ink);
  background: var(--mid-grey);
}

.dashboard-head {
  padding-right: 190px;
  margin-bottom: 28px;
}

.dashboard-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.backend-tabs {
  display: grid;
  gap: 10px;
  margin: 0;
}

.backend-tab {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 0;
  background: white;
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--button-radius);
  font-weight: 600;
  text-align: left;
}

.backend-tab.active {
  background: var(--red);
  color: white;
}

.backend-stats {
  margin-bottom: 22px;
}

.secondary-toolbar {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.table-actions-bar {
  align-items: center;
  justify-content: space-between;
}

.table-actions-left,
.table-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-actions-left {
  flex-wrap: wrap;
}

.table-actions-left > span[id$="selected-count"] {
  padding-left: 20px;
  padding-right: 20px;
}

.table-actions-right {
  justify-content: flex-end;
  margin-left: auto;
}

.table-actions-right input {
  width: 72px;
  padding: 8px 10px;
  border-radius: 12px;
}

.new-record-button span {
  font-size: 22px;
  line-height: 1;
}

.export-menu {
  position: relative;
}

.export-menu summary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  color: var(--red);
  background: transparent;
  border-radius: var(--button-radius);
  box-shadow: inset 0 0 0 1px var(--red);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.export-menu summary::-webkit-details-marker {
  display: none;
}

.export-menu[open] summary {
  background: var(--red);
  color: white;
}

.export-menu button {
  width: 100%;
  min-height: 38px;
  border: 0;
  padding: 9px 12px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  border-radius: 10px;
}

.export-menu button:hover {
  background: var(--soft-grey);
}

.export-menu[open]::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 9;
  width: 230px;
  height: 142px;
  background: white;
  border-radius: var(--button-radius);
  box-shadow: 0 16px 40px rgba(63, 65, 65, 0.14);
}

.delete-menu[open]::after {
  height: 100px;
}

.export-menu[open] button {
  position: absolute;
  left: 0;
  z-index: 10;
  display: block;
  width: 230px;
}

.export-menu[open] button:nth-of-type(1) {
  top: calc(100% + 16px);
}

.export-menu[open] button:nth-of-type(2) {
  top: calc(100% + 58px);
}

.export-menu[open] button:nth-of-type(3) {
  top: calc(100% + 100px);
}

.button.danger {
  color: var(--red);
  box-shadow: inset 0 0 0 1px rgba(205, 23, 25, 0.28);
}

.inline-control {
  width: auto;
  min-width: 110px;
  display: grid;
  grid-template-columns: auto 70px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.inline-control input {
  padding: 8px 10px;
  border-radius: 12px;
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 14px;
  background: var(--soft-grey);
  border-radius: var(--button-radius);
}

.pagination-bar label {
  width: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.pagination-bar select {
  width: auto;
  min-width: 80px;
  padding: 8px 10px;
  border-radius: 12px;
}

.pagination-pages {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.pagination-pages button {
  min-width: 36px;
  min-height: 36px;
  border: 0;
  padding: 7px 10px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  border-radius: 10px;
  font-weight: 600;
}

.pagination-pages button.active {
  background: var(--red);
  color: white;
}

.pagination-pages button:disabled {
  cursor: default;
  opacity: 0.38;
}

.analysis-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.analysis-card,
.question-panel,
.settings-card,
.winner-panel {
  padding: 22px;
  background: var(--soft-grey);
  border-radius: var(--box-radius);
}

.analysis-card {
  display: grid;
  gap: 8px;
}

.analysis-card.wide {
  grid-column: span 2;
}

.analysis-card span:first-child {
  color: var(--red);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  font-weight: 700;
}

.analysis-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.chart-range-label {
  min-width: 150px;
  color: var(--muted);
  font-size: 13px;
}

.chart-range-label select {
  margin-top: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(31, 42, 55, 0.18);
  border-radius: 12px;
  background: #fff;
}

.chart-summary {
  display: block;
  margin: -2px auto 18px;
  text-align: center;
}

.analysis-card-head h2,
.settings-card h2 {
  margin-bottom: 0;
  font-size: clamp(22px, 2.4vw, 32px);
}

.timeline-chart {
  min-height: 230px;
  display: flex;
  align-items: end;
  gap: 6px;
  padding-top: 8px;
  padding-bottom: 6px;
  overflow-x: auto;
}

.timeline-bar {
  flex: 1;
  min-width: 24px;
  height: 210px;
  display: grid;
  grid-template-rows: 1fr 52px;
  row-gap: 18px;
  align-items: end;
  justify-items: center;
  color: var(--muted);
  font-size: 12px;
}

.timeline-bar span {
  position: absolute;
  left: 50%;
  top: -30px;
  transform: translateX(-50%);
  color: var(--red);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.timeline-bar small {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  align-self: start;
  line-height: 1;
}

.timeline-bar i {
  position: relative;
  width: 100%;
  height: var(--bar-height);
  min-height: 14px;
  display: block;
  background: var(--red);
  border-radius: 8px 8px 2px 2px;
  opacity: 0.7;
  transition: opacity 0.18s ease;
}

.timeline-bar:hover i {
  opacity: 1;
}

.timeline-bar:hover span {
  opacity: 1;
}

.question-panel {
  margin-bottom: 24px;
}

.question-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.question-item {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 16px;
  background: white;
  border-radius: var(--button-radius);
  overflow: hidden;
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.question-item.is-done {
  opacity: 0.45;
  filter: grayscale(1);
}

.question-item .done-overlay {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: var(--pure-green);
  background: rgba(255, 255, 255, 0.82);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 800;
  text-transform: uppercase;
}

.question-item.is-done .done-overlay {
  display: grid;
}

.question-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.question-item div strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.question-item i {
  width: 11px;
  height: 11px;
  display: inline-block;
  border-radius: 50%;
  background: var(--pure-green);
}

.question-item.question-mid i {
  background: #f3bd2f;
}

.question-item.question-old i {
  background: var(--red);
}

.question-item span,
.status-pill {
  display: inline-flex;
  width: fit-content;
  padding: 4px 8px;
  color: var(--red);
  background: rgba(205, 23, 25, 0.08);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.winner-panel {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.winner-result {
  display: grid;
  gap: 4px;
  color: var(--muted);
}

.winner-result strong {
  color: var(--strong);
  font-size: 24px;
}

.profile-preview {
  width: 118px;
  height: 118px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: white;
  background: var(--red);
  border-radius: 50%;
  font-size: 34px;
  font-weight: 700;
}

.profile-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-panel,
.table-panel {
  position: relative;
  padding: 22px;
}

.user-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  background: var(--soft-grey);
  border-radius: var(--box-radius);
}

.table-toolbar {
  margin-bottom: 16px;
}

.table-toolbar label {
  min-width: min(420px, 100%);
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--mid-grey);
  border-radius: 12px;
  background: white;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.waitlist-table {
  min-width: 1120px;
}

.contest-table {
  min-width: 1080px;
}

.waitlist-table th:nth-child(1),
.waitlist-table td:nth-child(1),
.contest-table th:nth-child(1),
.contest-table td:nth-child(1) {
  width: 44px;
  padding-left: 8px;
  padding-right: 8px;
}

.waitlist-table th:nth-child(2),
.waitlist-table td:nth-child(2) {
  width: 170px;
}

.waitlist-table th:nth-child(3),
.waitlist-table td:nth-child(3) {
  width: 230px;
}

.waitlist-table th:nth-child(5),
.waitlist-table td:nth-child(5) {
  width: 70px;
}

.waitlist-table th:nth-child(6),
.waitlist-table td:nth-child(6),
.contest-table th:nth-child(7),
.contest-table td:nth-child(7) {
  width: 105px;
}

.contest-table th:nth-child(2),
.contest-table td:nth-child(2) {
  width: 170px;
}

.contest-table th:nth-child(3),
.contest-table td:nth-child(3) {
  width: 130px;
}

.contest-table th:nth-child(4),
.contest-table td:nth-child(4) {
  width: 170px;
}

.contest-table th:nth-child(5),
.contest-table td:nth-child(5) {
  width: 155px;
}

.contest-table th:nth-child(6),
.contest-table td:nth-child(6) {
  width: 230px;
}

th,
td {
  padding: 13px 12px;
  border-bottom: 0;
  text-align: left;
  vertical-align: top;
}

th {
  color: white;
  background: var(--red);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.waitlist-table thead th:first-child,
.contest-table thead th:first-child {
  border-top-left-radius: 11px;
}

.waitlist-table thead th:last-child,
.contest-table thead th:last-child {
  border-top-right-radius: 11px;
}

.waitlist-table tbody td,
.contest-table tbody td {
  background: white;
  border-bottom: 1px solid rgba(217, 219, 219, 0.72);
  transition: background 0.18s ease;
}

.waitlist-table tbody tr:nth-child(even) td,
.contest-table tbody tr:nth-child(even) td {
  background: #f7f8f8;
}

.waitlist-table tbody tr:hover td,
.contest-table tbody tr:hover td {
  background: #eceeee;
}

.waitlist-table tbody tr:last-child td,
.contest-table tbody tr:last-child td {
  border-bottom: 0;
}

.waitlist-table tbody tr:last-child td:first-child,
.contest-table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 11px;
}

.waitlist-table tbody tr:last-child td:last-child,
.contest-table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 11px;
}

.waitlist-table td strong,
.contest-table td strong {
  color: var(--strong);
}

.action-column {
  width: 210px;
  overflow: hidden;
  transition: width 0.24s ease, padding 0.24s ease;
}

.contest-action-column {
  width: 165px;
  overflow: hidden;
  transition: width 0.24s ease, padding 0.24s ease;
}

.action-column.collapsed,
.contest-action-column.collapsed {
  width: 44px;
  padding-left: 6px;
  padding-right: 6px;
}

.action-heading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.action-header-label {
  transition: opacity 0.2s ease, max-width 0.24s ease;
}

.collapsed .action-header-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
}

.action-toggle {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border: 0;
  color: var(--red);
  background: rgba(205, 23, 25, 0.08);
  cursor: pointer;
  border-radius: 999px;
  font-size: 20px;
  line-height: 1;
}

.row-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow: hidden;
  transform: translateX(0);
  opacity: 1;
  transition: transform 0.24s ease, opacity 0.18s ease;
}

.collapsed .row-actions {
  pointer-events: none;
  transform: translateX(42px);
  opacity: 0;
}

.icon-action {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 0;
  background: var(--soft-grey);
  color: var(--ink);
  cursor: pointer;
  border-radius: 10px;
}

.icon-action:hover {
  background: var(--mid-grey);
}

.icon-action svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.danger-icon {
  color: var(--red);
}

.text-button,
.icon-button {
  border: 0;
  background: var(--soft-grey);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  border-radius: var(--button-radius);
}

.text-button:hover,
.icon-button:hover {
  background: var(--mid-grey);
}

.text-button {
  min-height: 34px;
  padding: 7px 10px;
  font-weight: 500;
}

.icon-button {
  width: 38px;
  height: 38px;
  font-size: 26px;
  line-height: 1;
}

.entry-dialog {
  width: min(720px, calc(100vw - 28px));
  padding: 0;
}

.entry-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}

.inactivity-dialog {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--box-radius);
  box-shadow: 0 24px 80px rgba(31, 42, 55, 0.24);
}

.inactivity-dialog::backdrop {
  background: rgba(31, 42, 55, 0.48);
}

.inactivity-box {
  display: grid;
  gap: 14px;
  padding: 28px;
  text-align: center;
}

.inactivity-box h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 38px);
}

.inactivity-box strong {
  color: var(--red);
  font-size: 44px;
  line-height: 1;
}

.entry-dialog form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.detail-dialog {
  width: min(980px, calc(100vw - 28px));
}

.detail-dialog-content {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.detail-grid,
.detail-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.detail-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  background: var(--soft-grey);
  border-radius: 8px;
}

.detail-card.full {
  grid-column: 1 / -1;
}

.detail-card span,
.detail-file-meta {
  color: var(--muted);
  font-size: 14px;
}

.detail-products {
  display: grid;
  gap: 16px;
}

.detail-product {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: white;
  border: 1px solid var(--mid-grey);
  border-radius: 8px;
}

.detail-files {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.detail-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  background: var(--soft-grey);
  border-radius: 8px;
}

.waitlist-table tbody tr {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.contest-body {
  min-height: 100vh;
  background: var(--soft-grey);
  transition: background 0.6s ease;
}


.contest-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
}

/* Einstiegsseite */
.start-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: clamp(24px, 5vw, 60px);
  text-align: center;
}

.start-logo {
  height: 56px;
  width: auto;
}

.start-page h1 {
  font-size: clamp(32px, 5vw, 60px);
  margin: 0;
}

.start-copy {
  font-size: clamp(18px, 2.5vw, 26px);
  color: var(--muted);
  margin: 0;
}

.start-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  width: min(760px, 100%);
  margin-top: 8px;
}

.start-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 32px 24px;
  border-radius: 16px;
  border: 1.5px solid var(--mid-grey);
  background: white;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.start-choice:hover {
  border-color: var(--red);
  box-shadow: 0 8px 28px rgba(205, 23, 25, 0.12);
  transform: translateY(-2px);
}

.start-choice img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 10px;
}

.start-choice strong {
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 600;
}

.start-choice span {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 600px) {
  .start-choices {
    grid-template-columns: 1fr;
  }
}

.contest-flow {
  width: min(960px, 100%);
}

.contest-screen {
  display: none;
  min-height: min(760px, calc(100vh - 36px));
  background: white;
  border-radius: var(--box-radius);
  padding: clamp(28px, 6vw, 72px);
}

.contest-screen.active {
  display: grid;
  align-content: center;
  gap: 26px;
}

.contest-start,
.contest-success {
  justify-items: center;
  text-align: center;
}

.contest-start h1 {
  font-size: clamp(46px, 9vw, 108px);
  margin-bottom: 0;
}

.contest-screen h2 {
  font-size: clamp(34px, 5.4vw, 66px);
  max-width: 820px;
  margin-bottom: 4px;
}

.contest-logo {
  width: min(360px, 72vw);
  max-height: 120px;
  object-fit: contain;
}

.contest-copy {
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 23px);
}

.contest-progress {
  justify-self: start;
  padding: 8px 13px;
  color: var(--red);
  background: rgba(205, 23, 25, 0.08);
  border-radius: var(--button-radius);
  font-weight: 600;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.answer-grid {
  margin-top: 10px;
}

.choice-tile {
  position: relative;
  min-height: 150px;
  display: grid;
  place-items: center;
  padding: 22px;
  background: var(--soft-grey);
  border: 2px solid transparent;
  border-radius: var(--box-radius);
  cursor: pointer;
  text-align: center;
  transition: border 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.choice-tile input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice-tile span {
  position: relative;
  z-index: 1;
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  color: var(--strong);
}

.choice-tile:has(input:checked) {
  border-color: var(--red);
  background: rgba(205, 23, 25, 0.08);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 10px 16px;
  color: var(--red);
  background: rgba(205, 23, 25, 0.08);
  border-radius: var(--button-radius);
  font-weight: 600;
}

.prize-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-role-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-role-tile {
  min-height: 320px;
  align-content: space-between;
  gap: 14px;
}

.card-role-tile img {
  position: relative;
  z-index: 1;
  width: min(210px, 86%);
  max-height: 220px;
  object-fit: contain;
}

.contest-info-panel,
.contest-photo-preview,
.participation-base,
.social-qr-grid article,
.participation-addons article {
  padding: 18px;
  background: var(--soft-grey);
  border-radius: var(--button-radius);
}

.contest-info-panel {
  display: grid;
  gap: 4px;
}

.contest-photo-preview {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin: 0;
}

.contest-photo-preview img {
  width: min(480px, 100%);
  max-height: 440px;
  object-fit: contain;
  border-radius: var(--button-radius);
  background: white;
}

.contest-photo-preview figcaption {
  color: var(--muted);
  text-align: center;
}

.generation-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 12px 16px;
  background: rgba(205, 23, 25, 0.08);
  color: var(--red);
  border-radius: var(--button-radius);
  font-weight: 600;
}

/* Overlay-Variante: innerhalb einer figure zentriert über dem Bild */
.contest-photo-preview .generation-status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border-radius: var(--button-radius);
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  white-space: nowrap;
  z-index: 2;
}

.contest-photo-preview {
  position: relative;
}

.contest-photo-preview img.loading {
  opacity: 0.35;
  filter: blur(2px);
}

.matching-game {
  width: 100%;
  background: var(--soft-grey);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.generation-status-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--soft-grey);
  border-radius: 10px;
  font-size: 14px;
  color: var(--muted);
  width: 100%;
}

.generation-status-bar.hidden {
  display: none;
}

.matching-game-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.matching-game-intro {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.matching-game-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  align-items: start;
}

.matching-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.matching-item {
  padding: 14px 16px 10px;
  border-radius: 10px;
  border: 2px solid transparent;
  background: white;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.matching-item:hover:not(:disabled) {
  border-color: var(--red);
  box-shadow: 0 4px 12px rgba(205, 23, 25, 0.15);
  transform: translateY(-1px);
}

.matching-item.selected {
  border-color: var(--red);
  background: rgba(205, 23, 25, 0.05);
  box-shadow: 0 0 0 3px rgba(205, 23, 25, 0.12);
  transform: translateY(-1px);
}

.matching-item.matched {
  border-color: #2a9d5c;
  background: linear-gradient(135deg, rgba(42,157,92,0.08), rgba(42,157,92,0.04));
  color: #1e7a45;
  cursor: default;
  box-shadow: 0 2px 8px rgba(42, 157, 92, 0.15);
}

.matching-item.error {
  border-color: var(--red);
  background: rgba(205, 23, 25, 0.08);
  animation: shake 0.35s ease;
}

.matching-item:disabled {
  cursor: default;
  transform: none;
}

.matching-item--prof,
.matching-item--desc {
  text-align: center;
  justify-content: center;
}

.matching-item--desc {
  line-height: 1.4;
}

.matching-item--prof {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.matching-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
}

.matching-game-result {
  font-size: 14px;
  font-weight: 600;
  color: #2a9d5c;
  text-align: center;
  margin: 0;
  padding: 8px 0 0;
}

.matching-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 40px 32px;
  background: rgba(42, 157, 92, 0.07);
  border: 1.5px solid rgba(42, 157, 92, 0.3);
  border-radius: 12px;
  flex: 1;
}

.matching-success strong {
  font-size: 22px;
  color: #1e7a45;
}

.matching-success p {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}

.loader-ring {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(205, 23, 25, 0.18);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.participation-panel {
  display: grid;
  gap: 18px;
}

.participation-base {
  display: grid;
  gap: 8px;
  background: rgba(205, 23, 25, 0.08);
}

.participation-base > span,
.participation-addons span {
  width: fit-content;
  padding: 4px 9px;
  color: var(--red);
  background: white;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.participation-base strong {
  color: var(--strong);
  font-size: clamp(20px, 2.6vw, 30px);
}

.social-qr-grid,
.participation-addons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.social-qr-grid article {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  background: white;
  border: 1px solid var(--mid-grey);
}

.social-qr-grid img {
  width: min(180px, 70vw);
  aspect-ratio: 1;
  display: block;
  padding: 10px;
  background: white;
  border-radius: 8px;
}

.social-qr-grid a {
  color: var(--red);
  font-size: clamp(13px, 1.6vw, 16px);
  overflow-wrap: anywhere;
}

.social-button {
  width: 100%;
  justify-content: center;
}

.platform-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.platform-label {
  font-size: 15px;
  color: var(--muted);
}

.platform-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-option {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
}

.platform-option input {
  display: none;
}

.platform-option span {
  padding: 8px 16px 6px;
  border-radius: var(--button-radius);
  border: 1.5px solid var(--mid-grey);
  background: white;
  font-size: 14px;
  line-height: 1;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  cursor: pointer;
}

.platform-option input:checked + span {
  border-color: var(--red);
  background: rgba(205, 23, 25, 0.06);
  color: var(--red);
  font-weight: 500;
}

/* QR-Codes nur ab Tablet-Grösse, Buttons nur auf Mobiltelefonen */
@media (min-width: 768px) {
  .social-button {
    display: none;
  }
}

@media (max-width: 767px) {
  .social-qr-grid img {
    display: none;
  }
}

.participation-addons {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.participation-addons article {
  display: grid;
  gap: 8px;
}

.participation-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.prize-tile {
  min-height: 250px;
  gap: 16px;
}

.prize-tile img {
  position: relative;
  z-index: 1;
  width: min(220px, 82%);
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.prize-tile span {
  font-size: clamp(20px, 2.4vw, 28px);
}

.checkbox-stack {
  display: grid;
  gap: 12px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--soft-grey);
  border-radius: var(--button-radius);
}

.checkbox-row input,
th input,
.waitlist-row-select,
.contest-row-select {
  width: 22px;
  height: 22px;
  accent-color: var(--red);
}

.contest-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
}

.choice-actions {
  flex-direction: column;
  align-items: stretch;
}

.contest-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 24px 0;
}

.contest-qr img {
  width: 180px;
  height: 180px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ---- Contest Lightbox ---- */
.contest-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  place-items: center;
  background: rgba(15, 20, 30, 0.85);
  backdrop-filter: blur(6px);
  cursor: zoom-out;
  padding: 24px;
}

.contest-lightbox.open {
  display: grid;
}

.contest-lightbox img {
  max-width: min(900px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  max-height: calc(100vh - 48px);
  object-fit: contain;
  border-radius: var(--box-radius);
  box-shadow: 0 32px 96px rgba(0, 0, 0, 0.5);
  cursor: default;
}

.contest-lightbox-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  padding: 0;
  padding-top: 5px;
  border: 0;
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Zoombare Bilder: Cursor-Hinweis */
.contest-photo-preview img.zoomable {
  cursor: zoom-in;
}

.contest-admin-page .admin-dashboard {
  max-width: 1380px;
}

.contest-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.contest-stats article {
  display: grid;
  gap: 4px;
  padding: 24px;
  background: white;
  border-radius: var(--box-radius);
}

.contest-stats span {
  color: var(--red);
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1;
  font-weight: 700;
}

.contest-stats strong {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 900px) {
  .nav-burger {
    display: flex;
  }

  .main-nav {
    display: none;
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    margin-left: 0;
    padding: 80px 32px 32px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    z-index: 110;
    height: 100dvh;
    overflow-y: auto;
  }

  .nav-burger {
    z-index: 120;
    position: relative;
  }

  .main-nav.open {
    display: flex;
  }

  .nav-menu-logo {
    position: absolute;
    top: 0;
    left: 0;
    height: 64px;
    width: auto;
    padding: 0 20px;
    object-fit: contain;
  }

  .main-nav a {
    padding: 16px 0;
    font-size: 22px;
    font-weight: 500;
    color: var(--ink);
    border-bottom: 1px solid var(--soft-grey);
  }

  .main-nav a:last-child {
    border-bottom: 0;
    margin-top: 16px;
  }

  .main-nav .nav-highlight {
    text-align: left;
  }

  .hero-section {
    min-height: 720px;
    padding-top: clamp(40px, 7vw, 90px);
  }

  .hero-media {
    inset: 0;
    height: auto;
    padding: 0;
  }

  .hero-media::after {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.84) 52%, rgba(255, 255, 255, 0.58) 100%),
      linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.42) 100%);
  }

  .hero-content {
    margin-top: 0;
  }

  .hero-content {
    padding-bottom: 40px;
  }

  .hero-card {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: 20px;
  }

  .intro-band,
  .feature-section,
  .feature-section.reverse,
  .form-shell,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .feature-section.reverse .feature-text {
    order: 0;
  }

  .steps-panel {
    position: static;
  }

  .section-image {
    min-height: 300px;
  }

  .form-section.compact,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .example-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lightbox-content {
    grid-template-columns: 44px 1fr 44px;
    gap: 8px;
  }

  .lightbox-arrow {
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  .prize-grid,
  .card-role-grid,
  .social-qr-grid,
  .participation-addons {
    grid-template-columns: 1fr;
  }

  .contest-screen {
    min-height: calc(100vh - 36px);
  }

  .admin-dashboard {
    padding-left: 0;
    padding-top: 74px;
  }

  .admin-dashboard.sidebar-collapsed {
    padding-left: 0;
  }

  .mobile-sidebar-toggle {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 40;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    gap: 5px;
    border: 0;
    padding: 11px;
    background: white;
    color: var(--ink);
    cursor: pointer;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(63, 65, 65, 0.12);
  }

  .mobile-sidebar-toggle span {
    width: 22px;
    height: 2px;
    display: block;
    background: currentColor;
    border-radius: 999px;
    transition: transform 0.28s ease, opacity 0.28s ease;
  }

  .admin-dashboard.sidebar-open .mobile-sidebar-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .admin-dashboard.sidebar-open .mobile-sidebar-toggle span:nth-child(2) {
    opacity: 0;
  }

  .admin-dashboard.sidebar-open .mobile-sidebar-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 24;
    display: block;
    border: 0;
    padding: 0;
    background: rgba(63, 65, 65, 0.34);
    cursor: pointer;
  }

  .sidebar-backdrop[hidden] {
    display: none;
  }

  .backend-sidebar {
    inset: 0 auto 0 0;
    width: min(300px, calc(100vw - 54px));
    min-height: 100vh;
    grid-template-rows: auto auto auto auto auto;
    padding-top: 78px;
    overflow-y: auto;
    transform: translateX(-105%);
    box-shadow: 20px 0 60px rgba(63, 65, 65, 0.16);
  }

  .admin-dashboard.sidebar-open .backend-sidebar {
    transform: translateX(0);
  }

  .sidebar-collapse-toggle {
    display: none;
  }

  #logout-button {
    align-self: auto;
  }

  .backend-tabs {
    grid-template-columns: 1fr;
  }

  .analysis-grid,
  .settings-grid,
  .question-list {
    grid-template-columns: 1fr;
  }

  .analysis-card.wide {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 30px;
  }

  .product-header,
  .dashboard-head,
  .table-toolbar,
  .dialog-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions,
  .site-footer {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }

  .button,
  .nav-action {
    width: 100%;
  }

  .section-image {
    min-height: 240px;
  }

  .contest-page {
    padding: 10px;
  }

  .contest-screen {
    min-height: calc(100vh - 20px);
    padding: 24px 18px;
  }

	  .tile-grid,
	  .contest-stats,
	  .card-options {
	    grid-template-columns: 1fr;
	  }

  .choice-tile {
    min-height: 118px;
  }

  .example-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid,
  .detail-product-grid {
    grid-template-columns: 1fr;
  }

  .detail-file {
    align-items: stretch;
    flex-direction: column;
  }

  .lightbox-content {
    grid-template-columns: 1fr;
  }

  .lightbox-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
  }

  .lightbox-arrow[data-lightbox-prev] {
    left: 8px;
  }

  .lightbox-arrow[data-lightbox-next] {
    right: 8px;
  }

  .lightbox-close {
    top: 8px;
    right: 8px;
    transform: none;
  }

  .contest-actions {
    flex-direction: column;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .pagination-pages {
    justify-content: flex-start;
  }
}

/* ============================================================
   iPad Querformat (iPad 2021 = 1080 × 810 CSS-px)
   Gilt für alle Landscape-Tablets: kein Scrollen auf keinem Step
   ============================================================ */
@media (min-width: 900px) and (max-height: 820px) and (orientation: landscape) {

  /* Seite: minimales Padding, kein Overflow */
  .contest-body {
    overflow: hidden;
    height: 100dvh;
    height: 100vh; /* Fallback */
  }

  .contest-page {
    height: 100dvh;
    height: 100vh;
    min-height: 0;
    padding: 10px 16px;
    align-content: center;
  }

  /* Flow füllt die verfügbare Höhe */
  .contest-flow {
    height: calc(100dvh - 20px);
    height: calc(100vh - 20px);
  }

  /* Jeder Screen füllt exakt den verfügbaren Platz */
  .contest-screen {
    min-height: 0;
    height: 100%;
    padding: 22px 48px;
    overflow: hidden;
  }

  .contest-screen.active {
    gap: 14px;
    align-content: center;
  }

  /* ---- Typografie kompakter ---- */
  .contest-start h1,
  .contest-success h2 {
    font-size: 44px;
  }

  .contest-screen h2 {
    font-size: 32px;
  }

  .contest-copy {
    font-size: 16px;
  }

  .contest-logo {
    max-height: 72px;
  }

  .contest-progress {
    padding: 5px 11px;
    font-size: 14px;
  }

  /* ---- Schritt 0 / 5: Start & Fertig ---- */
  .contest-start,
  .contest-success {
    gap: 12px;
  }

  /* ---- Schritt 1 (Karten): Info-Panel ---- */
  .contest-info-panel {
    padding: 12px 16px;
    gap: 2px;
  }

  /* ---- Schritt 2 (Karten) + Schritt 4 (Karte bestätigen): Foto-Vorschau ---- */
  .contest-photo-preview img {
    max-height: 320px;
  }

  /* ---- Kartenrollen-Kacheln (Schritt 3 Karten) ---- */
  .card-role-tile {
    min-height: 200px;
    padding: 14px;
    gap: 8px;
  }

  .card-role-tile img {
    max-height: 150px;
  }

  /* ---- Preis-Kacheln (Schritt 1 Gewinnspiel) ---- */
  .prize-tile {
    min-height: 130px;
    gap: 8px;
    padding: 14px;
  }

  .prize-tile img {
    width: min(130px, 80%);
  }

  .choice-tile {
    min-height: 0;
  }

  .choice-tile span {
    font-size: 18px;
  }

  /* ---- Teilnahme-Panel (Schritt 2 Gewinnspiel): horizontales Layout ---- */
  .participation-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "base  qr"
      "addon qr";
    gap: 10px;
    align-items: start;
  }

  .participation-base      { grid-area: base;  padding: 12px; gap: 6px; }
  .social-qr-grid          { grid-area: qr;    align-self: stretch; }
  .participation-addons    { grid-area: addon; gap: 8px; }

  .participation-base strong {
    font-size: 17px;
  }

  .social-qr-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .social-qr-grid article {
    padding: 10px;
    gap: 6px;
  }

  .social-qr-grid img {
    width: min(110px, 100%);
  }

  .participation-addons {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .participation-addons article {
    padding: 10px;
    gap: 4px;
  }

  .participation-addons article p,
  .participation-panel p {
    font-size: 13px;
  }

  /* ---- Kontaktformular (Schritt 3 Gewinnspiel): 3 Spalten ---- */
  .contest-screen .form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .contest-screen .form-grid label,
  .contest-screen label {
    font-size: 14px;
    gap: 4px;
  }

  .contest-screen input,
  .contest-screen select {
    padding: 8px 12px;
    font-size: 15px;
  }

  .checkbox-row {
    padding: 8px 12px;
    font-size: 14px;
  }

  /* ---- QR-Code Fertig-Screen (Schritt 5 Karten) ---- */
  .contest-qr img {
    width: 130px;
    height: 130px;
  }

  /* ---- Buttons kompakter ---- */
  .contest-actions {
    margin-top: 4px;
    gap: 10px;
  }

  .contest-screen .button {
    padding: 12px 22px;
    font-size: 16px;
  }

  /* ---- Gewinnspiel Schritt 2: Social-Media-Buttons kompakter ---- */
  .social-button {
    padding: 8px 12px 6px;
    font-size: 13px;
    min-height: 0;
  }

  .social-qr-grid img {
    width: min(90px, 100%);
    padding: 6px;
  }

  .social-qr-grid article {
    gap: 5px;
    padding: 8px;
  }

  .social-qr-grid a {
    font-size: 11px;
  }

  /* ---- Gewinnspiel Schritt 1: Preis-Grid passt in eine Zeile ---- */
  .prize-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prize-tile {
    min-height: 110px;
    padding: 12px;
    gap: 6px;
  }

  .prize-tile img {
    width: min(80px, 70%);
  }

  .prize-tile span {
    font-size: 14px;
  }
}
