.book-column {
    max-width: 440px;
    margin: 0 auto;
    padding-bottom: 56px;
}

@media (min-width: 721px) {
    .book-column {
        width: 90vw;
        max-width: 90vw;
        padding-inline: 0;
    }

    .book-app {
        width: 440px;
        margin-inline: auto;
        zoom: calc(90vw / 440px);
    }

    .book-share {
        width: min(440px, 100%);
        margin-inline: auto;
    }
}

.book-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 88 / 125;
    perspective: 1600px;
    filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .45));
    touch-action: pan-y;
}

.book-sheet {
    position: absolute;
    inset: 0;
    overflow: auto;
    border-radius: 4px 14px 14px 4px;
    transform-origin: left center;
    backface-visibility: hidden;
}

.book-sheet[hidden] { display: none !important; }

.book-sheet::before {
    content: "";
    position: absolute;
    z-index: 3;
    left: 0;
    top: 0;
    bottom: 0;
    width: 16px;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, .28), rgba(0, 0, 0, 0) 80%);
}

.sheet-cover {
    container-type: inline-size;
    color: #f3e2b0;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 220, 160, .16), transparent 32%),
        repeating-linear-gradient(118deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 4px),
        linear-gradient(165deg, #6e1c28 0%, #3c0e16 48%, #1a0609 100%);
}

.cover-hit {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 22px 18px 16px;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    font: inherit;
    text-align: center;
}

.cover-frame {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 22px 14px;
    box-shadow:
        inset 0 0 0 1px rgba(230, 194, 122, .85),
        inset 0 0 0 7px transparent,
        inset 0 0 0 8px rgba(230, 194, 122, .45);
}

.cover-emblem {
    width: min(46cqi, 168px);
    height: auto;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
}

.cover-club {
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    line-height: 1.35;
}

.cover-rule {
    display: block;
    width: 42%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e6c27a, transparent);
}

.cover-title {
    font-family: "28DaysLater", Impact, "Arial Black", sans-serif;
    font-size: clamp(1.7rem, 8vw, 2.5rem);
    letter-spacing: .08em;
    line-height: .95;
    margin: 0;
}

.foil { color: #e6c27a; text-shadow: 0 1px 0 #6a4e22; }

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .foil {
        background: linear-gradient(180deg, #fff6d8 0%, #e6c27a 45%, #a67c3d 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }
}

.cover-hint {
    margin-top: 12px;
    font-size: .75rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #e6c27a;
}

.sheet-cover.has-add .cover-hit { padding-bottom: 72px; }

.sheet-cover .btn.cover-stamp {
    position: absolute;
    z-index: 2;
    left: 16px;
    right: 16px;
    bottom: 12px;
    margin-top: 0;
    color: #f3e2b0;
    border-color: #e6c27a;
    background: rgba(26, 6, 9, .55);
}

.sheet-cover .btn.cover-stamp:hover { background: #6e1c28; color: #fff; }

.sheet-paper {
    color: #24180f;
    background-color: #f4efe4;
    background-image:
        repeating-linear-gradient(115deg, rgba(110, 40, 36, .05) 0 1px, transparent 1px 13px),
        repeating-linear-gradient(65deg, rgba(28, 58, 96, .045) 0 1px, transparent 1px 15px);
}

.sheet-id { container-type: inline-size; }

.guilloche {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: .55;
    pointer-events: none;
}

.id-page {
    position: relative;
    z-index: 1;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 22px 16px 12px 22px;
}

.id-kicker {
    margin: 0;
    font-size: .72rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #7a3a3a;
}

.sheet-id h2 {
    margin: 2px 0 12px;
    font-family: "28DaysLater", Impact, sans-serif;
    font-size: 1.8rem;
    font-weight: normal;
    letter-spacing: .04em;
}

.id-top {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 10px;
    align-items: start;
}

.id-photo {
    aspect-ratio: 1;
    border: 3px double #8a6a32;
    background: #efe4d2;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.id-photo img { width: 100%; height: 100%; object-fit: cover; }

.id-initials {
    font-family: "28DaysLater", Impact, sans-serif;
    font-size: 1.8rem;
    letter-spacing: .06em;
    color: #6e1c28;
}

.id-fields { margin: 0; }

.id-fields div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 4px 0;
    border-bottom: 1px solid rgba(90, 40, 30, .16);
}

.id-fields dt {
    font-size: .68rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6d5344;
}

.id-fields dd {
    margin: 0;
    font-weight: 700;
    line-height: 1.3;
}

.id-fields a { color: #6e1c28; }

.id-fields-full { margin-top: 8px; }

.mrz {
    margin: auto 0 0;
    padding-top: 8px;
    border-top: 1px solid rgba(90, 40, 30, .28);
    font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace;
    font-size: 0.55rem;
    line-height: 1.35;
    letter-spacing: 0;
    color: #3a2a22;
    user-select: none;
}

.mrz span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
}

@supports (font-size: 1cqi) {
    .mrz { font-size: 2.25cqi; }
}

.sheet-stamp {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    gap: 16px;
    padding: 28px 18px 24px 26px;
}

.stamp-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
    color: #24180f;
    text-decoration: none;
}

.stamp-link:hover .ink-stamp,
.stamp-link:focus-visible .ink-stamp {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25), 0 0 0 2px currentColor;
}

.stamp-cigars {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 4px 10px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6e1c28;
    text-decoration-color: #6e1c28;
}

.stamp-cigars:hover,
.stamp-cigars:focus-visible { color: #4a1018; }

.ink-stamp {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 84%;
    padding: 16px 14px;
    text-align: center;
    transform: rotate(var(--tilt));
    border: 4px double currentColor;
    background: rgba(255, 255, 255, .28);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25);
}

.ink-logo {
    position: absolute;
    z-index: 0;
    inset: 10%;
    background: var(--logo) center / contain no-repeat;
    opacity: .22;
    pointer-events: none;
    border-radius: inherit;
}

.ink-stamp::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: .45;
    background-image: radial-gradient(rgba(0, 0, 0, .28) 0.55px, transparent 0.7px);
    background-size: 3px 3px;
    mix-blend-mode: multiply;
}

.ink-red { color: #8f1d28; }
.ink-blue { color: #1a3d86; }
.ink-green { color: #1b5c38; }
.ink-purple { color: #5b2b80; }

.shape-round { width: 76%; aspect-ratio: 1; border-radius: 50%; }
.shape-oval { width: 90%; aspect-ratio: 1.65; border-radius: 50%; }
.shape-rect { width: 88%; aspect-ratio: 1.5; border-radius: 8px; }

.ink-place, .ink-date {
    position: relative;
    z-index: 1;
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ink-stamp h2 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.15;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: inherit;
    overflow-wrap: anywhere;
}

.ink-stars { position: relative; z-index: 1; letter-spacing: .14em; font-size: .95rem; }

/* Lower corner reserved for a future verified mark. Empty while verified_at is null. */
.ink-verify {
    position: absolute;
    z-index: 2;
    right: 14%;
    bottom: 11%;
    min-width: 1.15rem;
    min-height: 1.15rem;
    font-size: .62rem;
    letter-spacing: .14em;
    line-height: 1;
    text-transform: uppercase;
}

.ink-verify[hidden] { display: none !important; }

.ink-note {
    margin: 0;
    max-width: 32ch;
    text-align: center;
    font-style: italic;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.ink-cigars {
    list-style: none;
    margin: 0;
    padding: 0;
    width: min(100%, 28rem);
    text-align: center;
}

.ink-cigars li {
    margin: 0 0 10px;
}

.ink-cigar-name {
    display: block;
    font-weight: 700;
}

.ink-cigar-stars {
    letter-spacing: .12em;
    color: #6e1c28;
}

.ink-cigar-review {
    display: block;
    font-style: italic;
    font-size: .92rem;
}

.sheet-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 24px 32px 32px;
}

.sheet-empty h2 {
    margin: 0 0 10px;
    font-family: "28DaysLater", Impact, sans-serif;
    font-size: clamp(1.7rem, 7vw, 2.2rem);
    font-weight: normal;
    line-height: 1.05;
}

.sheet-empty p { margin: 0 0 8px; }

.book-sheet .btn {
    color: #4a1018;
    border-color: #6e1c28;
}

.book-sheet .btn:hover { background: #6e1c28; color: #fff; }

.book-sheet :focus-visible { outline-color: #6e1c28; }

.book-controls {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
}

.book-controls .btn {
    margin-top: 0;
    padding: 8px 10px;
}

.book-links {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.book-links .btn {
    flex: 1 1 8rem;
    margin-top: 8px;
    min-height: 44px;
}

.book-links .book-physical { flex-basis: 100%; }

.book-controls a[aria-disabled="true"] {
    opacity: .4;
    pointer-events: none;
}

.book-indicator {
    margin: 0;
    text-align: center;
    color: var(--muted);
    font-size: .85rem;
    overflow-wrap: anywhere;
}

.book-stamp { margin: 8px 0 0; }

.book-stamp .btn {
    width: 100%;
    margin-top: 0;
}

.book-share { margin-top: 22px; }

.book-sheet.leave-next { z-index: 3; animation: book-leave-next 420ms ease forwards; }
.book-sheet.enter-next { z-index: 2; animation: book-enter-next 420ms ease forwards; }
.book-sheet.leave-prev { z-index: 2; animation: book-leave-prev 420ms ease forwards; }
.book-sheet.enter-prev { z-index: 3; animation: book-enter-prev 420ms ease forwards; }

@keyframes book-leave-next {
    from { transform: rotateY(0); }
    to { transform: rotateY(-96deg); }
}

@keyframes book-enter-next {
    from { transform: translateX(8%); opacity: .35; }
    to { transform: none; opacity: 1; }
}

@keyframes book-leave-prev {
    from { transform: none; opacity: 1; }
    to { transform: translateX(10%); opacity: 0; }
}

@keyframes book-enter-prev {
    from { transform: rotateY(-90deg); }
    to { transform: rotateY(0); }
}

@media (max-width: 720px) {
    .book-column {
        width: 90vw;
        max-width: 90vw;
        padding-inline: 0;
    }

    .book-app { width: 100%; }

    .book-stage {
        width: 440px;
        margin-inline: auto;
        zoom: calc(90vw / 440px);
    }

    .book-share {
        width: min(440px, 100%);
        margin-inline: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .book-sheet.leave-next,
    .book-sheet.enter-next,
    .book-sheet.leave-prev,
    .book-sheet.enter-prev {
        animation: none;
    }
}

/* Member photos on stamp pages */
.stamp-photo-btn {
    position: absolute;
    z-index: 4;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #6e1c28;
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 0 0 1.5px rgba(110, 28, 40, .55);
    text-decoration: none;
}
.stamp-photo-btn:hover,
.stamp-photo-btn:focus-visible { color: #fff; background: #6e1c28; }
.stamp-photo-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #6e1c28;
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}
.stamp-photos { width: 100%; text-align: center; }
.stamp-photos-title {
    margin: 0 0 6px;
    font-size: .7rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6d5344;
}
.stamp-photo-strip {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
}
.stamp-photo-strip a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 4px; box-shadow: 0 0 0 1px rgba(90, 40, 30, .3); }
.stamp-photo-strip img { width: 100%; height: 100%; object-fit: cover; }
.stamp-photos-all {
    display: inline-block;
    margin-top: 4px;
    padding: 8px 6px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6e1c28;
}
