.resident-id-showcase {
    flex: 1;
    min-width: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 10px;
    overflow: visible;
}

.resident-id-card {
    --paper-top: #f4f5f6;
    --paper-bottom: #eaecef;
    --ink: #2a2f35;
    --label: #9096a2;
    --title: #6a707c;
    --dash: rgba(0, 0, 0, 0.1);
    --portrait-width: 84px;
    --portrait-height: 126px;

    width: 304px;
    max-width: 100%;
    padding: 24px 24px 14px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--paper-top) 0%, var(--paper-bottom) 100%);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 15px 18px rgba(0, 0, 0, 0.3);
    color: var(--ink);
    transform: rotate(3deg);
    transform-origin: center;
    animation: resident-id-card-float 5.5s ease-in-out infinite;
}

@keyframes resident-id-card-float {
    0%, 100% {
        transform: rotate(3deg) translateY(0);
    }
    50% {
        transform: rotate(3deg) translateY(-4px);
    }
}

.resident-id-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--dash);
}

.resident-id-card__title {
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--title);
}

.resident-id-card__app-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 0.5px solid rgba(106, 112, 124, 0.25);
    object-fit: cover;
    flex-shrink: 0;
}

.resident-id-card__body {
    display: grid;
    grid-template-columns: var(--portrait-width) minmax(0, 1fr);
    column-gap: 20px;
    align-items: start;
    padding-top: 20px;
}

.resident-id-card__portrait {
    width: var(--portrait-width);
    height: var(--portrait-height);
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #111;
}

.resident-id-card__portrait picture,
.resident-id-card__portrait img {
    display: block;
    width: var(--portrait-width);
    height: var(--portrait-height);
    max-width: none;
}

.resident-id-card__portrait img {
    object-fit: cover;
    object-position: center center;
}

.resident-id-card__fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 2px;
    min-width: 0;
}

.resident-id-card__field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.resident-id-card__label {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--label);
}

.resident-id-card__value {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    color: var(--ink);
    line-height: 1.3;
    word-break: break-word;
}

.resident-id-card__footer {
    margin-top: 14px;
    padding: 10px 0 0;
    text-align: left;
    border-top: 1px dashed var(--dash);
}

.resident-id-card__barcode {
    display: flex;
    align-items: stretch;
    gap: 1.2px;
    height: 28px;
    width: 100%;
    opacity: 0.85;
}

.resident-id-card__barcode span {
    display: block;
    height: 100%;
    background: #121417;
}

@media (max-width: 768px) {
    .resident-id-showcase {
        padding: 8px 0 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .resident-id-card {
        animation: none;
    }
}
