.pup-preview {
    --pup-radius: 22px;
    width: min(100%, 390px);
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #17181a;
}

.pup-preview *, .pup-preview *::before, .pup-preview *::after { box-sizing: border-box; }

.pup-pass-card {
    position: relative;
    overflow: hidden;
    min-height: 430px;
    border-radius: var(--pup-radius);
    background: var(--pup-background);
    color: var(--pup-foreground);
    box-shadow: 0 18px 44px rgba(17, 24, 39, .18), 0 2px 8px rgba(17, 24, 39, .10);
    background-position: center;
    background-size: cover;
}

.pup-pass-card--artwork::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.48), rgba(0,0,0,.08) 40%, rgba(0,0,0,.70));
}

.pup-pass-card--artwork > * { position: relative; z-index: 1; }

.pup-pass-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 16px 18px;
}

.pup-pass-header__logo {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: contain;
    background: rgba(255,255,255,.88);
}

.pup-preview--google .pup-pass-header__logo { border-radius: 50%; }
.pup-pass-header__copy { min-width: 0; display: grid; gap: 2px; flex: 1; }
.pup-pass-header__organization { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pup-pass-header__title { font-size: 12px; opacity: .78; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pup-pass-header__thumbnail { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; }
.pup-pass-strip { display: block; width: 100%; aspect-ratio: 375 / 123; object-fit: cover; }
.pup-pass-body { display: grid; gap: 14px; padding: 16px 18px 20px; }
.pup-pass-description { margin: 0; font-size: 14px; line-height: 1.4; opacity: .86; }

.pup-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 12px; }
.pup-fields--primary { grid-template-columns: 1fr; }
.pup-fields--footer { grid-template-columns: 1fr; margin-top: 8px; text-align: left; }
.pup-fields--footer .pup-field__value { font-size: 12px; font-weight: 500; }
.pup-field { min-width: 0; display: grid; align-content: start; gap: 3px; }
.pup-field__label { color: var(--pup-label); font-size: 10px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.pup-field__value { color: var(--pup-foreground); font-size: 15px; line-height: 1.2; overflow-wrap: anywhere; }
.pup-fields--primary .pup-field__value, .pup-field--emphasized .pup-field__value { font-size: 28px; font-weight: 600; }
.pup-pass-card--artwork .pup-field__label { color: rgba(255,255,255,.76); }
.pup-pass-card--artwork .pup-field__value,
.pup-pass-card--artwork .pup-pass-header,
.pup-pass-card--artwork .pup-pass-description { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.pup-pass-card--artwork .pup-fields--footer { margin-top: 28px; }

.pup-barcode {
    justify-self: center;
    display: grid;
    justify-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 9px 11px;
    border-radius: 11px;
    background: #fff;
    color: #1b1c1e;
    box-shadow: 0 3px 12px rgba(17,24,39,.12);
}

.pup-barcode--square { width: 132px; }
.pup-barcode--linear { width: min(100%, 272px); }
.pup-barcode__image { display: block; max-width: 100%; height: auto; object-fit: contain; }
.pup-barcode--square .pup-barcode__image { width: 108px; aspect-ratio: 1; }
.pup-barcode--linear .pup-barcode__image { width: 250px; max-height: 76px; }
.pup-barcode__placeholder { width: 100%; background-color: #fff; }
.pup-barcode--square .pup-barcode__placeholder {
    width: 104px;
    aspect-ratio: 1;
    background-image: conic-gradient(from 90deg, #111 25%, #fff 0 50%, #111 0 75%, #fff 0);
    background-size: 14px 14px;
    border: 10px solid #111;
    box-shadow: inset 0 0 0 6px #fff;
}
.pup-barcode--linear .pup-barcode__placeholder {
    height: 62px;
    background: repeating-linear-gradient(90deg, #111 0 2px, #fff 2px 5px, #111 5px 9px, #fff 9px 11px);
}
.pup-barcode__message { max-width: 100%; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pup-apple-action-cards { display: grid; gap: 10px; margin-top: 14px; }
.pup-action {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    padding: 10px 13px;
    color: inherit;
    text-decoration: none;
}
.pup-action--apple { border: 1px solid #e2e5ea; border-radius: 15px; background: #fff; box-shadow: 0 5px 16px rgba(17,24,39,.08); }
.pup-action--google { border-top: 1px solid rgba(98,102,109,.18); padding-inline: 2px; }
.pup-action__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: color-mix(in srgb, var(--pup-accent) 14%, transparent); color: var(--pup-accent); font-weight: 700; }
.pup-action__copy { min-width: 0; display: grid; gap: 2px; }
.pup-action__label { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pup-action__detail { color: #6b7078; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pup-action__chevron { color: #90959d; font-size: 22px; }
.pup-action[aria-disabled="true"] { opacity: .48; pointer-events: none; }
.pup-google-actions { display: grid; margin-top: 2px; }

@media (max-width: 420px) {
    .pup-preview { width: 100%; }
    .pup-pass-card { border-radius: 18px; }
    .pup-pass-header, .pup-pass-body { padding-inline: 14px; }
}

@media (prefers-reduced-motion: no-preference) {
    .pup-action { transition: transform .16s ease, box-shadow .16s ease; }
    .pup-action[href]:hover { transform: translateY(-1px); }
    .pup-action--apple[href]:hover { box-shadow: 0 8px 20px rgba(17,24,39,.12); }
}
