/* ---- After the evening (aftercare.js): one-tap check-in with a stamp, and the sequel offer ---- */

/* The check-in: cover with its stamp, the question, four reactions (the shared decision bar, negative to
   positive, "Still watching" behind the gap) and a "Not yet" row of the deck's Pass and Save. */
.watch-checkin {
    grid-template-columns: 44px 52px minmax(0, 1fr) auto 44px;
    grid-template-areas:
        "mark cover copy answers close"
        "mark cover copy notyet close";
    column-gap: 16px;
    row-gap: 2px;
    align-items: center;
}
.watch-checkin-mark { grid-area: mark; align-self: stretch; }
.watch-checkin-copy { grid-area: copy; min-width: 0; }
.watch-checkin-copy h2 .watch-checkin-ask { color: inherit; }
.watch-checkin-later { grid-area: close; align-self: start; }

.watch-checkin-cover { grid-area: cover; position: relative; display: block; width: 52px; height: 74px; padding: 0; border: 0; background: var(--paper-deep); box-shadow: 3px 3px 0 rgba(18, 18, 18, .2); cursor: pointer; }
.watch-checkin-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.watch-checkin-cover.is-empty img { display: none; }
.watch-checkin-cover.is-empty::before { content: '続'; display: grid; place-items: center; height: 100%; color: var(--red); font: 400 24px/1 "Yu Mincho", "MS Mincho", serif; }
.watch-checkin-cover:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* The hanko lands in the middle of the cover (aftercare.js animates it in). */
.watch-checkin-stamp { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 46px; height: 46px; margin: -23px 0 0 -23px; border: 3px solid currentColor; border-radius: 7px; color: var(--red); background: rgba(242, 238, 223, .88); box-shadow: 2px 2px 0 rgba(18, 18, 18, .22); font: 400 27px/1 "Yu Mincho", "MS Mincho", serif; pointer-events: none; opacity: 0; visibility: hidden; transform: rotate(-9deg); }
.watch-checkin-stamp.is-on { opacity: 1; visibility: visible; }
.watch-checkin-stamp[data-outcome="okay"] { color: #7a6a48; }
.watch-checkin-stamp[data-outcome="not_for_me"] { color: var(--ink); }
/* "Not yet" lands as the deck's own hanko: 保 for Save, 否 for Pass. */
.watch-checkin-stamp[data-outcome="later"] { color: var(--decision-stamp-save, #7a6a48); }
.watch-checkin-stamp[data-outcome="drop"] { color: var(--decision-stamp-pass, var(--ink)); }
.watch-checkin-stamp[data-outcome="watching"] { color: var(--blue); }

.watch-checkin-copy .watch-checkin-more { margin: 2px 0 0; color: #6f6b62; font: italic 13px/1.4 Georgia, serif; }
.watch-checkin-more #watchCheckinCount:not(:empty)::before { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 7px 1px 0; border-radius: 50%; background: var(--red); }
/* "3 more in your notebook": a quiet link to Tonight's shelf, not a queue of questions. */
.watch-checkin-morelink { display: inline-flex; align-items: center; min-height: 32px; padding: 0; border: 0; color: inherit; background: none; font: inherit; text-align: left; text-decoration: underline; text-decoration-color: rgba(111, 107, 98, .5); text-underline-offset: 3px; cursor: pointer; }
.watch-checkin-morelink:hover { color: var(--red); text-decoration-color: currentColor; }
.watch-checkin-morelink:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

.watch-checkin-answers { grid-area: answers; align-self: end; width: min(540px, 100%); background: rgba(255, 255, 255, .2); }
.watch-checkin-answers > .decision { padding-left: 8px; padding-right: 8px; }
.watch-checkin button:disabled { opacity: .55; cursor: wait; }

.watch-checkin-notyet { grid-area: notyet; justify-self: end; align-self: start; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 0; color: #6f6b62; font: italic 14px/1.3 Georgia, serif; }
.watch-checkin-notyet .decision-row { gap: 6px; }

@media (max-width: 1100px) {
    .watch-checkin {
        grid-template-columns: 52px minmax(0, 1fr) 44px;
        grid-template-areas:
            "cover copy close"
            "answers answers answers"
            "notyet notyet notyet";
        column-gap: 12px;
        row-gap: 10px;
    }
    .watch-checkin-mark { display: none; }
    .watch-checkin-later { align-self: start; }
    .watch-checkin-answers { width: 100%; align-self: stretch; }
    .watch-checkin-notyet { justify-self: start; margin: 0; }
}
@media (max-width: 760px) {
    /* Two-line answers on a phone: "It was okay" and "Still watching" wrap under their seal. */
    .watch-checkin-answers > .decision { padding: 8px 3px; letter-spacing: .06em; }
}

/* The sequel offer: a small paper note under the check-in, or a sheet on other views. */
.sequel-offer { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "cover copy actions"; gap: 6px 16px; align-items: center; margin: 0 0 22px; padding: 12px 14px 12px 12px; border-left: 3px solid var(--red); color: var(--ink); background: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(18, 18, 18, .055) 28px); box-shadow: 6px 6px 0 #080808; }
.sequel-offer-cover { grid-area: cover; display: block; width: 56px; height: 80px; padding: 0; border: 0; overflow: hidden; background: var(--paper-deep); box-shadow: 3px 3px 0 rgba(18, 18, 18, .2); cursor: pointer; }
.sequel-offer-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sequel-offer-cover span { display: grid; place-items: center; height: 100%; color: var(--red); font: 400 26px/1 "Yu Mincho", "MS Mincho", serif; }
.sequel-offer-copy { grid-area: copy; min-width: 0; }
.sequel-offer .section-label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sequel-offer .section-label b { margin-right: 3px; font: 400 13px/1 "Yu Mincho", "MS Mincho", serif; letter-spacing: 0; }
.sequel-offer h3 { margin: 5px 0 0; font: 400 20px/1.2 Georgia, serif; letter-spacing: -.02em; overflow-wrap: anywhere; }
.sequel-offer-name { padding: 0; border: 0; color: var(--red); background: none; font: italic 400 20px/1.2 Georgia, serif; letter-spacing: -.02em; text-align: left; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; cursor: pointer; }
.sequel-offer-name:hover { text-decoration-color: currentColor; }
.sequel-offer-meta { margin: 4px 0 0; color: #6f6b62; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.sequel-offer-ask { margin: 3px 0 0; color: #6f6b62; font: italic 14px/1.45 Georgia, serif; }
/* "Not now" is quiet text on the left; Save is the deck's Save (decision.css) on the right. */
.sequel-offer-actions { grid-area: actions; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; }
.sequel-offer-actions .decision { padding: 0 18px; }
.sequel-offer button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

@media (max-width: 760px) {
    .sequel-offer { grid-template-columns: 56px minmax(0, 1fr); grid-template-areas: "cover copy" "cover actions"; align-items: start; gap: 10px 14px; box-shadow: 5px 5px 0 #080808; }
    .sequel-offer h3, .sequel-offer-name { font-size: 18px; }
    .sequel-offer-actions { justify-content: flex-start; }
    .sequel-offer-actions .decision { flex: 1 1 auto; }
    .deck-column > .sequel-offer { margin: 16px 0 0; }
}

.sequel-sheet { position: fixed; inset: auto 0 0; width: min(100%, 600px); max-width: 100%; max-height: 90svh; margin: 0 auto; padding: 0 0 env(safe-area-inset-bottom); overflow: visible; border: 0; color: var(--ink); background: transparent; }
.sequel-sheet:not([open]) { display: none; }
.sequel-sheet::backdrop { background: rgba(8, 8, 8, .62); animation: sequel-sheet-dim .3s ease-out; }
@keyframes sequel-sheet-dim { from { opacity: 0; } }
.sequel-sheet .sequel-offer { margin: 0; padding: 18px 18px 20px; border-top: 3px solid var(--red); border-left: 0; box-shadow: 0 -14px 40px rgba(0, 0, 0, .5); }
@media (min-width: 761px) {
    .sequel-sheet { bottom: 32px; }
    .sequel-sheet .sequel-offer { box-shadow: 8px 8px 0 #080808; }
}

@media (prefers-reduced-motion: reduce) {
    .sequel-sheet::backdrop { animation: none; }
}

/* "Why it didn't work" (askWhy): the sequel offer's paper note in ink, with the reasons as chips (nudge.css). */
.why-note { position: relative; display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-areas: "mark copy actions"; gap: 8px 16px; align-items: center; margin: 0 0 22px; padding: 14px 16px 14px 12px; border-left: 3px solid var(--ink); color: var(--ink); background: var(--paper); background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(18, 18, 18, .055) 28px); box-shadow: 6px 6px 0 #080808; }
/* The check-in's 否 seal, small and slightly turned, as if it had just been stamped. */
.why-note-mark { grid-area: mark; align-self: start; display: grid; place-items: center; width: 42px; height: 42px; margin-top: 2px; border: 2px solid currentColor; border-radius: 6px; color: var(--ink); font: 400 23px/1 "Yu Mincho", "MS Mincho", serif; transform: rotate(-9deg); }
.why-note-copy { grid-area: copy; min-width: 0; }
.why-note .section-label span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.why-note h3 { margin: 5px 0 0; font: 400 20px/1.2 Georgia, serif; letter-spacing: -.02em; }
.why-note-ask { margin: 3px 0 0; color: #6f6b62; font: italic 14px/1.45 Georgia, serif; }
.why-note .nudge-chips { margin-top: 12px; }
.why-note-actions { grid-area: actions; align-self: end; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; }
.why-note-actions .primary { min-height: 44px; padding: 0 20px; cursor: pointer; }
.why-note-actions .primary:disabled { opacity: .45; cursor: default; }
.why-note-actions .primary:disabled:hover { background: var(--ink); }
.why-note button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

@media (max-width: 760px) {
    .why-note { grid-template-columns: 42px minmax(0, 1fr); grid-template-areas: "mark copy" "actions actions"; align-items: start; gap: 12px 12px; box-shadow: 5px 5px 0 #080808; }
    .why-note-mark { width: 38px; height: 38px; font-size: 21px; }
    .why-note h3 { font-size: 18px; }
    .why-note .nudge-chip { padding: 0 13px; font-size: 14px; }
    .why-note .nudge-chip[aria-pressed="true"] { padding-left: 31px; }
    .why-note .nudge-chip[aria-pressed="true"]::before { left: 10px; }
    .why-note-actions { justify-content: space-between; }
    .deck-column > .why-note { margin: 16px 0 0; }
}

/* Away from Tonight it comes as a sheet (nudge.css frames it). */
.why-sheet .why-note { margin: 0; padding: 18px 18px 20px; border-top: 3px solid var(--red); border-left: 0; box-shadow: 0 -14px 40px rgba(0, 0, 0, .5); }
@media (min-width: 761px) {
    .why-sheet .why-note { border-top: 0; border-left: 3px solid var(--red); box-shadow: 8px 8px 0 #080808; }
}
