.drehtafel { display: none; }

@media (orientation: portrait) {
  html.handy .drehtafel {
    display: grid;
    place-items: center;
    position: fixed;
    inset: 0;
    z-index: 60;
    padding: 24px 18px;
    background:
      repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 2px, transparent 2px 5px),
      radial-gradient(120% 80% at 50% 30%, #2a303a 0%, #14171d 60%, #0b0d12 100%);
    color: #c9d0dc;
    text-align: center;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  }

  html.handy body > *:not(.drehtafel) { visibility: hidden; }

  html.handy .front { overflow: clip; }
}

.drehtafel .dt-blech {
  position: relative;
  width: min(100%, 340px);
  padding: 30px 22px 26px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 4px),
    linear-gradient(180deg, #3b424e 0%, #272c35 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -2px 0 rgba(0, 0, 0, 0.5),
    0 14px 40px rgba(0, 0, 0, 0.55);
}

.drehtafel .dt-niet {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #dfe6f0 0 22%, #8c95a4 30% 55%, #3a414d 70%);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
}
.drehtafel .dt-n1 { left: 10px; top: 10px; }
.drehtafel .dt-n2 { right: 10px; top: 10px; }
.drehtafel .dt-n3 { left: 10px; bottom: 10px; }
.drehtafel .dt-n4 { right: 10px; bottom: 10px; }

.drehtafel .dt-name {
  margin: 0 0 18px;
  font-family: "Arial Black", "Segoe UI Black", Impact, system-ui, sans-serif;
  font-weight: 900;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #f4f7fb 0%, #9aa6b8 48%, #e9edf3 52%, #7f8a9c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.drehtafel .dt-name b {
  font-weight: inherit;
  background: linear-gradient(180deg, #ffe7a6 0%, #d8a33c 50%, #f6cf72 54%, #a8761f 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.drehtafel .dt-handy {
  width: 46px;
  height: 78px;
  margin: 4px auto 20px;
  border: 3px solid #d8a33c;
  border-radius: 9px;
  position: relative;
  animation: dt-drehen 2.6s cubic-bezier(.6, 0, .3, 1) infinite;
}
.drehtafel .dt-handy::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 12px;
  height: 3px;
  margin-left: -6px;
  border-radius: 2px;
  background: #d8a33c;
}
@keyframes dt-drehen {
  0%, 25% { transform: rotate(0deg); }
  55%, 85% { transform: rotate(-90deg); }
  100% { transform: rotate(0deg); }
}
@media (prefers-reduced-motion: reduce) {
  .drehtafel .dt-handy { animation: none; transform: rotate(-90deg); }
}

.drehtafel .dt-titel {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e6ebf2;
}
.drehtafel .dt-text { margin: 0; font-size: 0.95rem; line-height: 1.45; color: #9aa3b0; }
.drehtafel .dt-rechtlich { margin: 22px 0 0; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; }
.drehtafel .dt-rechtlich a { display: inline-block; padding: 10px 6px; color: #8e96a6; text-decoration: none; }
.drehtafel .dt-rechtlich span { color: #4b5263; }

html.handy {

  --boden: clamp(44px, 14vh, 120px);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;

  overscroll-behavior: none;
}

html.handy body { touch-action: pinch-zoom; overscroll-behavior: none; }

html.handy .erfolge, html.handy .pflicht, html.handy .pflicht-blatt, html.handy .wb-tafel,
html.handy .schlusskarte, html.handy .rekord { touch-action: pan-y; }

html.handy .fuge { height: 14px; }
html.handy .fuge .nieten { top: -1px; transform: scale(0.72); transform-origin: center; }
html.handy .front { gap: 4px; }

html.handy {
  --wandfuge: 10px;
  --wandfach-breite: clamp(70px, 11vw, 132px);
  --wandfach-oben: 16px;
  --wandfach-hoch: calc(100vh - var(--boden) - 24px);
  --wandfach-hoch: calc(100dvh - var(--boden) - 24px);
}
html.handy .wandfach { display: block; }
html.handy .mitte {
  gap: clamp(4px, 1.4vh, 10px);
  padding-block: clamp(2px, 1vh, 8px);
  width: min(100% - 2 * (var(--wandfuge) + var(--wandfach-breite) + 12px), 1720px);
}

html.handy .marke { font-size: clamp(2.2rem, min(17.5vw, 24vh), 19rem); }
html.handy .nische-links { min-height: clamp(60px, 19vh, 132px); }

html.handy .lasche::after {
  content: '';
  position: absolute;
  inset: -14px -16px -20px;
}

html.handy .rechtlich {
  bottom: 0;
  right: 8px;
  padding: 0 8px;
  gap: 6px;
  font-size: 0.56rem;
  letter-spacing: 0.16em;
}
html.handy .rechtlich a,
html.handy .rechtlich .erfolge-knopf { padding: 9px 2px; border-bottom: 0; }

html.nah .hinter-schild {

  position: fixed;
  inset: auto;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  z-index: 5;
  border-radius: 4px;
  box-shadow: 0 0 0 200vmax rgba(4, 5, 8, 0.8), 0 0 18px rgba(0, 0, 0, 0.9);
}
html.nah body > .gegenstand:not(.in-der-hand) { visibility: hidden; }
html.nah .praegung { display: none; }

.lupe-hinweis {
  position: fixed;
  z-index: 11;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  pointer-events: none;
  animation: lupe-pulst 1.6s ease-in-out infinite;
}
.lupe-hinweis svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)); }
.lupe-hinweis circle, .lupe-hinweis path { fill: none; stroke: #f0d18a; stroke-width: 3.2; stroke-linecap: round; }
.lupe-hinweis circle { fill: rgba(240, 209, 138, 0.14); }
.lupe-hinweis .lh-plus { stroke-width: 2.4; }
@keyframes lupe-pulst {
  0%, 100% { transform: scale(0.9); opacity: 0.75; }
  50% { transform: scale(1.12); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .lupe-hinweis { animation: none; } }

html.handy.alles-fliegt .front {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
}

html.handy.maschine-laeuft .wandstelle {
  left: 0;
  top: 0;
  width: 100vw;
  height: 100dvh;
  border-radius: 0;
  z-index: 6;
  transition: left 0.9s cubic-bezier(0.4, 0, 0.2, 1), top 0.9s cubic-bezier(0.4, 0, 0.2, 1),
    width 0.9s cubic-bezier(0.4, 0, 0.2, 1), height 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

html.handy .marke-ding {
  width: calc(min(100vw, 215dvh) * 0.034);
  height: calc(min(100vw, 215dvh) * 0.034);
}
html.handy .kurbel-ding {
  width: calc(min(100vw, 215dvh) * 0.05);
  height: calc(min(100vw, 215dvh) * 0.061);
}
