#flashcard-area {
    margin: calc(20px * var(--ui-scale)) 0;
    text-align: center;
}

.card {
    width: 90vw;
    max-width: calc(400px * var(--ui-scale));
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    perspective: 1000px;
    cursor: pointer;
}

.fc-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card.flipped .fc-inner {
    transform: rotateY(180deg);
}

.fc-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -moz-backface-visibility: hidden;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    border: calc(1px * var(--ui-scale)) solid #ccc;
    border-radius: calc(8px * var(--ui-scale));

    transform: translateZ(0);
}

.fc-back {
    transform: rotateY(180deg);
}

.fc-image-box {
    width: 100%;
    height: 70%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.fc-text {
    font-size: calc(2.4rem * var(--ui-scale));
}

.fc-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fc-nav {
    width: 100%;
    max-width: calc(300px * var(--ui-scale));
    display: flex;
    justify-content: space-between;
    margin-top: calc(12px * var(--ui-scale));
}

.fc-nav button {
    font-size: calc(1rem * var(--ui-scale));
    padding: calc(0.6rem * var(--ui-scale))
             calc(1rem * var(--ui-scale));
}
