/* Black card (core/rsvp/180, fork of core/rsvp/130), INV-19 After Dark · Luxe (A2695, D-400): PLEASE with "rsvp" in script, the reply-by date, then one card of
   raised black inside a fine candle-coloured line, with lines to write on, "Dear Emma & James" in the candle-coloured script and the guest's name written in script a
   letter at a time by the script's own signature mirror. Send is filled with the couple's lifted colour (skin, Risk 4). The script is unchanged, line for line: Send
   saves, then WhatsApp opens 4 s later (D-156). No seal on Send (INV-12's), no drawing and no post (INV-16's), no gold foil (INV-17's). */
.rs180 { position: relative; padding: var(--k-section-pad) var(--k-gutter) 0; text-align: center; color: var(--k-ink); }
.rs180 .rs180__side { display: flex; flex-direction: column; align-items: center; }
.rs180 .rs180__by { margin-top: 18px; }
.rs180 .rs180__s { margin: 6px 0 22px; text-wrap: balance; }
/* under the sheet, so it can't push the letter down when it appears after Send */
.rs180-mine { margin: 22px auto 0; }
.rs180-mine__t { margin-bottom: 12px; font-size: 1rem; }
.rs180__plain { margin-top: 8px; }
/* One card of raised black. The couple's colour reaches it lifted halfway to ivory (skin --k-ad-accent), so Send and the marks always read. */
.rs180-form { position: relative; display: grid; gap: 0; max-width: 500px; margin: 0 auto; padding: clamp(28px, 6vw, 46px) clamp(24px, 6vw, 46px) 28px; text-align: left; color: var(--k-ink); color-scheme: dark; }
.rs180-form::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgb(216 180 122 / .3); pointer-events: none; }
.rs180-form select option { color: #141414; background: #fff; }
.rs180-form input:-webkit-autofill { -webkit-box-shadow: 0 0 0 60px #15120F inset; -webkit-text-fill-color: #F2EBDD; }
.rs180 .rs180-dear { margin: 0 0 14px; padding: .1em 0; color: var(--k-champ); font-size: calc(clamp(52px, 14.4vw, 68px) * var(--k-ad-z)); line-height: .95; text-align: left; text-wrap: balance; overflow-wrap: anywhere; }
.rs180__ink, .rs180-yes { display: grid; gap: 0; }
.rs180-yes[hidden] { display: none; }
/* fields are lines on the sheet */
.rs180-field, .rs180-choice { display: block; min-width: 0; margin: 0; padding: 14px 0 0; border: 0; border-radius: 0; background: transparent; }
.rs180-field__l { display: block; margin-bottom: 2px; padding: 0; font: italic 400 1.0625rem/1.3 var(--k-font-body); color: var(--k-ink-soft); }
.rs180-field:has(select) { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 2px; border-bottom: 1px solid var(--k-ad-line); }
.rs180-field:has(select) .rs180-field__l { margin: 0; }
.rs180-field:has(select) .rs180-input { width: 62px; min-height: 36px; border: 0; font: 400 1.5rem/1 var(--k-font-body); text-align: right; padding-right: 22px; }
.rs180-field__l i { font-style: normal; font-weight: 400; color: var(--k-ink-soft); }
.rs180-choice { display: grid; grid-template-columns: 1fr 1fr; padding-top: 0; }
.rs180-choice legend { float: left; width: 100%; grid-column: 1 / -1; margin-bottom: 8px; }
.rs180-opt { position: relative; display: grid; justify-items: center; gap: 8px; padding: 6px 0; text-align: center; cursor: pointer; font-size: 1.0625rem; line-height: 1.25; }
.rs180-opt input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
/* accept or decline, a choice lands in three held frames */
.rs180-opt__i { width: 40px; height: 38px; fill: transparent; stroke: var(--k-ad-line); stroke-width: 1.5; transition: fill .2s; }
.rs180-opt__i--no { fill: none; stroke-width: 2; stroke-linecap: round; }
.rs180-opt input:checked ~ .rs180-opt__i--yes { fill: var(--k-ad-accent); stroke: var(--k-ad-accent); }
.rs180-opt input:checked ~ .rs180-opt__i--no { stroke: var(--k-ink); stroke-width: 3; }
.rs180-opt input:checked ~ .rs180-opt__i { animation: rs180-pick 320ms steps(3, end); }
@keyframes rs180-pick { from { transform: scale(.82); } }
.rs180-opt input:checked ~ .rs180-opt__t { font-weight: 400; }
.rs180-opt input:focus-visible ~ .rs180-opt__i { outline: 2px solid var(--k-ad-accent); outline-offset: 3px; }
.rs180-input, .rs180-sig__in { display: block; width: 100%; min-height: 40px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--k-ad-line); border-radius: 0; background: transparent; color: var(--k-ink); font: 400 max(16px, 1.0625rem)/1.3 var(--k-font-body); -webkit-appearance: none; appearance: none; }
.rs180-input:focus, .rs180-sig__in:focus { outline: none; border-bottom-color: var(--k-ad-accent); }
.rs180-input:is(select) { padding-right: 20px; background: linear-gradient(45deg, transparent 50%, var(--k-ink) 50%) right 8px center / 6px 6px no-repeat, linear-gradient(-45deg, transparent 50%, var(--k-ink) 50%) right 2px center / 6px 6px no-repeat; }
/* a note on ruled lines */
.rs180-input--note { min-height: 96px; padding: 0; border: 0; font: italic 400 1.1875rem/32px var(--k-font-body); background: repeating-linear-gradient(transparent 0 31px, color-mix(in srgb, var(--k-ad-line) 55%, transparent) 31px 32px); background-attachment: local; resize: vertical; }
/* the name, written: the field's own text is see-through, and the mirror on it wipes each new letter on (section.js) */
.rs180-sig { position: relative; display: block; }
.rs180 .rs180-sig__in { height: 54px; min-height: 54px; padding: 12px 0 2px; font: 400 calc(38px * var(--rs180-k, 1))/40px var(--k-font-script); color: transparent; -webkit-text-fill-color: transparent; caret-color: var(--k-ink); }
.rs180-sig__ink { position: absolute; left: 0; top: 0; display: flex; align-items: center; height: 54px; padding: 12px 0 2px; font: 400 calc(38px * var(--rs180-k, 1))/40px var(--k-font-script); color: var(--k-ink); white-space: pre; pointer-events: none; clip-path: inset(-.6em -.8em -.6em -.8em); }
.rs180-sig__ink.is-writing { transition: clip-path var(--rs180-wt, .16s) linear; }
html.motion-reduce .rs180-sig__ink.is-writing { transition: none; }
.rs180-help { margin: 8px 0 2px; padding: 0; font: italic 400 .9375rem/1.3 var(--k-font-body); color: var(--k-ink-soft); }
.rs180-evs { display: grid; gap: 0; }
.rs180-day { padding: 6px 4px 0; font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; }
.rs180-ev { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; padding: 8px 0 4px; border-bottom: 1px solid color-mix(in srgb, var(--k-ad-line) 45%, transparent); }
.rs180-ev__n { font-weight: 400; }
.rs180-ev__d { grid-row: 2; font-size: .9375rem; color: var(--k-ink-soft); }
.rs180-ev .rs180-ev__c { grid-column: 2; grid-row: 1 / span 2; width: auto; min-width: 62px; min-height: 34px; border: 0; font: 400 1.25rem/1 var(--k-font-body); text-align: right; padding-right: 22px; }
.rs180-extra { display: grid; gap: 0; }
.rs180-late, .rs180-err { padding: 0 4px; font-size: .96875rem; }
.rs180-err { color: var(--k-ad-accent); }
.rs180-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rs180 .rs180-send { justify-self: center; min-height: 50px; margin-top: 22px; padding: 0 60px; font-size: .875rem; }
.rs180-small { margin-top: 12px; text-align: center; font-size: .875rem; font-style: italic; color: var(--k-ink-soft); }
.rs180 .rs180-thanks { margin: 4px 0 0; text-align: center; font: 400 1.0625rem/1.5 var(--k-font-body); }
.rs180 .rs180-thanks[hidden], .rs180 .rs180-extra:empty { display: none; }
/* after Send: the chosen heart or cross and the thanks stay; the fields fold away (is-sent, is-chosen: the script's) */
.rs180 .rs180-form.is-sent .rs180-field, .rs180 .rs180-form.is-sent .rs180-send, .rs180 .rs180-form.is-sent .rs180-small, .rs180 .rs180-form.is-sent .rs180-yes,
.rs180 .rs180-form.is-sent .rs180-late, .rs180 .rs180-form.is-sent .rs180-err, .rs180 .rs180-form.is-sent .rs180-opt:not(.is-chosen), .rs180 .rs180-form.is-sent .rs180-choice > .rs180-field__l { display: none; }
.rs180 .rs180-form.is-sent .rs180-choice { grid-template-columns: 1fr; background: transparent; }
/* The card on one clock: the fields fade, then the thank-you arrives as the card eases shut (section.js, A2324) */
.rs180 .rs180-form.is-closing :is(.rs180-field, .rs180-yes, .rs180-send, .rs180-small, .rs180-extra, .rs180-opt) { opacity: 0; transition: opacity .45s ease; }
/* the script adds the thank-you just before it holds the height, so it takes no room until the fields are gone, or the sheet hops taller first */
.rs180 .rs180-form:not(.is-sent) .rs180-thanks { position: absolute; visibility: hidden; }
.rs180 .rs180-form.is-sent .rs180-thanks { animation: rs180-thanks 1.1s ease .5s backwards; }
@keyframes rs180-thanks { from { opacity: 0; } }
@media (min-width: 900px) { /* the drawing and words beside the form, so a reply isn't one long column */
  .rs180 .rs180__card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(32px, 6vw, 96px); max-width: 1060px; margin: 0 auto; }
  .rs180 .rs180__card:not(:has(.rs180-form)) { grid-template-columns: minmax(0, 1fr); }
  .rs180 .rs180-mine { grid-column: 2; }
  .rs180 .rs180-form { margin: 0; max-width: none; width: 100%; }
}
.rs180 .rs180__note { font-style: italic; color: var(--k-ink-soft); }

/* W1.2 (A2708, D-405): on a laptop with the skin's photo wall, the reply goes back to one column (words, then the form) in the centred column, as the
   owner's pick L1, and the wall fills both sides. Without a wall (fewer than four photos) the words stay beside the form. */
@media (min-width: 1000px) and (orientation: landscape) {
  .rs180 { position: relative; isolation: isolate; }
  .rs180:has(> .k-ad-wall) .rs180__card { display: block; max-width: calc(var(--k-ad-col) - 48px); }
  .rs180:has(> .k-ad-wall) .rs180-form { max-width: 500px; margin: 0 auto; }
}
