/* =========================
   PREMIUM-LAYER
========================= */
#premiumOverlay [hidden] {
    display: none !important;
}

#premiumOverlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: none;
    z-index: 10003;
    background: rgba(0, 0, 0, 0.82);
}

#premiumOverlay .premium-inner {
    position: relative;
}

#premiumOverlay .premium-close-top {
    position: sticky;
    top: 0;
    float: right;
    z-index: 2;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    font-family: Arial, sans-serif;
    font-size: 26px;
    line-height: 1;
}


#premiumOverlay .premium-inner,
#premiumOverlay .premium-inner h2,
#premiumOverlay .premium-inner h3,
#premiumOverlay .premium-inner p,
#premiumOverlay .premium-inner li,
#premiumOverlay .premium-inner label,
#premiumOverlay .premium-inner small,
#premiumOverlay .premium-inner strong,
#premiumOverlay .premium-inner code,
#premiumOverlay .premium-status-line {
    color: #000;
}

.premium-intro {
    max-width: 680px;
    margin: 6px auto 16px;
    font-size: 1.08em;
    line-height: 1.45;
}

.premium-message {
    max-width: 680px;
    margin: 10px auto 16px;
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.24);
    background: rgba(255, 255, 255, 0.22);
    color: #000;
    font-weight: 700;
}

.premium-message.success {
    background: rgba(42, 130, 72, 0.16);
}

.premium-message.error {
    background: rgba(160, 44, 44, 0.16);
}

.premium-status-card,
.premium-auth-card,
.premium-paypal-card,
.premium-feature-card {
    max-width: 720px;
    margin: 16px auto;
    padding: 14px 16px;
    border: 1px solid rgba(0, 0, 0, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    text-align: left;
}

.premium-status-card h3,
.premium-auth-card h3,
.premium-paypal-card h3,
.premium-feature-card h3 {
    margin: 0 0 10px;
    text-align: center;
}

.premium-auth-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 8px 0 12px;
}

#premiumOverlay button,
.premium-button {
    background: transparent;
    color: #000;
    border: 1px solid #000;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: 'EB Garamond', serif;
    font-size: 1.02em;
    cursor: pointer;
    text-decoration: none;
}

#premiumOverlay button:hover,
.premium-button:hover,
.premium-tab.active {
    background: rgba(0, 0, 0, 0.08);
}

.premium-button-primary {
    font-weight: 700;
}

.premium-form-row {
    display: grid;
    gap: 6px;
    margin: 10px auto;
    max-width: 520px;
}

.premium-form-row input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid rgba(0, 0, 0, 0.38);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.34);
    color: #000;
    font-family: 'EB Garamond', serif;
    font-size: 1.02em;
}

.premium-button-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.premium-status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.34);
    background: rgba(0,0,0,0.06);
    font-weight: 700;
}

.premium-status-pill.active {
    background: rgba(42, 130, 72, 0.16);
}

.premium-status-pill.pending {
    background: rgba(160, 114, 36, 0.16);
}

.premium-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.premium-feature-placeholder {
    border: 1px dashed rgba(0, 0, 0, 0.32);
    border-radius: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.12);
}

.premium-small-note {
    display: block;
    margin-top: 8px;
    opacity: 0.78;
    line-height: 1.35;
}

#premiumPayPalButtons {
    max-width: 360px;
    margin: 12px auto;
}

@media (max-width: 768px) {
    .premium-feature-grid {
        grid-template-columns: 1fr;
    }
}
/* Premium-Layer: Inhalt auf kleinen Screens scrollbar machen */
#premiumOverlay {
    overflow: hidden;
}

#premiumOverlay .premium-content {
    overflow: hidden;
}

#premiumOverlay .premium-inner {
    max-height: min(86vh, 920px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* Mobile etwas mehr nutzbare Höhe */
@media (max-width: 768px) {
    #premiumOverlay .premium-inner {
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
    }
}

@media (max-width: 480px) {
    #premiumOverlay .premium-inner {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
    }
}