/* v8.9.56 Wedding card maker. Only used on /cards/ pages. Uses the site's own .form, .field, .grid2, .panel. */
.cm-wrap { padding-top: 24px; padding-bottom: 72px; }
.cm-split { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 28px; align-items: start; }
.cm-form { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.cm-form .panel + .panel { margin-top: 0; }
.cm-h { font-family: var(--serif); font-size: 21px; font-weight: 600; margin: 0; }
.cm-opt { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--soft); margin-left: 6px; vertical-align: middle; }
.cm-note { margin: -4px 0 0; line-height: 1.5; }
.cm-lbl { font-weight: 600; font-size: 14.5px; }
.cm-seg { display: flex; gap: 8px; flex-wrap: wrap; }
.cm-seg label { flex: 1 1 0; min-width: 120px; cursor: pointer; font-weight: 500; }
.cm-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.cm-seg span { display: flex; align-items: center; justify-content: center; height: 48px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 14px; background: #fff; font-size: 15px; text-align: center; transition: border-color .2s, background .2s; }
.cm-seg input:checked + span { border-color: var(--navy); background: var(--tint-2); font-weight: 600; }
.cm-seg input:focus-visible + span { outline: 3px solid var(--gold-light); outline-offset: 2px; }
#cm-events { display: flex; flex-direction: column; gap: 14px; }
.cm-ev { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--tint); }
.cm-ev-top { display: flex; gap: 10px; align-items: flex-end; }
.cm-ev-top .field { flex: 1; min-width: 0; }
.cm-ev-x { flex: none; width: 52px; height: 52px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cm-ev-x:hover { border-color: var(--red); color: var(--red); }
.cm-add { align-self: flex-start; }
.cm-full { width: 100%; justify-content: center; }
.cm-c { text-align: center; margin: 0; line-height: 1.5; }
.cm-view { min-width: 0; position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; padding-right: 4px; }
.cm-vh { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cm-designs { display: flex; flex-direction: column; gap: 18px; }
.cm-design { border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff; padding: 16px; }
.cm-dh { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; min-height: 36px; }
.cm-dh b { font-size: 15.5px; }
.cm-pages { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cm-pg { margin: 0; min-width: 0; }
.cm-pg canvas { display: block; width: 100%; height: auto; aspect-ratio: 5 / 7; border-radius: 8px; background: var(--tint); box-shadow: var(--sh-1); }
.cm-pg figcaption { font-size: 13px; color: var(--muted); text-align: center; margin-top: 8px; line-height: 1.4; }
.cm-pg figcaption a { color: var(--gold); font-weight: 600; }
@media (max-width: 900px) {
  .cm-split { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .cm-view { position: static; max-height: none; overflow: visible; padding-right: 0; order: -1; }
}
@media (max-width: 560px) {
  .cm-wrap { padding-top: 16px; padding-bottom: 48px; }
  .cm-form .panel { padding: 20px 18px; }
  .cm-design { padding: 12px; }
  .cm-pages { gap: 8px; }
  .cm-pg figcaption { font-size: 12px; }
}
.cm-pg canvas { cursor: zoom-in; }
.cm-lb { position: fixed; inset: 0; z-index: 200; background: rgba(20,27,45,.82); display: flex; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.cm-lb[hidden] { display: none; }
.cm-lb-in { position: relative; max-width: 100%; max-height: 100%; }
.cm-lb canvas { display: block; width: auto; height: auto; max-width: min(92vw, 560px); max-height: 86vh; aspect-ratio: 5 / 7; border-radius: 10px; background: #fff; }
.cm-lb-x { position: absolute; top: -14px; right: -14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--sh-2); }
@media (max-width: 900px) {
  .cm-designs { flex-direction: row; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
  .cm-design { flex: 0 0 86%; scroll-snap-align: start; }
  .cm-lb-x { top: 6px; right: 6px; }
}
@media (min-width: 600px) and (max-width: 900px) { .cm-design { flex-basis: 62%; } }
.cm-sw { display: none; } .cm-tip { margin: -6px 0 12px; } @media (max-width: 900px) { .cm-sw { display: inline; } }
