/* ==========================================================================
   Offline Parties
   Palette and type drawn from the Offline Essentials artwork: oatmeal paper,
   forest green, navy ink, caramel accents, dusty-rose hearts, and a classic
   serif with letterspaced capitals.
   ========================================================================== */

/* Shared with the Apricot Tree theme: cream paper, dark brown ink,
   terracotta (--op-caramel) for buttons and accents, sage (--op-forest)
   for selected states. */
.op-page,
.op-print-root {
  --op-paper: #f1ebe0;
  --op-cream: #f8f4ec;
  --op-line: #ddd5c8;
  --op-forest: #6f7d5e;
  --op-forest-deep: #2b211b;
  --op-navy: #26304a;
  --op-ink: #2b211b;
  --op-muted: #5b4e44;
  --op-caramel: #b5492b;
  --op-rose: #c99a8f;
  --op-serif: "Libre Caslon Text", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --op-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.op-page {
  font-family: var(--op-serif);
  color: var(--op-ink);
  padding-block: 1.5rem 4rem;
}

.op-page h1,
.op-page h2,
.op-page h3 {
  font-family: var(--op-serif);
  font-weight: 400;
  color: var(--op-forest-deep);
  letter-spacing: 0;
}

.op-page *,
.op-print-root * {
  box-sizing: border-box;
}

.op-page [hidden],
.op-print-root [hidden] {
  display: none !important;
}

.op-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--op-caramel);
}

.op-muted {
  color: var(--op-muted);
}

/* Buttons: beat the theme's `.woocommerce button.button` without !important. */
.op-page .op-button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.8em 1.6em;
  border: 1px solid var(--op-caramel);
  border-radius: 3px;
  background: var(--op-caramel);
  color: #fff;
  font-family: var(--op-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.op-page .op-button.button:hover,
.op-page .op-button.button:focus-visible {
  background: #97391f;
  border-color: #97391f;
  color: #fff;
}

.op-page .op-button.button:disabled {
  background: #b9b3a8;
  border-color: #b9b3a8;
  color: #fff;
  opacity: 1;
  cursor: progress;
}

.op-page .op-button--ghost.button {
  background: transparent;
  color: var(--op-caramel);
}

.op-page .op-button--ghost.button:hover,
.op-page .op-button--ghost.button:focus-visible {
  background: var(--op-caramel);
  color: #fff;
}

.op-page :focus-visible {
  outline: 2px solid var(--op-caramel);
  outline-offset: 2px;
}

/* Form fields */

.op-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0 0 1.1rem;
}

.op-field label,
.op-label,
.op-page legend {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--op-forest);
}

.op-field small {
  font-size: 0.85rem;
  color: var(--op-muted);
}

.op-page input[type="text"],
.op-page input[type="email"],
.op-page input[type="date"],
.op-page select,
.op-page textarea {
  width: 100%;
  padding: 0.7em 0.85em;
  border: 1px solid var(--op-line);
  border-radius: 3px;
  background: #fff;
  box-shadow: none;
  color: var(--op-ink);
  font-family: var(--op-serif);
  font-size: 1rem;
}

.op-page input:focus,
.op-page select:focus,
.op-page textarea:focus {
  border-color: var(--op-forest);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(62, 74, 61, 0.15);
}

.op-page textarea {
  resize: vertical;
  line-height: 1.5;
}

.op-page fieldset {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

.op-page legend {
  margin-bottom: 0.6rem;
  padding: 0;
}

.op-page legend span {
  text-transform: none;
  letter-spacing: 0;
  color: var(--op-muted);
  font-size: 0.85rem;
}

.op-status {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.95rem;
  color: var(--op-forest);
}

.op-status.is-error {
  color: #9b2c1f;
}

/* ==========================================================================
   The invitation card
   Sizes use container units so the card scales as one piece, from a phone
   preview up to a printed 5x7.
   ========================================================================== */

.op-card {
  --card-bg: var(--op-cream);
  --card-ink: var(--op-forest-deep);
  --card-accent: var(--op-caramel);
  --card-soft: var(--op-rose);
  --card-muted: var(--op-muted);
  --card-rule: rgba(62, 74, 61, 0.3);

  container-type: inline-size;
  position: relative;
  width: 100%;
  max-width: 30rem;
  margin: 0 auto;
  background: var(--card-bg);
  color: var(--card-ink);
  font-family: var(--op-serif);
  text-align: center;
  box-shadow: 0 1px 2px rgba(43, 42, 38, 0.08), 0 24px 48px -24px rgba(43, 42, 38, 0.45);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.op-card--evergreen {
  --card-bg: #3e4a3d;
  --card-ink: #f5efe4;
  --card-accent: #d9b48a;
  --card-soft: #e2b4a8;
  --card-muted: rgba(245, 239, 228, 0.75);
  --card-rule: rgba(245, 239, 228, 0.35);
}

.op-card--ink {
  --card-bg: #f3ede2;
  --card-ink: #26304a;
  --card-accent: #8a5a3b;
  --card-soft: #c48f84;
  --card-muted: #5b6072;
  --card-rule: rgba(38, 48, 74, 0.3);
}

/* Container units only resolve inside the card, so the frame carries the
   margin, and its minimum height keeps the card at 5:7 (7/5 = 140cqi)
   while still letting a long message grow it rather than spill out. */
.op-card__frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: calc(140cqi - 6.4cqi);
  margin: 3.2cqi;
  /* --art-top/--art-bottom: % of the card's height an uploaded design keeps
     clear of text (the card is 140cqi tall, so 1% = 1.4cqi). */
  padding: calc(7cqi + var(--art-top, 0) * 1.4cqi) 8cqi calc(5cqi + var(--art-bottom, 0) * 1.4cqi);
  border: 1px solid var(--card-rule);
  outline: 1px solid var(--card-rule);
  outline-offset: -1.6cqi;
}

/* Uploaded artwork fills the card; the text sits in the space it leaves,
   scaled down (to no less than 60%) when the art leaves less room than a
   plain card. --s multiplies every text size on the card. */
.op-card--art {
  --s: clamp(0.6, (100 - var(--art-top, 0) - var(--art-bottom, 0)) / 95, 1);
  background-color: var(--card-bg);
  background-image: var(--card-art, none);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.op-card--noframe .op-card__frame {
  border-color: transparent;
  outline-color: transparent;
}

.op-card--noframe .op-sprig {
  display: none;
}

.op-card--panel .op-card__body {
  padding: 5cqi 6cqi;
  border-radius: 1.5cqi;
  background: var(--card-panel);
}

.op-card__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4em;
  width: 100%;
  margin-block: auto;
  font-size: calc(1cqi * var(--s, 1));
}

.op-card p,
.op-card h1,
.op-card h2 {
  margin: 0;
  color: inherit;
}

.op-sprig {
  width: 32cqi;
  height: auto;
  color: var(--card-accent);
}

.op-card__kicker {
  font-size: 3em;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--card-accent);
}

.op-card .op-card__headline {
  font-family: var(--op-serif);
  font-size: 8.2em;
  font-weight: 400;
  line-height: 1.08;
  color: var(--card-ink);
  overflow-wrap: anywhere;
}

.op-card__format {
  font-size: 3.7em;
  font-style: italic;
  color: var(--card-accent);
}

.op-divider {
  width: 44em;
  height: auto;
  margin-block: 1.6em;
  color: var(--card-rule);
}

.op-divider__heart {
  fill: var(--card-soft);
}

.op-card__date {
  font-size: 3.5em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.op-card__time {
  font-size: 4em;
}

.op-card__where {
  margin-top: 1.6em;
}

.op-card__venue {
  font-size: 4em;
  font-weight: 700;
}

.op-card__address {
  font-size: 3.2em;
  color: var(--card-muted);
  white-space: pre-line;
}

.op-card__message {
  max-width: 88%;
  margin-top: 0.69em !important;
  font-size: 3.5em;
  font-style: italic;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.op-card__rsvp {
  margin-top: 0.86em !important;
  font-size: 2.8em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--card-accent);
}

.op-card__qr {
  display: none;
  align-items: center;
  gap: 3cqi;
  margin-top: 3cqi;
  font-size: 2.6cqi;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: left;
}

.op-card__qr-code {
  width: 15cqi;
  padding: 1cqi;
  background: #fff;
  line-height: 0;
}

.op-card__qr-code svg {
  width: 100%;
  height: auto;
}

.op-card__brand {
  display: flex;
  flex-direction: column;
  gap: 0.24em;
  margin-top: 3cqi !important;
  font-size: calc(2.5cqi * var(--s, 1));
  letter-spacing: 0.26em;
  text-transform: uppercase;
  opacity: 0.8;
}

.op-card__brand span {
  font-style: italic;
  letter-spacing: 0.08em;
  text-transform: none;
}

/* ==========================================================================
   Guest page
   ========================================================================== */

.op-invite {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.op-reserve {
  padding: clamp(1.25rem, 4vw, 2.25rem);
  border: 1px solid var(--op-line);
  border-radius: 10px;
  background: var(--op-paper);
}

.op-reserve__title {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  line-height: 1.2;
}

.op-reserve__price {
  margin: 0 0 1rem;
  font-size: 1.6rem;
  color: var(--op-forest-deep);
}

.op-reserve__price span {
  font-size: 1rem;
  font-style: italic;
  color: var(--op-muted);
}

.op-reserve__spots {
  margin: -0.4rem 0 1.4rem;
  color: var(--op-caramel);
  font-style: italic;
}

.op-reserve__closed {
  margin: 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--op-rose);
  background: var(--op-cream);
}

.op-addon {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: start;
  margin: 0 0 0.5rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--op-line);
  border-radius: 8px;
  background: var(--op-cream);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.op-addon:has(input:checked) {
  border-color: var(--op-forest);
  background: #fff;
}

.op-addon input {
  margin-top: 0.3rem;
  accent-color: var(--op-forest);
}

.op-addon__text {
  display: flex;
  flex-direction: column;
}

.op-addon__text strong {
  font-weight: 400;
}

.op-addon__text small {
  color: var(--op-muted);
  font-size: 0.85rem;
}

.op-addon__price {
  color: var(--op-caramel);
  white-space: nowrap;
}

.op-reserve__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--op-line);
  font-size: 1.1rem;
}

.op-reserve__total strong {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--op-forest-deep);
}

.op-reserve__form .op-button.button {
  width: 100%;
}

.op-reserve__note {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  text-align: center;
  color: var(--op-muted);
}

.op-details {
  display: grid;
  gap: 2.5rem;
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-top: clamp(2rem, 6vw, 3.5rem);
  border-top: 1px solid var(--op-line);
}

.op-details h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  line-height: 1.25;
}

.op-includes,
.op-steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.op-includes li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0;
  border-bottom: 1px dotted var(--op-line);
}

.op-heart {
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  fill: var(--op-rose);
}

.op-steps {
  counter-reset: op-step;
}

.op-steps li {
  counter-increment: op-step;
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  column-gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.op-steps li::before {
  content: counter(op-step);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--op-forest);
  color: var(--op-cream);
}

.op-steps strong {
  font-weight: 400;
  font-size: 1.15rem;
  color: var(--op-forest-deep);
}

.op-steps span {
  color: var(--op-muted);
}

.op-tagline {
  margin: clamp(3rem, 8vw, 5rem) 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  text-align: center;
  text-transform: uppercase;
  color: var(--op-forest);
}

@media (min-width: 900px) {
  .op-invite {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 3.5rem;
  }

  .op-reserve {
    position: sticky;
    top: 2rem;
  }

  .op-details {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

/* ==========================================================================
   Host page
   ========================================================================== */

.op-host-banner {
  margin: 0 0 2rem;
  padding: 0.8rem 1.1rem;
  border-radius: 8px;
  background: var(--op-forest);
  color: var(--op-cream);
  font-size: 0.95rem;
}

.op-host-head {
  max-width: 40rem;
  margin-bottom: 2.5rem;
}

.op-host-head h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
}

.op-host-head p:last-child {
  margin: 0;
  color: var(--op-muted);
  font-size: 1.05rem;
}

.op-builder {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

.op-builder__form {
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--op-line);
  border-radius: 10px;
  background: var(--op-paper);
}

.op-field--static p {
  margin: 0;
  font-size: 1.05rem;
}

.op-field--static small a {
  color: var(--op-forest);
}

.op-field-row {
  display: grid;
  gap: 0 1rem;
}

/* Design picker: a row of little 5x7 cards. */

.op-designs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr));
  gap: 1rem 0.75rem;
}

.op-design {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

.op-design input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.op-design__thumb {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 5 / 7;
  object-fit: cover;
  border: 1px solid var(--op-line);
  border-radius: 3px;
  font-size: 1.15rem;
  transition: box-shadow 0.15s ease;
}

.op-design__thumb--cream {
  background: #faf6ee;
  color: #2f3a2f;
}

.op-design__thumb--evergreen {
  background: #3e4a3d;
  color: #f5efe4;
}

.op-design__thumb--ink {
  background: #f3ede2;
  color: #26304a;
}

/* The built-ins' double rule, in miniature. */
.op-design__thumb:not(img)::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid currentColor;
  opacity: 0.35;
}

.op-design:hover .op-design__thumb {
  box-shadow: 0 0 0 2px var(--op-line);
}

.op-design:has(input:checked) .op-design__thumb {
  box-shadow: 0 0 0 2px var(--op-cream), 0 0 0 4px var(--op-forest);
}

.op-design:has(input:focus-visible) .op-design__thumb {
  outline: 2px solid var(--op-caramel);
  outline-offset: 5px;
}

.op-design__price {
  margin-top: -0.2rem;
  font-size: 0.78rem;
  font-style: italic;
  color: var(--op-caramel);
}

.op-unlock {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--op-caramel);
  border-radius: 8px;
  background: var(--op-cream);
}

.op-unlock p {
  flex: 1 1 16rem;
  margin: 0;
  font-size: 0.95rem;
}

.op-unlock strong {
  font-weight: 400;
  color: var(--op-forest-deep);
}

.op-locked-note {
  margin: -0.5rem 0 1.25rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--op-caramel);
  background: var(--op-cream);
  color: var(--op-ink);
}

.op-page .op-button.button:disabled:hover {
  background: #b9b3a8;
  border-color: #b9b3a8;
}

.op-page .op-button--ghost.button:disabled:hover {
  background: transparent;
  color: var(--op-caramel);
}

.op-builder__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.op-preview-label {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
  color: var(--op-muted);
}

.op-share,
.op-guests {
  margin-top: clamp(3rem, 8vw, 4.5rem);
}

.op-share h2,
.op-guests h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
}

.op-share__grid {
  display: grid;
  gap: 1.25rem;
}

.op-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.5rem;
  border: 1px solid var(--op-line);
  border-radius: 10px;
  background: var(--op-cream);
}

.op-panel h3 {
  margin: 0;
  font-size: 1.3rem;
}

.op-panel > p {
  margin: 0;
  color: var(--op-muted);
}

.op-panel .op-field {
  width: 100%;
  margin: 0;
}

.op-copy {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.op-copy input {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem !important;
}

.op-sent {
  width: 100%;
  font-size: 0.9rem;
  color: var(--op-muted);
}

.op-sent summary {
  cursor: pointer;
}

.op-sent ul {
  margin: 0.5rem 0 0 1.1rem;
}

.op-progress {
  position: relative;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--op-paper);
  border: 1px solid var(--op-line);
}

.op-progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: var(--op-forest);
}

.op-progress__min {
  position: absolute;
  top: -0.35rem;
  bottom: -0.35rem;
  width: 2px;
  margin-left: -1px;
  background: var(--op-caramel);
}

.op-progress__text {
  margin: 0.75rem 0 1.25rem;
  color: var(--op-muted);
}

.op-guest-list {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.op-guest-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  align-items: baseline;
  padding: 0.7rem 1rem;
  border: 1px solid var(--op-line);
  border-radius: 8px;
  background: var(--op-cream);
}

.op-guest-list strong {
  font-weight: 400;
  color: var(--op-forest-deep);
}

.op-guest-list span {
  color: var(--op-muted);
}

.op-guest-list__qty {
  margin-left: auto;
  font-size: 0.85rem;
}

@media (min-width: 600px) {
  .op-field-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .op-builder {
    grid-template-columns: minmax(0, 1fr) minmax(0, 27rem);
    gap: 3rem;
  }

  .op-builder__preview {
    position: sticky;
    top: 2rem;
  }

  .op-share__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================================
   Printing (host page). The script copies the card into .op-print-root just
   before printing and sets the page size for the chosen layout.
   ========================================================================== */

.op-print-root {
  display: none;
}

@media print {
  body.op-printing > *:not(.op-print-root) {
    display: none !important;
  }

  body.op-printing {
    margin: 0;
    background: #fff;
  }

  body.op-printing .op-print-root {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 0.3in;
  }

  .op-print-root--one {
    padding-top: 1in;
  }

  .op-print-root .op-card {
    flex: none;
    width: 5in;
    max-width: none;
    height: 7in;
    overflow: hidden;
    margin: 0;
    box-shadow: none;
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .op-print-root .op-card__qr {
    display: flex;
  }
}


/* ==========================================================================
   Build a bag
   Photos, not illustrations. Borders only on things you can pick and on
   the order summary; everything else is organised by spacing.
   ========================================================================== */

.op-page.op-bag {
  padding-top: 0;
}

.op-bag-intro {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}

.op-bag-intro__text {
  max-width: 30rem;
}

.op-page .op-bag-intro__title {
  margin: 0 0 0.75rem;
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-transform: none;
  text-wrap: balance;
}

.op-bag-intro__tagline {
  margin: 0 0 0.6rem;
  font-size: 1.15em;
  color: var(--op-ink);
}

.op-bag-intro__text > p:last-child {
  margin: 0;
  color: var(--op-muted);
}

.op-bag-intro__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--op-paper);
}

.op-bag-step {
  margin: 0 0 2.5rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

.op-page .op-bag-step__title {
  display: block;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--op-ink);
}

/* Step 1: the three bag sizes. */
.op-tiers {
  display: grid;
  gap: 1.25rem;
}

.op-tier {
  position: relative;
  display: grid;
  grid-template-columns: 7rem 1fr;
  grid-template-areas:
    "photo name"
    "photo price"
    "photo blurb"
    "photo list"
    "button button";
  gap: 0.15rem 1rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid var(--op-line);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.op-tier input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.op-tier:hover {
  border-color: var(--op-caramel);
}

.op-tier:has(input:checked) {
  border-color: var(--op-forest);
  box-shadow: 0 0 0 1px var(--op-forest);
}

.op-tier:has(input:focus-visible) {
  outline: 2px solid var(--op-caramel);
  outline-offset: 3px;
}

.op-tier__photo {
  grid-area: photo;
  position: relative;
  display: block;
}

.op-tier__photo img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--op-paper);
}

.op-tier__check {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: none;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--op-forest);
  color: #fff;
  font-size: 0.85rem;
}

.op-tier:has(input:checked) .op-tier__check {
  display: grid;
}

.op-tier__name {
  grid-area: name;
  font-size: 1.25rem;
  color: var(--op-ink);
}

.op-tier__price {
  grid-area: price;
  font-family: var(--op-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--op-ink);
}

.op-tier__blurb {
  grid-area: blurb;
  font-size: 0.95em;
  color: var(--op-muted);
}

.op-tier__list {
  grid-area: list;
  font-family: var(--op-sans);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--op-muted);
}

.op-tier__button {
  grid-area: button;
  display: block;
  margin-top: 0.75rem;
  padding: 0.7em 1em;
  border: 1px solid var(--op-caramel);
  border-radius: 3px;
  color: var(--op-caramel);
  font-family: var(--op-sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.op-tier:hover .op-tier__button {
  background: var(--op-caramel);
  color: #fff;
}

.op-tier__chosen {
  display: none;
}

.op-tier:has(input:checked) .op-tier__button {
  background: var(--op-forest);
  border-color: var(--op-forest);
  color: #fff;
}

.op-tier:has(input:checked) .op-tier__choose {
  display: none;
}

.op-tier:has(input:checked) .op-tier__chosen {
  display: inline;
}

/* Step 2: slots and items. */
.op-bag-layout {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.op-slot {
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--op-line);
}

.op-slot:last-of-type {
  border-bottom: 1px solid var(--op-line);
}

.op-slot__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.op-page .op-slot__head h4 {
  margin: 0;
  font-family: var(--op-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--op-ink);
}

.op-slot__status {
  margin: 0;
  font-family: var(--op-sans);
  font-size: 0.85rem;
  color: var(--op-caramel);
}

.op-slot__status.is-done {
  color: var(--op-forest);
}

.op-slot__status.is-full {
  animation: op-nudge 0.4s ease;
}

@keyframes op-nudge {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.op-surprise {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  font-family: var(--op-sans);
  font-size: 0.85rem;
  color: var(--op-ink);
  cursor: pointer;
}

.op-surprise input {
  accent-color: var(--op-forest);
}

.op-slot__items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 1.25rem 1rem;
  transition: opacity 0.2s ease;
}

@media (min-width: 720px) {
  .op-slot__items {
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  }
}

.op-slot.is-surprise .op-slot__items {
  opacity: 0.35;
  pointer-events: none;
}

.op-slot__empty {
  margin: 0;
  color: var(--op-muted);
}

.op-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.op-item__pick {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--op-line);
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.op-item__pick img {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

/* Items without a photo yet show the poster illustration, fitted rather than cropped. */
.op-item__pick--icon img {
  object-fit: contain;
  padding: 10%;
  background: var(--op-cream);
}

.op-item__pick:hover {
  border-color: var(--op-caramel);
}

.op-item.is-picked .op-item__pick {
  border-color: var(--op-forest);
  box-shadow: 0 0 0 1px var(--op-forest);
}

.op-item__badge {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  min-width: 1.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: var(--op-forest);
  color: #fff;
  font-family: var(--op-sans);
  font-size: 0.75rem;
  line-height: 1.3;
}

.op-item__name {
  font-size: 0.95rem;
  line-height: 1.3;
}

.op-item__upcharge,
.op-item__stock {
  margin-top: -0.2rem;
  font-family: var(--op-sans);
  font-size: 0.78rem;
  color: var(--op-caramel);
}

.op-item__stock {
  color: var(--op-muted);
}

.op-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--op-line);
  border-radius: 3px;
  background: #fff;
}

.op-stepper button {
  width: 2rem;
  height: 1.9rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--op-ink);
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.op-stepper output {
  min-width: 1.2rem;
  font-family: var(--op-sans);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

/* Summary: the one box that keeps a border. */
.op-bag-summary {
  padding: clamp(1.25rem, 4vw, 1.75rem);
  border: 1px solid var(--op-line);
  border-radius: 3px;
  background: #fff;
}

.op-page .op-bag-summary h3 {
  margin: 0 0 0.2rem;
  font-size: 1.5rem;
}

.op-bag-summary__tier {
  margin: 0 0 1rem;
  color: var(--op-muted);
}

.op-bag-summary__list {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
}

.op-bag-summary__list li {
  display: grid;
  grid-template-columns: 1.1rem 1fr;
  column-gap: 0.4rem;
  font-size: 0.92rem;
  line-height: 1.35;
  color: var(--op-muted);
}

.op-bag-summary__list li::before {
  content: "○";
  grid-row: span 2;
  color: var(--op-line);
}

.op-bag-summary__list li.is-done::before {
  content: "●";
  color: var(--op-forest);
}

.op-bag-summary__list strong {
  font-weight: 400;
  color: var(--op-ink);
}

.op-bag-summary .op-field label {
  font-family: var(--op-sans);
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--op-ink);
}

.op-bag-summary .op-reserve__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--op-line);
  font-size: 1.15rem;
}

.op-bag-summary .op-reserve__total strong {
  font-size: 1.4rem;
  font-weight: 400;
}

.op-bag-summary .op-button.button {
  width: 100%;
}

.op-bag-summary .op-reserve__note {
  margin: 0.75rem 0 0;
  font-family: var(--op-sans);
  font-size: 0.8rem;
  color: var(--op-muted);
}

@media (min-width: 720px) {
  .op-bag-intro {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(1.5rem, 4vw, 3rem);
  }

  .op-tiers {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .op-tier {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto 1fr auto;
    grid-template-areas:
      "photo"
      "name"
      "price"
      "blurb"
      "list"
      "button";
    gap: 0.2rem;
    padding: 0.75rem 0.75rem 1rem;
  }

  .op-tier__button {
    align-self: end;
  }

  .op-tier__photo {
    margin-bottom: 0.6rem;
  }

  .op-tier__button {
    margin-top: 0.9rem;
  }
}

@media (min-width: 900px) {
  .op-bag-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 19rem);
    gap: 2.5rem;
  }

  .op-bag-summary {
    position: sticky;
    top: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .op-slot__status.is-full {
    animation: none;
  }
}
