/* Simcha invitations — gallery, editor and shared view */
.inv-page { background: var(--background); }
.inv-kicker { margin: 0 0 6px; color: var(--gold); font-weight: 700; font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
html[lang="yi"] .inv-kicker { letter-spacing: 0; font-size: .95rem; }
.inv-small { font-size: .9rem; color: var(--muted); }

/* intro */
.inv-intro { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding: 44px 0 18px; }
.inv-intro h2 { margin: 0 0 10px; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); color: var(--navy); line-height: 1.2; }
.inv-intro p { color: var(--ink); font-size: 1.08rem; max-width: 640px; }
.inv-intro-art { margin: 0; justify-self: center; }
.inv-intro-art img { display: block; width: min(520px, 100%); height: auto; }
.inv-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 18px 0 22px; }
.inv-steps li { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--navy); }
.inv-steps b { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-size: .9rem; }

/* gallery */
.inv-gallery-wrap { padding: 26px 0 40px; }
.inv-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.inv-section-head h2 { margin: 0; color: var(--navy); font-size: 1.7rem; }
.inv-sample-lang { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inv-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.inv-chip { padding: 7px 15px; border: 1px solid var(--border); border-radius: 999px; background: var(--paper); color: var(--navy); font-weight: 600; font-size: .92rem; }
.inv-chip:hover { background: var(--gold-soft); color: var(--navy); }
.inv-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.inv-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 26px 22px; }
.inv-tile { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 0; border: 0; border-radius: 14px; background: transparent; color: var(--ink); text-align: center; cursor: pointer; }
.inv-tile:hover, .inv-tile:focus-visible { background: transparent; color: var(--ink); }
.inv-tile canvas { display: block; width: 100%; height: auto; aspect-ratio: 5 / 7; border-radius: 6px; box-shadow: 0 2px 6px rgba(20,30,45,.12), 0 14px 30px -12px rgba(20,30,45,.35); transition: transform .2s ease, box-shadow .2s ease; background: #eee; }
.inv-tile:hover canvas, .inv-tile:focus-visible canvas { transform: translateY(-4px); box-shadow: 0 4px 10px rgba(20,30,45,.14), 0 22px 40px -14px rgba(20,30,45,.45); }
.inv-tile-cap { display: grid; gap: 2px; padding: 12px 4px 0; }
.inv-tile-type { color: var(--gold); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; }
html[lang="yi"] .inv-tile-type { letter-spacing: 0; font-size: .9rem; }
.inv-tile-name { font: 700 1.05rem/1.3 var(--font-display); color: var(--navy); }
.inv-tile-go { font-size: .88rem; color: var(--accent-dark); font-weight: 600; opacity: 0; transition: opacity .2s; }
.inv-tile:hover .inv-tile-go, .inv-tile:focus-visible .inv-tile-go { opacity: 1; }
.inv-tile[hidden] { display: none; }
.inv-tile { position: relative; }
.inv-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: -8px 0 12px; }
.inv-colors { margin: 0; }
.inv-chip-color { display: inline-flex; align-items: center; gap: 7px; }
.inv-chip-color i { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); flex: none; }
.inv-search { position: relative; display: block; flex: 0 1 260px; }
.inv-search svg { position: absolute; inset-inline-start: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: .55; pointer-events: none; }
.inv-search input { width: 100%; padding: 9px 14px; padding-inline-start: 38px; border: 1px solid var(--border); border-radius: 999px; background: var(--paper, #fff); font: inherit; font-size: .95rem; }
.inv-count { margin: 0 0 16px; color: var(--muted, #667); }
.inv-more-wrap { display: flex; justify-content: center; margin-top: 26px; }
.inv-more-wrap [hidden] { display: none; }
.inv-swatch-all { align-self: center; margin-inline-start: 4px; font-weight: 600; font-size: .9rem; color: var(--accent-dark, #1e6f6a); white-space: nowrap; }
.inv-tile-new { position: absolute; top: 10px; inset-inline-start: 10px; padding: 3px 10px; border-radius: 999px; background: var(--gold, #b08d57); color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .04em; box-shadow: 0 2px 6px rgba(0,0,0,.25); pointer-events: none; }
html[lang="yi"] .inv-tile-new { letter-spacing: 0; font-size: .82rem; }

/* editor */
.inv-editor-wrap { background: var(--cream); border-top: 1px solid var(--border); padding: 40px 0 64px; scroll-margin-top: 96px; }
.inv-editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 470px); gap: 40px; align-items: start; }
.inv-form h2 { margin: 0 0 14px; color: var(--navy); font-size: 1.7rem; }
.inv-group { margin: 0 0 18px; padding: 18px 20px 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-sm); }
.inv-group legend, .inv-more summary { padding: 0 6px; font: 700 1.05rem/1.3 var(--font-display); color: var(--navy); }
.inv-more { padding-bottom: 16px; }
.inv-more summary { cursor: pointer; padding: 0; list-style-position: inside; }
.inv-more[open] summary { margin-bottom: 12px; }
.inv-field { margin: 0 0 14px; }
.inv-field[hidden] { display: none; }
.inv-field label, .inv-label { display: block; margin: 0 0 6px; font-weight: 600; font-size: .95rem; color: var(--ink); }
.inv-label em { font-style: normal; font-weight: 500; color: var(--muted); }
.inv-field input, .inv-field select, .inv-field textarea {
  width: 100%; box-sizing: border-box; padding: 11px 13px; border: 1px solid #cfc6b6; border-radius: 10px; background: #fff; color: var(--ink);
  font: inherit; font-size: 16px; line-height: 1.4;
}
.inv-field textarea { resize: vertical; min-height: 84px; }
.inv-field input:focus, .inv-field select:focus, .inv-field textarea:focus { outline: 3px solid rgba(21,122,107,.25); border-color: var(--accent); }
.inv-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inv-hint { margin: 5px 0 12px; color: var(--muted); font-size: .88rem; }
.inv-field .inv-hint { margin-bottom: 0; }
.inv-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; font-size: .95rem; cursor: pointer; }
.inv-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.inv-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.inv-swatch { width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border);
  background: linear-gradient(135deg, var(--sw-a) 0 55%, var(--sw-b) 55% 100%); }
.inv-swatch:hover { background: linear-gradient(135deg, var(--sw-a) 0 55%, var(--sw-b) 55% 100%); transform: scale(1.08); }
.inv-swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.inv-seg { display: inline-flex; border: 1px solid #cfc6b6; border-radius: 10px; overflow: hidden; background: #fff; }
.inv-seg label { position: relative; margin: 0; cursor: pointer; }
.inv-seg input { position: absolute; opacity: 0; pointer-events: none; }
.inv-seg span { display: block; padding: 10px 16px; font-weight: 600; color: var(--navy); }
.inv-seg input:checked + span { background: var(--navy); color: #fff; }
.inv-seg input:focus-visible + span { outline: 3px solid rgba(21,122,107,.4); outline-offset: -3px; }
.inv-small-btn { padding: 7px 13px; font-size: .9rem; margin: -4px 0 14px; }
.inv-sample-note { margin: -4px 0 16px; padding: 10px 14px; border-radius: 10px; background: var(--gold-soft); border: 1px solid #ead9bb; color: #6b5330; font-size: .95rem; }
.inv-sample-note[hidden] { display: none; }
.inv-privacy { color: var(--muted); font-size: .9rem; }
.inv-linkbtn { padding: 0; border: 0; background: none; color: var(--accent-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.inv-linkbtn:hover { background: none; color: var(--navy); }

.inv-preview-sticky { position: sticky; top: 84px; }
.inv-preview-card { display: flex; justify-content: center; }
.inv-preview-card { background: linear-gradient(180deg, #e9e3d7, #ddd5c6); border-radius: 18px; padding: 22px; box-shadow: inset 0 1px 0 rgba(255,255,255,.6); }
.inv-preview-card canvas { display: block; width: auto; height: auto; max-width: 100%; aspect-ratio: 5 / 7; margin: 0 auto; max-height: max(380px, calc(100vh - 400px)); border-radius: 4px; box-shadow: 0 3px 8px rgba(20,30,45,.15), 0 22px 44px -18px rgba(20,30,45,.5); }
.inv-actions { display: grid; gap: 10px; margin-top: 16px; }
.inv-actions .button { margin: 0; width: 100%; }
.inv-actions-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.inv-actions-row .button { padding: 10px 8px; font-size: .92rem; background: #fff; }
.inv-actions-row .button:hover { background: var(--navy); color: #fff; }
.inv-share, .inv-rsvp { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.inv-share svg, .inv-rsvp svg { width: 20px; height: 20px; flex: none; }
.inv-rsvp { background: var(--accent); }
.inv-rsvp:hover { background: var(--navy); color: #fff; }
.inv-linkbox { padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.inv-linkrow { display: flex; gap: 8px; }
.inv-linkrow input { flex: 1; min-width: 0; padding: 9px 11px; border: 1px solid #cfc6b6; border-radius: 9px; font: inherit; font-size: 14px; color: var(--muted); background: var(--cream); }
.inv-linkrow .button { width: auto; flex: none; }
.inv-open { display: inline-block; margin-top: 8px; font-size: .92rem; font-weight: 600; color: var(--accent-dark); }
.inv-status { min-height: 1.4em; margin: 0; text-align: center; font-weight: 600; color: var(--accent-dark); opacity: 0; transition: opacity .2s; }
.inv-status.show { opacity: 1; }

.inv-jump { display: none; }
.inv-preview { scroll-margin-top: 90px; }
@media (max-width: 860px) {
  .inv-jump:not([hidden]) { display: inline-flex; position: fixed; z-index: 40; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
    padding: 12px 22px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 700; text-decoration: none; box-shadow: 0 10px 26px rgba(20,30,45,.35); white-space: nowrap; }
}

/* shared view */
.inv-view { background: radial-gradient(900px 500px at 50% -10%, #efe6d4, transparent 70%), var(--background); }
.inv-view-wrap { padding: 36px 0 60px; }
.inv-view-loading { text-align: center; color: var(--muted); padding: 120px 0; }
.inv-view-empty { max-width: 560px; margin: 60px auto; text-align: center; }
.inv-view-empty h1 { color: var(--navy); font-size: 1.8rem; }
.inv-view-grid { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 52px; align-items: start; justify-content: center; }
.inv-view-card { display: flex; justify-content: center; }
.inv-view-card canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: max(520px, calc(100vh - 190px)); aspect-ratio: 5 / 7; border-radius: 6px; box-shadow: 0 4px 12px rgba(20,30,45,.16), 0 36px 70px -26px rgba(20,30,45,.55);
  opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .6s ease, transform .6s ease; }
.is-ready .inv-view-card canvas { opacity: 1; transform: none; }
.inv-view-info { position: sticky; top: 90px; max-width: 520px; }
.inv-view-info h1 { margin: 0 0 18px; color: var(--navy); font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); line-height: 1.25; }
.inv-facts { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 4px; }
.inv-facts li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.inv-facts li[hidden] { display: none; }
.inv-facts svg { width: 24px; height: 24px; flex: none; margin-top: 2px; fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.inv-facts .v-main { display: block; font-weight: 600; color: var(--ink); font-size: 1.08rem; white-space: pre-line; }
.inv-facts .v-sub { display: block; color: var(--muted); font-size: .95rem; }
.inv-view-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inv-view-actions .button { margin: 0; }
.inv-view-actions .button[hidden] { display: none; }
.inv-view-actions .button-ghost { background: #fff; border-color: var(--border); }
.inv-view-actions .button-ghost:hover { background: var(--navy); color: #fff; border-color: var(--navy); }
.inv-view-actions .inv-rsvp { grid-column: span 1; }
.inv-view-secondary { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 16px 0 0; }
.inv-make { margin-top: 26px; padding: 18px 20px; border-radius: var(--radius); background: var(--navy); color: rgba(255,255,255,.85); }
.inv-make p { margin: 0 0 12px; }
.inv-make .button { margin: 0; }

@media (max-width: 1099px) {
  .inv-editor { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 28px; }
}
@media (max-width: 860px) {
  .inv-intro { grid-template-columns: 1fr; gap: 10px; padding-top: 26px; }
  .inv-intro-art { order: -1; }
  .inv-intro-art img { width: min(300px, 80%); }
  .inv-editor { grid-template-columns: 1fr; }
  .inv-preview-sticky { position: static; }
  .inv-preview-card { max-width: 440px; margin: 0 auto; padding: 16px; }
  .inv-preview-card canvas { max-height: none; width: 100%; }
  .inv-actions { max-width: 440px; margin-inline: auto; }
  .inv-view-grid { grid-template-columns: 1fr; gap: 26px; }
  .inv-view-card { max-width: 520px; margin: 0 auto; width: 100%; }
  .inv-view-card canvas { width: 100%; max-height: none; }
  .inv-view-info { position: static; margin: 0 auto; }
}
@media (max-width: 680px) {
  .inv-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .inv-tile-go { opacity: 1; font-size: .82rem; }
  .inv-chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -14px; padding: 2px 14px 8px; scrollbar-width: none; }
  .inv-chips::-webkit-scrollbar { display: none; }
  .inv-chip { flex: none; }
  .inv-tools { margin-top: -10px; }
  .inv-colors { flex: 1 1 100%; min-width: 0; }
  .inv-search { flex: 1 1 100%; }
  .inv-tile-name { font-size: .95rem; }
  .inv-group { padding: 14px 14px 4px; }
  .inv-editor-wrap { padding: 28px 0 48px; }
  .inv-view-wrap { padding: 18px 0 40px; }
  .inv-section-head h2, .inv-form h2 { font-size: 1.45rem; }
  .inv-seg span { padding: 10px 12px; font-size: .95rem; }
}
@media (max-width: 380px) {
  .inv-row2 { grid-template-columns: 1fr; }
  .inv-actions-row { grid-template-columns: 1fr 1fr; }
  .inv-view-actions { grid-template-columns: 1fr; }
}

/* printing the card from the editor or view page */
.invite-print { display: none; }
@media print {
  @page { size: 5in 7in; margin: 0; }
  body.printing-invite > *:not(.invite-print) { display: none !important; }
  body.printing-invite .invite-print { display: block !important; }
  body.printing-invite .invite-print img { width: 5in; height: 7in; display: block; }
  .inv-page .inv-intro, .inv-page .inv-gallery-wrap, .inv-form, .inv-actions { display: none !important; }
}
.inv-view-status { text-align: start; margin-top: 10px; }

/* ---- premium: photo scenes, hero fan (Oct 2026) */
.inv-chip-scene { background: linear-gradient(135deg, #f7ecd2, #e9d3a3); border-color: #d9bd83; color: #5b4316; }
.inv-chip-scene[aria-pressed="true"] { background: linear-gradient(135deg, #7a5a1f, #b48a3c); border-color: #8a6a2a; color: #fff; }
.inv-tile-scene canvas { border-radius: 4px; box-shadow: 0 2px 8px rgba(20,30,45,.16), 0 18px 34px -14px rgba(20,30,45,.45); }
.inv-tile-scene .inv-tile-new { background: linear-gradient(135deg, #8a6a2a, #c9a24e 55%, #8a6a2a); }
.inv-tile-scene .inv-tile-go { opacity: 1; }
.inv-swatch-photo { background-size: cover; background-position: center; }
.inv-swatch-photo:hover { background-size: cover; }
.inv-hero-fan { position: relative; width: min(520px, 100%); aspect-ratio: 1.12; margin: 0 auto; }
.inv-hero-fan canvas { position: absolute; top: 6%; width: 48%; height: auto; aspect-ratio: 5 / 7; border-radius: 4px; background: #e9e1d2;
  box-shadow: 0 4px 10px rgba(20,30,45,.18), 0 26px 44px -18px rgba(20,30,45,.55); transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.inv-hero-fan canvas:nth-child(1) { left: 2%; transform: rotate(-8deg) translateY(4%); }
.inv-hero-fan canvas:nth-child(2) { left: 26%; top: 0; z-index: 2; transform: none; width: 50%; }
.inv-hero-fan canvas:nth-child(3) { right: 2%; transform: rotate(8deg) translateY(4%); }
.inv-hero-fan:hover canvas:nth-child(1) { transform: rotate(-11deg) translate(-4%, 3%); }
.inv-hero-fan:hover canvas:nth-child(3) { transform: rotate(11deg) translate(4%, 3%); }
@media (prefers-reduced-motion: reduce) { .inv-hero-fan canvas { transition: none; } }
@media (max-width: 760px) { .inv-hero-fan { width: min(400px, 92%); } }
.inv-intro-art:has(.inv-hero-fan) { width: 100%; justify-self: stretch; }

/* ---- invite view: envelope opening + countdown (Oct 2026) */
.inv-env { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 40%, #f7f1e6 0%, #e6dccb 70%, #d8ccb6 100%); transition: opacity .55s ease .1s; }
.inv-env[hidden] { display: none; }
.inv-env.is-gone { opacity: 0; pointer-events: none; }
.inv-env-skip { position: absolute; top: 14px; inset-inline-end: 14px; padding: 8px 16px; border-radius: 999px; border: 1px solid rgba(60,45,20,.25); background: rgba(255,255,255,.6); color: #4a3a1c; font-weight: 600; font-size: .92rem; }
.inv-env-stage { display: grid; justify-items: center; gap: 22px; perspective: 1400px; }
.inv-env-body { position: relative; width: min(84vw, 400px); aspect-ratio: 1.42; padding: 0; border: 0; background: none; cursor: pointer; transform-style: preserve-3d; animation: envIn .7s cubic-bezier(.2,.8,.2,1) both; }
.inv-env-body:hover { background: none; }
.inv-env-body:focus { outline: none; }
.inv-env-body:focus-visible .inv-env-seal { box-shadow: 0 0 0 4px rgba(255,255,255,.9), 0 0 0 7px rgba(150,110,40,.7); }
.inv-env-back, .inv-env-front { position: absolute; inset: 0; border-radius: 6px; }
.inv-env-back { background: linear-gradient(160deg, #efe5d1, #e2d3b6); box-shadow: 0 30px 60px -24px rgba(50,35,10,.55), 0 6px 14px rgba(50,35,10,.18); }
.inv-env-front { z-index: 3; background:
  linear-gradient(to top right, transparent 49.6%, rgba(90,70,30,.12) 50%, transparent 50.6%) left bottom / 50.2% 100% no-repeat,
  linear-gradient(to top left, transparent 49.6%, rgba(90,70,30,.12) 50%, transparent 50.6%) right bottom / 50.2% 100% no-repeat,
  linear-gradient(170deg, #f6eedd, #e8dcc2);
  clip-path: polygon(0 0, 50% 54%, 100% 0, 100% 100%, 0 100%); }
.inv-env-card { position: absolute; z-index: 2; left: 28%; width: 44%; top: 5%; aspect-ratio: 5 / 7; height: auto; object-fit: cover; border-radius: 3px; box-shadow: 0 6px 18px rgba(40,30,10,.3); transition: transform 1s cubic-bezier(.3,.7,.2,1) .45s; }
.inv-env-flap { position: absolute; z-index: 4; left: 0; right: 0; top: 0; height: 58%; transform-origin: 50% 0; transition: transform .6s cubic-bezier(.4,.1,.3,1), z-index 0s .3s;
  clip-path: polygon(0 0, 100% 0, 50% 100%); background: linear-gradient(180deg, #ecdfc4, #dfcfae); filter: drop-shadow(0 2px 2px rgba(60,40,10,.15)); }
.inv-env-liner { position: absolute; inset: 5% 7% 12%; clip-path: polygon(0 0, 100% 0, 50% 100%); background: linear-gradient(135deg, #b8913f, #ecd38a 45%, #a67c2e 70%, #e3c779); opacity: .9; }
.inv-env-seal { position: absolute; z-index: 5; left: 50%; top: 58%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #e9cf86, #b98d3a 55%, #8a6420); box-shadow: 0 4px 10px rgba(60,40,10,.4), inset 0 -3px 6px rgba(0,0,0,.25), inset 0 2px 3px rgba(255,255,255,.45); transition: transform .35s ease, opacity .35s ease; }
.inv-env-seal svg { width: 30px; height: 30px; fill: none; stroke: #6d4d14; stroke-width: 2.2; stroke-linejoin: round; filter: drop-shadow(0 1px 0 rgba(255,240,200,.6)); }
.inv-env-hint { margin: 0; font-weight: 600; color: #6b5530; letter-spacing: .04em; animation: envPulse 1.8s ease-in-out infinite; }
.inv-env.is-open .inv-env-seal { transform: scale(.6); opacity: 0; }
.inv-env.is-open .inv-env-flap { transform: rotateX(180deg); z-index: 1; }
.inv-env.is-open .inv-env-card { transform: translateY(-58%) scale(1.75); z-index: 6; }
.inv-env.is-open .inv-env-hint { opacity: 0; animation: none; }
@keyframes envIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes envPulse { 50% { opacity: .55; } }
html.env-lock, html.env-lock body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .inv-env, .inv-env * { animation: none !important; transition: none !important; } }
.inv-countdown { display: inline-flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin: -2px 0 16px; padding: 8px 14px; border-radius: 999px; background: linear-gradient(135deg, #f7ecd2, #ecd9ad); color: #5b4316; font-weight: 700; font-size: .98rem; }
.inv-countdown[hidden] { display: none; }
.inv-countdown b { font-variant-numeric: tabular-nums; }
.inv-mazel { border-color: #d9bd83; color: #6d4f16; }

/* font picker (Nov 2026) */
.inv-fonts .inv-font-row { display: grid; grid-template-columns: auto 1fr; gap: 8px 10px; align-items: center; }
.inv-fonts .inv-font-row label { margin: 0; font-size: 0.92em; }
.inv-fonts select { width: 100%; min-width: 0; font-size: 1rem; padding: 8px 10px; border: 1px solid #cfc6b6; border-radius: 10px; background: #fff; }

/* ================= flow: home → simcha → design (Nov 2026) ================= */
.inv-flow { background: #fbf9f5; }
.inv-flow .inv-intro { display: none; }
body:has(#invHome) .page-hero { display: none; }
.inv-flow[data-view="home"] .inv-gallery-wrap,
.inv-flow[data-view="home"] .inv-editor-wrap,
.inv-flow[data-view="home"] .st-wrap,
.inv-flow[data-view="home"] .st-comm-wrap,
.inv-flow[data-view="browse"] .inv-home,
.inv-flow[data-view="browse"] .inv-editor-wrap,
.inv-flow[data-view="browse"] .st-wrap,
.inv-flow[data-view="edit"] .inv-home,
.inv-flow[data-view="edit"] .inv-gallery-wrap { display: none !important; }
.inv-flow[data-view="browse"] .st-comm-wrap { display: none !important; }
.inv-flow:not([data-view="browse"]) .inv-browse-head { display: none; }

/* home hero */
.inv-home-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 48px; align-items: center; padding: 64px 0 40px; }
.inv-home-kicker { margin: 0 0 18px; display: inline-flex; gap: 8px; align-items: center; color: #8a6a3f; font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.inv-home-kicker::before { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, #e3c88e, #a8834f); }
html[lang="yi"] .inv-home-kicker { letter-spacing: 0; font-size: .95rem; }
.inv-home-title { margin: 0 0 18px; font-family: "Cormorant Garamond", var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 1.6rem + 3vw, 4.1rem); line-height: 1.04; letter-spacing: -.01em; color: #17283a; text-wrap: balance; }
html[lang="yi"] .inv-home-title { font-family: "Frank Ruhl Libre", var(--font-display); font-weight: 700; line-height: 1.15; letter-spacing: 0; }
.inv-home-sub { margin: 0 0 30px; max-width: 520px; font-size: 1.12rem; line-height: 1.65; color: #4c5b6a; }
.inv-home-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.inv-btn-primary { background: #17283a; color: #fff; border: 1px solid #17283a; border-radius: 999px; padding: 14px 26px; font-weight: 600; box-shadow: 0 10px 24px -12px rgba(23, 40, 58, .6); }
.inv-btn-primary:hover { background: #22394f; color: #fff; }
.inv-btn-quiet { background: transparent; color: #17283a; border: 1px solid #d8cfbf; border-radius: 999px; padding: 14px 24px; font-weight: 600; }
.inv-btn-quiet:hover { background: #fff; color: #17283a; border-color: #b8955f; }
.inv-home-art { justify-self: center; width: 100%; }

/* occasion tiles */
.inv-occ-wrap { padding: 40px 0 24px; scroll-margin-top: 80px; }
.inv-home-h2 { margin: 0 0 26px; text-align: center; font-family: "Cormorant Garamond", var(--font-display); font-weight: 600; font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem); color: #17283a; }
html[lang="yi"] .inv-home-h2 { font-family: "Frank Ruhl Libre", var(--font-display); font-weight: 700; }
.inv-occ { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 26px 20px; }
.inv-occ-tile { display: flex; flex-direction: column; align-items: center; text-align: center; color: #17283a; text-decoration: none; border-radius: 16px; }
.inv-occ-fig { display: block; width: 100%; aspect-ratio: 5 / 6; overflow: hidden; border-radius: 14px; background: #efe9de; box-shadow: 0 1px 2px rgba(23,40,58,.06), 0 14px 30px -18px rgba(23,40,58,.35); transition: transform .25s ease, box-shadow .25s ease; }
.inv-occ-fig canvas { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 12%; }
.inv-occ-tile:hover .inv-occ-fig, .inv-occ-tile:focus-visible .inv-occ-fig { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(23,40,58,.08), 0 22px 40px -18px rgba(23,40,58,.45); }
.inv-occ-name { margin-top: 12px; font-weight: 700; font-size: 1.05rem; }
.inv-occ-sub { margin-top: 2px; font-size: .84rem; color: #6a7684; line-height: 1.35; }
.inv-occ-count { margin-top: 6px; font-size: .78rem; font-weight: 600; color: #9a7a52; letter-spacing: .02em; }
.inv-occ-tile:hover, .inv-occ-tile:focus-visible { color: #17283a; }

/* how it works */
.inv-how { padding: 56px 0 72px; }
.inv-how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; counter-reset: none; }
.inv-how-steps li { position: relative; padding: 30px 26px 26px; background: #fff; border: 1px solid #ece5d8; border-radius: 18px; }
.inv-how-steps b { position: absolute; top: 18px; inset-inline-end: 22px; font-family: "Cormorant Garamond", Georgia, serif; font-weight: 600; font-size: 2.6rem; line-height: 1; color: #e6d6b4; }
.inv-how-ico svg { width: 42px; height: 42px; fill: none; stroke: #9a7a52; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.inv-how-steps h3 { margin: 14px 0 6px; font-size: 1.12rem; color: #17283a; }
.inv-how-steps p { margin: 0; color: #5a6877; line-height: 1.55; }

/* browse */
.inv-flow .inv-gallery-wrap { padding-top: 22px; }
.inv-browse-head { margin: 0 0 18px; }
.inv-back { display: inline-flex; align-items: center; gap: 6px; padding: 6px 0; border: 0; background: none; color: #6a7684; font-weight: 600; font-size: .92rem; text-decoration: none; cursor: pointer; }
.inv-back:hover { color: #17283a; background: none; }
.inv-occ-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 0 4px; margin: 0 0 18px; }
.inv-occ-strip::-webkit-scrollbar { display: none; }
.inv-occ-strip .inv-chip { white-space: nowrap; text-decoration: none; flex: none; }
.inv-occ-strip .inv-chip[aria-current="true"] { background: #17283a; border-color: #17283a; color: #fff; }
.inv-browse-title { margin: 6px 0 4px; font-family: "Cormorant Garamond", var(--font-display); font-weight: 600; font-size: clamp(2rem, 1.5rem + 2vw, 3rem); color: #17283a; line-height: 1.1; }
html[lang="yi"] .inv-browse-title { font-family: "Frank Ruhl Libre", var(--font-display); font-weight: 700; }
.inv-browse-sub { margin: 0 0 14px; color: #6a7684; }
.inv-subchips { margin-bottom: 4px; }
.inv-flow .inv-chips[aria-label="Filter by simcha"] { display: none; }
.inv-flow .inv-section-head h2 { display: none; }
.inv-flow .inv-section-head { justify-content: flex-start; margin-bottom: 8px; }
.inv-flow .inv-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 0; margin-bottom: 18px; border-top: 1px solid #ece5d8; border-bottom: 1px solid #ece5d8; }
.inv-flow .inv-tools .inv-chips { margin: 0; }
.inv-flow .inv-colors .inv-chip { padding: 5px 11px; font-size: .84rem; }
.inv-flow .inv-gallery { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 34px 26px; }
.inv-flow .inv-tile canvas { border-radius: 6px; box-shadow: 0 1px 2px rgba(23,40,58,.08), 0 16px 34px -20px rgba(23,40,58,.45); transition: transform .25s ease, box-shadow .25s ease; }
.inv-flow .inv-tile:hover canvas, .inv-flow .inv-tile:focus-visible canvas { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(23,40,58,.1), 0 26px 44px -20px rgba(23,40,58,.5); }
.inv-flow .inv-tile-type, .inv-flow .inv-tile-new { display: none; }
.inv-flow .inv-tile-cap { padding-top: 12px; }
.inv-flow .inv-tile-name { font-weight: 600; font-size: .92rem; color: #33424f; }
.inv-flow .inv-tile-go { opacity: 0; transition: opacity .2s; font-size: .82rem; }
.inv-flow .inv-tile:hover .inv-tile-go, .inv-flow .inv-tile:focus-visible .inv-tile-go { opacity: 1; }

/* editor */
.inv-flow .inv-editor-wrap { background: #f6f2ea; border-top: 0; padding-top: 10px; }
.inv-editbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 14px; }
.inv-editbar-name { font-size: .9rem; color: #6a7684; font-weight: 600; text-align: end; }
.inv-flow .inv-editor { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 44px; }
.inv-flow .inv-preview { order: -1; }
.inv-flow .inv-preview-sticky { top: 86px; }
.inv-flow .inv-preview-card { background: radial-gradient(120% 90% at 50% 0%, #fff 0%, #efe8db 70%); border: 1px solid #ebe3d4; border-radius: 22px; padding: 30px; }
.inv-flow .inv-preview-card canvas { max-height: max(420px, calc(100vh - 300px)); }
.inv-flow .inv-form { background: #fff; border: 1px solid #ece5d8; border-radius: 20px; padding: 26px 26px 18px; }
.inv-flow .inv-form h2 { font-family: "Cormorant Garamond", var(--font-display); font-weight: 600; font-size: 2rem; color: #17283a; }
html[lang="yi"] .inv-flow .inv-form h2 { font-family: "Frank Ruhl Libre", var(--font-display); font-weight: 700; }
.inv-flow .inv-swatches { flex-wrap: nowrap; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: thin; }
.inv-flow .inv-swatches > * { flex: none; }
.inv-flow .inv-jump { display: none !important; }
.inv-flow .inv-actions .inv-share { background: #17283a; border-color: #17283a; color: #fff; }

/* phone dock */
.inv-dock { display: none; }
@media (max-width: 860px) {
  .inv-dock:not([hidden]) { display: flex; position: fixed; z-index: 60; left: 12px; right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); gap: 8px; padding: 8px; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid #e6dfd2; border-radius: 18px; box-shadow: 0 16px 40px -14px rgba(23,40,58,.45); }
  .inv-dock-btn { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border: 1px solid #e3dccf; border-radius: 12px; background: #fff; color: #17283a; font-weight: 700; font-size: .95rem; }
  .inv-dock-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .inv-dock-main { flex: 1.3; background: #17283a; border-color: #17283a; color: #fff; }
  .inv-flow[data-view="edit"] { padding-bottom: 90px; }
  .inv-flow .inv-editor { grid-template-columns: 1fr; gap: 20px; }
  .inv-flow .inv-preview-sticky { position: static; }
  .inv-flow .inv-preview-card { padding: 18px; max-width: 420px; }
  .inv-flow .inv-preview-card canvas { max-height: 62vh; width: auto; }
  .inv-flow .inv-form { padding: 20px 16px 12px; border-radius: 16px; }
  .inv-home-hero { grid-template-columns: 1fr; gap: 28px; padding: 36px 0 18px; text-align: center; }
  .inv-home-kicker { justify-content: center; }
  .inv-home-sub { margin-left: auto; margin-right: auto; }
  .inv-home-cta { justify-content: center; }
  .inv-home-art { order: -1; }
  .inv-occ { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .inv-occ-lead { grid-column: 1 / -1; }
  .inv-occ-lead .inv-occ-fig { aspect-ratio: 16 / 10; }
  .inv-occ-lead .inv-occ-fig canvas { object-position: center 30%; }
  .inv-how-steps { grid-template-columns: 1fr; gap: 12px; }
  .inv-how-steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; padding: 18px; }
  .inv-how-ico { grid-row: span 2; }
  .inv-how-steps h3 { margin: 0 0 2px; }
  .inv-how-steps b { font-size: 2rem; top: 12px; }
  .inv-how { padding: 32px 0 48px; }
  .inv-flow .inv-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 14px; }
  .inv-flow .inv-tile-go { display: none; }
  .inv-flow .inv-tile-name { font-size: .84rem; }
  .inv-flow .inv-tools { flex-wrap: nowrap; overflow-x: auto; }
  .inv-flow .inv-colors { flex-wrap: nowrap; }
  .inv-flow .inv-colors .inv-chip { flex: none; white-space: nowrap; }
  .inv-editbar-name { font-size: .8rem; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 1099px) and (min-width: 861px) { .inv-occ { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px 14px; } .inv-occ-sub { display: none; } }
@media (prefers-reduced-motion: reduce) { .inv-occ-fig, .inv-flow .inv-tile canvas { transition: none; } }

.inv-flow .inv-group { min-width: 0; }
.inv-flow .inv-form, .inv-flow .inv-preview { min-width: 0; }
.inv-flow .inv-swatches { max-width: 100%; }
.inv-flow .inv-editor-wrap { background: transparent; margin: 0; }
.inv-flow .inv-section-head { margin: 0; }
.inv-flow .inv-tools .inv-search { flex: 0 1 240px; margin-inline-start: auto; }
.inv-flow .inv-tools .inv-search input { padding-top: 7px; padding-bottom: 7px; }
.inv-flow .inv-count { margin: 0 0 14px; }

@media (max-width: 860px) {
  .inv-flow .inv-actions-after { margin-top: 4px; padding: 18px 16px; background: #fff; border: 1px solid #ece5d8; border-radius: 16px; }
  .inv-flow .inv-tools { flex-wrap: wrap; overflow: visible; gap: 10px; }
  .inv-flow .inv-tools .inv-colors { width: 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .inv-flow .inv-tools .inv-search { flex: 1 1 100%; margin: 0; }
  .inv-subchips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .inv-subchips .inv-chip { flex: none; white-space: nowrap; }
  .inv-browse-sub { font-size: .92rem; }
  .inv-flow .inv-sample-lang .inv-small { font-size: .85rem; }
}

@media (min-width: 861px) { .inv-flow .inv-preview-card canvas { max-height: max(400px, calc(100vh - 380px)); } .inv-flow .inv-preview-card { padding: 24px; } }

/* iteration 2: occasions higher on the first screen */
.inv-home-hero { padding: 40px 0 8px; }
.inv-home-art .inv-hero-fan { width: min(430px, 100%); margin: 0 auto; }
.inv-occ-wrap { padding-top: 18px; }
@media (max-width: 860px) {
  .inv-home-hero { padding: 18px 0 4px; gap: 14px; }
  .inv-home-art .inv-hero-fan { width: min(250px, 66%); }
  .inv-home-kicker { font-size: .7rem; margin-bottom: 10px; }
  .inv-home-title { font-size: 2.15rem; margin-bottom: 10px; }
  .inv-home-sub { font-size: 1rem; margin-bottom: 18px; }
  .inv-home-cta .button { padding: 12px 20px; }
  .inv-home-h2 { margin-bottom: 16px; }
  .inv-flow .inv-tools .inv-search { display: none; }
  .inv-flow .inv-tools { padding: 8px 0; border-top: 0; }
  .inv-browse-title { margin-top: 0; }
  .inv-occ-strip { margin-bottom: 10px; }
}

/* ---- v5 (Nov 2026): premium cream & gold home, stats, yom tov row ---- */
#invHome { background: radial-gradient(1200px 520px at 78% 0%, #fbf3e1 0%, rgba(251,243,225,0) 70%), linear-gradient(180deg, #fdfaf4 0%, #f7f0e3 46%, #fbf8f2 100%); }
.inv-home-hero { position: relative; }
.inv-home-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(176,141,74,0), #c9a865 30%, #b08d4a 70%, rgba(176,141,74,0)); }
.inv-home-title { color: #1b2533; }
.inv-btn-primary { background: linear-gradient(180deg, #b8924a, #9a7633) !important; border-color: #8c6a2c !important; color: #fffaf0 !important; box-shadow: 0 10px 22px -14px rgba(120,86,30,.9); }
.inv-btn-primary:hover, .inv-btn-primary:focus-visible { background: linear-gradient(180deg, #c49d55, #a37d39) !important; }
.inv-stats { list-style: none; margin: 30px 0 0; padding: 18px 0 0; display: flex; flex-wrap: wrap; gap: 14px 30px; border-top: 1px solid rgba(176,141,74,.35); }
.inv-stats li { display: flex; flex-direction: column; gap: 2px; min-width: 84px; }
.inv-stats b { font-family: "Cormorant Garamond", "Frank Ruhl Libre", serif; font-weight: 700; font-size: 2rem; line-height: 1; color: #9a7330; letter-spacing: .01em; }
.inv-stats span { font-size: .78rem; color: #6c6352; letter-spacing: .04em; }
html[lang="yi"] .inv-stats span { font-size: .9rem; letter-spacing: 0; }
.inv-hero-fan { width: min(600px, 100%); }
.inv-hero-fan canvas { border-radius: 6px; box-shadow: 0 2px 6px rgba(60,40,10,.18), 0 30px 50px -22px rgba(60,40,10,.55); }
.inv-yt-wrap { padding-top: 8px; }
.inv-yt-note { margin: -6px 0 22px; color: #6c6352; font-size: 1rem; max-width: 60ch; }
.inv-occ-yt .inv-occ-fig { aspect-ratio: 5 / 6.4; }
.inv-occ-yt .inv-occ-name { font-weight: 600; }
.inv-occ-fig { background: #efe6d4; }
.inv-occ-tile:hover .inv-occ-fig, .inv-occ-tile:focus-visible .inv-occ-fig { box-shadow: 0 1px 2px rgba(60,40,10,.08), 0 22px 36px -18px rgba(120,86,30,.55); }
.inv-occ-count { color: #9a7330; }
@media (max-width: 700px) {
  .inv-stats { gap: 12px 20px; margin-top: 22px; }
  .inv-stats li { min-width: 0; flex: 1 1 40%; }
  .inv-stats b { font-size: 1.6rem; }
}
.inv-all-link { text-align: center; margin: 26px 0 0; } .inv-all-link a { color: #8a6526; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(154,115,48,.45); padding-bottom: 2px; }
