/* Schlanke, einbettbare Adventskalenderfläche: passt in das Reality-Sound-iframe 580 × 540. */
html.calendar-document,
html.calendar-document body {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
}

.calendar-embed-body {
    display: grid;
    min-height: 0;
    place-items: center;
    overflow: hidden;
    background: #10251c;
}

.calendar-embed-body::before,
.calendar-embed-body .page-glow {
    display: none;
}

.calendar-viewport {
    display: grid;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    place-items: center;
}

.calendar-board {
    position: relative;
    width: min(100vw, 580px, 107.4vh);
    aspect-ratio: 29 / 27;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse at 18% 15%, rgba(240, 209, 135, .22), transparent 24%),
        radial-gradient(ellipse at 80% 86%, rgba(214, 166, 75, .14), transparent 30%),
        linear-gradient(145deg, #356c4c, #1a4936 46%, #0d3026);
    border: 5px solid #bb8f42;
    border-radius: 8px;
    box-shadow: inset 0 0 0 3px rgba(255, 239, 192, .48), 0 15px 38px rgba(0, 0, 0, .38);
}

.calendar-cover {
    position: absolute;
    z-index: -2;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.calendar-shade {
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background: transparent;
}

.calendar-brand {
    position: absolute;
    z-index: 1;
    top: 14px;
    left: 18px;
    display: flex;
    gap: 5px;
    flex-direction: column;
    color: #fff5d8;
    text-shadow: 0 2px 7px rgba(0, 0, 0, .75);
}

.calendar-brand strong {
    font-family: var(--display);
    font-size: clamp(16px, 3.6vw, 24px);
    font-weight: 400;
    line-height: 1;
}

.calendar-brand span {
    font-size: clamp(7px, 1.65vw, 10px);
    font-weight: 700;
    letter-spacing: .2em;
}

.calendar-doors {
    position: absolute;
    z-index: 2;
    inset: 61px 15px 34px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(0, 1fr));
    gap: 5px 7px;
    align-items: center;
    justify-items: center;
}

.calendar-door {
    position: relative;
    display: grid;
    width: min(100%, 72px);
    height: min(100%, 79px);
    min-width: 0;
    padding: 3px;
    color: #fff3ce;
    text-decoration: none;
    place-items: center;
    border: 2px solid rgba(255, 229, 166, .96);
    border-radius: 5px;
    background: transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .42), inset 0 0 0 1px rgba(48, 28, 10, .25);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.calendar-door::before {
    position: absolute;
    inset: 4px;
    pointer-events: none;
    content: "";
    border: 1px solid rgba(255, 242, 207, .82);
    border-radius: 2px;
}

.calendar-door-number {
    position: relative;
    z-index: 1;
    color: #fff4d5;
    font-family: var(--display);
    font-size: clamp(16px, 4.4vw, 28px);
    font-weight: 700;
    line-height: 1;
    -webkit-text-stroke: .35px rgba(36, 20, 7, .7);
    text-shadow: 0 2px 4px rgba(0, 0, 0, .95), 0 0 8px rgba(0, 0, 0, .72);
}

.calendar-door[href] {
    cursor: pointer;
}

.calendar-door[href]:hover,
.calendar-door[href]:focus-visible {
    z-index: 4;
    filter: brightness(1.1);
    transform: translateY(-3px) rotate(-2deg) scale(1.04);
    box-shadow: inset 0 0 0 2px rgba(119, 74, 29, .18), 0 7px 13px rgba(0, 0, 0, .48);
}

.calendar-door[href]:focus-visible {
    outline: 2px solid #fff3cf;
    outline-offset: 2px;
}

.door-variation-2 { transform: rotate(1.5deg); }
.door-variation-3 { transform: rotate(-1.2deg); }
.door-variation-4 { transform: rotate(.8deg); }
.door-variation-5 { transform: rotate(-.5deg); }

.calendar-door-open {
    border-color: #fff0bd;
}

.calendar-door-open .calendar-door-number,
.calendar-door-locked .calendar-door-number,
.calendar-door-pending .calendar-door-number {
    color: #fff4d5;
}

.calendar-door-pending {
    opacity: .88;
}

.calendar-greeting {
    position: absolute;
    right: 17px;
    bottom: 10px;
    z-index: 2;
    color: #fff2d0;
    font-family: var(--display);
    font-size: clamp(8px, 1.8vw, 12px);
    font-style: italic;
    text-shadow: 0 2px 5px rgba(0, 0, 0, .8);
}

.dialog-lock-mark {
    font-size: 2rem;
}

.calendar-notice {
    position: fixed;
    right: 8px;
    bottom: 8px;
    left: 8px;
    z-index: 10;
    width: auto;
    margin: 0;
    padding: 8px 10px;
    color: #fff3d1;
    background: rgba(9, 26, 21, .95);
    font-size: .75rem;
}

.calendar-notice a {
    margin-left: 5px;
}

@media (max-height: 400px) {
    .calendar-brand { top: 7px; left: 12px; }
    .calendar-doors { inset: 42px 10px 26px; gap: 3px 5px; }
    .calendar-door { height: min(100%, 55px); }
    .calendar-greeting { bottom: 5px; }
}

@media (prefers-reduced-motion: reduce) {
    .calendar-door { transition: none; }
}
