* {
    box-sizing: border-box;
}
 /* #permissionLayer {
      position: fixed;
      inset: 0;
      background: white;
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 1000;
      opacity: .9;
    } */

body {
    margin: 0;
    font-family: sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    overflow: hidden;
}

.app {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100svh;
}

header {
    background: #1a1a1a;
    color: #888;
    padding: 0.8rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-bottom: 1px solid #252525;
    position: relative;
}

/* Aktivierungsbutton für Smartphone-Sensoren */
.sensor-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    color: #000;
    border: none;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    z-index: 100;
}

main {
    background: #161616;
    padding: 1rem;
    container-type: size;
    display: grid;
    place-content: center;
}

.letter-container {
    position: relative;
    background: #000000;
    height: 80cqmin;
    width: 80cqmin;
    aspect-ratio: 1;
    border: 1px solid #222;
    overflow: hidden;
}

.tape-wrapper {
    position: absolute;
    /* Übergänge leicht glätten für flüssige Sensor-Daten */
    transition: transform 0.05s ease-out, opacity 0.05s ease-out;
}

/* Transparente Basis auf dem Untergrund */
.tape-base {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Das ablösende, plastische Tape-Stück */
.tape-peel {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(245, 245, 245, 0.95); 
    filter: drop-shadow(4px 8px 16px rgba(0, 0, 0, 0.6)); 
    display: none;
    pointer-events: none;
    z-index: 10;
}

footer {
    padding: 0.8rem;
    background: #1a1a1a;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    max-height: 160px;
    overflow-y: auto;
    border-top: 1px solid #252525;
}

footer button {
    flex-grow: 1;
    border-radius: 4px;
    flex-basis: 2.5rem;
    padding: 0.6rem;
    background: #262626;
    color: #666;
    border: 1px solid #333;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

footer button:hover {
    color: #fff;
    background: #333;
}

footer button.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}