:root {
  --wood-dark: #1b110b;
  --wood-mid: #2b1a0f;
  --wood-light: #4a2f1b;
  --felt-deep: #073525;
  --felt-mid: #0d4a36;
  --felt-light: #146047;
  --felt-thread: rgba(255, 255, 255, 0.03);
  --vignette: rgba(0, 0, 0, 0.46);
  --text-main: #f2e8d2;
  --text-soft: #e6d6b0;
  --text-dim: #c8b58e;
  --gold-1: #eac77c;
  --gold-2: #c28f3d;
  --panel-border: rgba(227, 191, 111, 0.46);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  position: relative;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 214, 136, 0.12), transparent 34%),
    radial-gradient(circle at 78% 84%, rgba(0, 0, 0, 0.44), transparent 42%),
    linear-gradient(145deg, #100904, var(--wood-dark) 36%, #120a05 64%, #090604);
}

body::before {
  content: "";
  position: fixed;
  inset: 12px 14px;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(140, 209, 171, 0.14), transparent 38%),
    linear-gradient(180deg, var(--felt-light), var(--felt-mid) 52%, var(--felt-deep));
  border-radius: 34px;
  border: 5px solid var(--wood-light);
  box-shadow:
    inset 0 0 0 2px rgba(255, 224, 160, 0.13),
    inset 0 26px 28px rgba(255, 255, 255, 0.03),
    inset 0 -32px 36px rgba(0, 0, 0, 0.34),
    0 18px 36px rgba(0, 0, 0, 0.56);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 14%, rgba(247, 211, 128, 0.12), transparent 34%),
    radial-gradient(circle at 50% 52%, rgba(7, 28, 22, 0.65), rgba(2, 8, 6, 0.9)),
    radial-gradient(circle at 50% 58%, transparent 18%, rgba(0, 0, 0, 0.52) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.28));
  backdrop-filter: blur(5px) saturate(112%);
  -webkit-backdrop-filter: blur(5px) saturate(112%);
}

.legal-page {
  position: relative;
  z-index: 2;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
}

.legal-panel {
  width: min(960px, 94vw);
  height: min(86vh, 760px);
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background:
    linear-gradient(180deg, rgba(14, 37, 29, 0.96), rgba(8, 23, 18, 0.96));
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.legal-title {
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-size: clamp(1.24rem, 2.2vw, 1.62rem);
  color: #f7e8bf;
  letter-spacing: 0.01em;
}

.legal-kicker {
  margin: 2px 0 0;
  color: rgba(227, 217, 193, 0.86);
  font-size: 0.78rem;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(215, 188, 126, 0.34);
  background: linear-gradient(180deg, rgba(50, 84, 71, 0.94), rgba(35, 61, 52, 0.96));
  color: #f0e7d1;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}

.legal-back:hover {
  filter: brightness(1.08);
}

.legal-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(215, 188, 126, 0.34);
  background: linear-gradient(180deg, rgba(50, 84, 71, 0.94), rgba(35, 61, 52, 0.96));
}

.legal-nav a {
  color: #f0e7d1;
  text-decoration: none;
  font-size: 0.82rem;
  border-bottom: 1px solid transparent;
}

.legal-nav a:hover {
  border-bottom-color: rgba(248, 214, 139, 0.72);
}

.legal-nav a[aria-current="page"] {
  color: #fff2d3;
  border-bottom-color: rgba(248, 214, 139, 0.92);
}

.legal-scroll {
  min-height: 0;
  overflow: auto;
  padding: 2px 12px 4px 2px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(221, 184, 101, 0.82) rgba(12, 28, 22, 0.45);
}

.legal-scroll::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.legal-scroll::-webkit-scrollbar-track {
  background: rgba(18, 26, 35, 0.46);
  border-radius: 999px;
}

.legal-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(234, 199, 124, 0.92), rgba(192, 146, 63, 0.9));
  border-radius: 999px;
}

.legal-section {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.legal-section + .legal-section {
  margin-top: 14px;
  padding-top: 0;
  border-top: 0;
}

.legal-section h2 {
  margin: 0 0 7px;
  font-family: "Palatino Linotype", "Book Antiqua", Georgia, serif;
  color: #f3e1b6;
  font-size: 1rem;
}

.legal-section p,
.legal-section li {
  margin: 0;
  color: #e8d8b4;
  line-height: 1.46;
  font-size: 0.92rem;
}

.legal-section p + p {
  margin-top: 8px;
}

.legal-section ul {
  margin: 0;
  padding: 0 0 0 18px;
  display: grid;
  gap: 6px;
}

.legal-section a {
  color: #f0ddad;
}

/* Lesespacing nur fuer Impressum/Datenschutz/Nutzungsbedingungen */
.legal-panel:not(.contact-panel) .legal-scroll {
  padding: 0 12px 6px 2px;
}

.legal-panel:not(.contact-panel) .legal-section + .legal-section {
  margin-top: 0;
}

.legal-panel:not(.contact-panel) .legal-section {
  display: grid;
  row-gap: 3px;
}

.legal-panel:not(.contact-panel) .legal-section h2 {
  margin: 0;
}

.legal-panel:not(.contact-panel) .legal-section + .legal-section h2 {
  margin-top: 12px;
}

.legal-panel:not(.contact-panel) .legal-section p,
.legal-panel:not(.contact-panel) .legal-section li {
  line-height: 1.48;
}

.legal-panel:not(.contact-panel) .legal-section p + p {
  margin-top: 0;
}

.legal-panel:not(.contact-panel) .legal-section ul {
  margin-top: 0;
  padding-left: 18px;
  gap: 2px;
}

.contact-panel {
  width: min(760px, 92vw);
  height: min(78vh, 620px);
  padding: 12px;
  gap: 8px;
}

.contact-panel .legal-scroll {
  overflow: hidden;
  padding: 18px 0 0;
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
  justify-items: center;
  gap: 10px;
}

.contact-panel .legal-section {
  width: min(100%, 520px);
}

.contact-panel .legal-section + .legal-section {
  margin-top: 14px;
}

.contact-panel .contact-intro {
  text-align: center;
}

.contact-panel .contact-intro p {
  margin: 0 auto;
  width: 100%;
  max-width: none;
  text-align: center;
}

.contact-panel .contact-form-section {
  width: min(100%, 520px);
}

.legal-form {
  margin-top: 6px;
  display: grid;
  gap: 7px;
  width: min(100%, 520px);
  margin-inline: auto;
}

.legal-form label {
  color: #f3e1b6;
  font-size: 0.88rem;
  font-weight: 600;
}

.legal-form input[type="text"],
.legal-form input[type="email"],
.legal-form textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(228, 203, 145, 0.38);
  padding: 9px 10px;
  color: #f2e8d2;
  background: rgba(10, 23, 18, 0.72);
  font: inherit;
}

.legal-form textarea {
  resize: none;
  min-height: 110px;
}

.legal-form input:focus,
.legal-form textarea:focus {
  outline: none;
  border-color: rgba(248, 214, 139, 0.82);
  box-shadow:
    0 0 0 1px rgba(248, 214, 139, 0.34),
    0 0 14px rgba(248, 214, 139, 0.12);
}

.legal-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 2px;
  color: #e8d8b4;
  font-size: 0.86rem;
  line-height: 1.4;
  font-weight: 400 !important;
}

.legal-checkbox input[type="checkbox"] {
  margin-top: 2px;
}

.legal-form-actions {
  margin-top: 4px;
}

.legal-submit {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(215, 188, 126, 0.34);
  background: linear-gradient(180deg, rgba(50, 84, 71, 0.94), rgba(35, 61, 52, 0.96));
  color: #f0e7d1;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.legal-submit:hover {
  filter: brightness(1.08);
}

.legal-footer {
  border-top: 1px solid rgba(231, 200, 123, 0.24);
  padding-top: 8px;
  color: var(--text-dim);
  font-size: 0.76rem;
  text-align: right;
}

@media (max-width: 700px) {
  .legal-page {
    padding: 10px;
  }

  .legal-panel {
    width: min(980px, 97vw);
    height: min(90vh, 780px);
    padding: 10px;
    gap: 8px;
  }

.contact-panel {
    width: min(760px, 96vw);
    height: min(84vh, 640px);
    padding: 10px;
  }

  .contact-panel .legal-scroll {
    gap: 8px;
  }

  .contact-panel .legal-section {
    width: 100%;
  }

  .legal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .legal-back {
    min-height: 32px;
  }

  .legal-section h2 {
    font-size: 0.96rem;
  }

  .legal-section p,
  .legal-section li {
    font-size: 0.88rem;
  }
}

@media (max-height: 860px) {
  .contact-panel {
    height: min(88vh, 620px);
    padding: 10px;
    gap: 6px;
  }

  .contact-panel .legal-scroll {
    padding-top: 10px;
    gap: 8px;
  }

  .contact-panel .legal-section + .legal-section {
    margin-top: 10px;
  }

  .legal-form {
    margin-top: 4px;
    gap: 6px;
  }

  .legal-form label {
    font-size: 0.84rem;
  }

  .legal-form input[type="text"],
  .legal-form input[type="email"],
  .legal-form textarea {
    padding: 7px 9px;
  }

  .legal-form textarea {
    min-height: 78px;
  }

  .legal-checkbox {
    gap: 6px;
    font-size: 0.8rem;
    line-height: 1.3;
  }

  .legal-submit {
    min-height: 32px;
    font-size: 0.84rem;
  }
}

@media (max-height: 740px) {
  .legal-page {
    padding: 8px;
  }

  .contact-panel {
    height: min(92vh, 620px);
    padding: 8px;
  }

  .legal-header {
    gap: 6px;
  }

  .legal-title {
    font-size: clamp(1.04rem, 1.7vw, 1.26rem);
  }

  .legal-back {
    min-height: 30px;
    padding: 0 10px;
    font-size: 0.74rem;
  }

  .contact-panel .legal-scroll {
    padding-top: 8px;
    gap: 6px;
  }

  .contact-panel .legal-section + .legal-section {
    margin-top: 8px;
  }

  .contact-panel .contact-intro p {
    font-size: 0.84rem;
    line-height: 1.32;
  }

  .legal-form {
    gap: 5px;
  }

  .legal-form label {
    font-size: 0.8rem;
  }

  .legal-form input[type="text"],
  .legal-form input[type="email"],
  .legal-form textarea {
    padding: 6px 8px;
    font-size: 0.84rem;
  }

  .legal-form textarea {
    min-height: 64px;
  }

  .legal-checkbox {
    font-size: 0.76rem;
    line-height: 1.25;
  }

  .legal-form-actions {
    margin-top: 2px;
  }

  .legal-submit {
    min-height: 30px;
    font-size: 0.8rem;
  }
}
