/* One public invitation companion shared by home and the real app pages.
   Existing runtime paper/ink/line and Romla/Georgia own the visual language. */
:root { --z-invitation: 25; }
.invitation-intro { --ii-highlight: #d5f78b; }
#invite-introduction { position: fixed; z-index: var(--z-invitation); right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom)); width: min(390px, calc(100vw - 32px));
  display: flex; flex-direction: column; max-height: calc(100dvh - 48px);
  color: var(--ink); font-family: Georgia, 'Times New Roman', serif; }
.ii-card { background: var(--card, #fff); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 12px 45px rgba(0,0,0,.11); padding: 22px 24px 14px;
  min-height: 0; flex: 0 1 auto;
  max-height: calc(100dvh - 32px); overflow-y: auto; scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent; }
#invite-introduction .ii-card[inert] { pointer-events: none; }
.ii-card * { box-sizing: border-box; }
.ii-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#invite-introduction[data-step="welcome"] .ii-card { position: relative; }
#invite-introduction[data-step="welcome"] .ii-top { position: absolute; top: 8px; right: 8px; }
#invite-introduction[data-step="welcome"] #ii-close { margin: 0; }
#ii-label { color: var(--accent-ink, #646464); font-size: 12px; margin: 0; font-style: italic; }
#ii-title { font: 400 36px/1.05 'Romla', Georgia, serif; letter-spacing: -.02em; margin: 12px 0 16px; color: var(--ink); }
#ii-title:focus { outline: none; } /* Programmatically focused heading, not a control. */
#ii-copy { font-size: 16px; line-height: 1.45; margin: 0; }
#ii-detail { color: var(--accent-ink, #646464); font-size: 14px; line-height: 1.45; margin: 9px 0 0; }
.ii-actions { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); margin-top: 18px; padding-top: 8px; }
:is(#invite-introduction, .ii-taste-action) button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none;
  border-radius: 999px; min-height: 44px; padding: 8px 12px; transition: background .15s, color .15s; }
:is(#invite-introduction, .ii-taste-action) button:hover { background: var(--bg); }
:is(#invite-introduction, .ii-taste-action) button:active { background: var(--line); }
:is(#invite-introduction, .ii-taste-action) button:focus-visible { outline: 2px solid var(--logo-cobalt, #0000f6); outline-offset: 2px; }
:is(#invite-introduction, .ii-taste-action) button:disabled { opacity: .5; cursor: default; }
#invite-introduction #ii-back[hidden], #invite-introduction #ii-skip[hidden], #invite-introduction #ii-next[hidden], #invite-introduction #ii-filters[hidden] { display: none; }
#ii-loading { font: inherit; color: inherit; }
#invite-introduction[data-step="match-analysis"] .ii-next-arrow { visibility: hidden; }
#invite-introduction #ii-close { min-width: 44px; margin: -12px -12px -8px 0; font: 25px/1 Georgia, serif; color: var(--accent-ink, #646464); }
#ii-progress { color: var(--accent-ink, #646464); font-size: 11px; flex: 1; white-space: nowrap; }
#invite-introduction #ii-back { font-size: 23px; padding-left: 0; min-width: 44px; }
:is(#invite-introduction, .ii-taste-action) #ii-next { display: inline-flex; gap: 10px; align-items: center; font-size: 15px; padding-right: 0; }
#ii-next > .ii-next-arrow { font-size: 23px; line-height: 1; color: var(--accent-ink, #646464); }
#invite-introduction[data-step="welcome"] .ii-actions { border: 0; padding-top: 0; }
#invite-introduction[data-step="welcome"] #ii-progress { display: none; }
:is(#invite-introduction, .ii-taste-action) :is(#ii-next, #ii-filters).ii-primary-action {
  position: relative; isolation: isolate; width: 100%; justify-content: center; padding: 10px 20px;
  background: var(--logo-cobalt, var(--blue, #0000f6)); color: var(--card, #fff);
}
#invite-introduction .ii-actions .ii-primary-action { flex: 1; min-width: 0; white-space: nowrap; }
#invite-introduction .ii-actions:has(.ii-primary-action) #ii-progress { flex: none; }
#invite-introduction #ii-next.ii-primary-action.ii-icon-action {
  flex: 0 0 48px; width: 48px; height: 48px; padding: 0; margin-left: auto;
}
/* Only the glow breathes; the label, contrast and tap target stay still. */
:is(#invite-introduction, .ii-taste-action) .ii-primary-action::before {
  content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--logo-cobalt, var(--blue, #0000f6)) 15%, transparent);
  animation: ii-tour-pulse 3.2s ease-in-out infinite;
}
:is(#invite-introduction, .ii-taste-action) #ii-next.ii-primary-action > .ii-next-arrow { color: inherit; }
:is(#invite-introduction, .ii-taste-action) :is(#ii-next, #ii-filters).ii-primary-action:hover {
  background: color-mix(in srgb, var(--logo-cobalt, var(--blue, #0000f6)) 88%, var(--ink));
}
:is(#invite-introduction, .ii-taste-action) :is(#ii-next, #ii-filters).ii-primary-action:active {
  background: color-mix(in srgb, var(--logo-cobalt, var(--blue, #0000f6)) 75%, var(--ink));
}
:is(#invite-introduction, .ii-taste-action) .ii-primary-action:is(:hover, :focus-visible, :disabled)::before { animation: none; opacity: 0; }
@keyframes ii-tour-pulse { 0%, 100% { opacity: .1; } 50% { opacity: 1; } }
#invite-introduction[data-step="explore"] #ii-detail { margin-top: 4px; color: var(--accent, #646464); }
/* Reserve the same action footprint before/after a community choice. */
#invite-introduction[data-step="explore"] #ii-next { flex: 1; min-width: 0; width: 100%; justify-content: center; padding: 10px 20px; }
#invite-introduction[data-step="explore"] #ii-progress { flex: none; }
#invite-introduction #ii-filters { display: flex; align-items: center; justify-content: center;
  margin: 16px auto 0; font-size: 15px; text-align: center; }
#invite-introduction #ii-skip { display: block; margin: 0 auto; color: var(--accent-ink, #646464); font-style: italic; font-size: 12px; }
#invite-introduction[data-step="welcome"] #ii-title {
  color: var(--logo-cobalt, var(--blue, #0000f6)); font-size: 36px; margin: 2px 0 14px; padding-right: 36px;
}
#invite-introduction[data-step="welcome"] #ii-skip {
  width: 100%; margin: 8px 0 4px; border: 1px solid var(--line);
  color: var(--ink); font-style: normal; font-size: 15px;
}
.invitation-intro #signin-hint, .invitation-intro #account { display: none; }
.invitation-intro main { padding-bottom: var(--invitation-height, 320px); }
/* The invitation's home is a simple moving gallery. Use the existing belt,
   filling the space between the tagline and the welcome. Natural flow on a
   short screen keeps both text and signup accessible rather than overlapping. */
body.invitation-rooms { height: 100dvh; min-height: 100dvh; }
body.invitation-rooms > :is(.site-header, .hero-head, .hero-note) { flex-shrink: 0; }
body.invitation-rooms #car-viewport { position: relative; flex: 1 0 160px; min-height: 160px;
  margin: 14px 0 0; padding: 0; }
body.invitation-rooms #car-track { height: 100%; }
body.invitation-rooms .tile { height: 100%; cursor: default; }
body.invitation-rooms .tile img { width: 100%; height: 100%; object-fit: contain; }
body.invitation-rooms .hero-note { padding: 6px 16px 0; margin: 0;
  color: var(--accent-ink, #646464); font-size: 11px; line-height: 1.4; }
body.invitation-rooms .hero-note[hidden] { display: none; }
#invitation-rooms-pause { position: absolute; right: max(32px, 7vw); bottom: 10px;
  display: grid; place-items: center; color: var(--ink);
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  width: 44px; height: 44px; padding: 12px; cursor: pointer; }
#invitation-rooms-pause[hidden] { display: none; }
/* No visible carousel chrome. Keep a keyboard/screen-reader motion escape
   hatch; like a skip link it appears only when reached with the keyboard. */
#invitation-rooms-pause:not(:focus-visible) { width: 1px; height: 1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#invitation-rooms-pause svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
#invitation-rooms-pause:hover { background: var(--line); }
#invitation-rooms-pause:active { background: var(--muted); color: var(--bg); }
#invitation-rooms-pause:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
body.invitation-home { padding-bottom: var(--invitation-height, 320px); }
body.invitation-home-flow { padding-bottom: 0; }
body.invitation-home-flow #invite-introduction { position: relative; left: auto; right: auto; bottom: auto;
  flex: 0 0 auto; align-self: flex-end; max-height: none;
  margin: 12px max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)); }
/* Let people actually use the filters while retaining Next/Back. */
#invite-introduction.ii-trying :is(#ii-title, #ii-copy, #ii-detail, #ii-skip) { display: none; }
#invite-introduction.ii-trying #ii-filters { min-height: 32px; font-size: 12px; padding: 2px 0; margin-top: 0; color: var(--accent-ink); }
#invite-introduction.ii-trying .ii-actions { margin-top: 4px; }
@keyframes invitation-enter { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  body.invitation-rooms .site-header { flex-wrap: nowrap; }
  body.invitation-rooms .site-header h1 { font-size: min(2.6rem, 18vw); }
  body.invitation-rooms .header-right { min-width: 0; max-width: 100%; }
  body.invitation-rooms .tabs { flex-wrap: wrap; }
  body.invitation-home .hero-head h1 { margin-bottom: .75rem; }
  body.invitation-home .hero-head .free-line { margin-top: .7rem; }
  body.invitation-home-flow #invite-introduction { width: calc(100% - 24px);
    margin: 8px max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)); }
  #invite-introduction { width: auto; left: max(12px, env(safe-area-inset-left)); right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom)); max-height: calc(100dvh - 24px); }
  .ii-card { padding: 16px 20px 6px; border-radius: 18px; }
  #ii-title { font-size: 30px; margin: 8px 0 10px; }
  #invite-introduction[data-step="welcome"] #ii-title { font-size: clamp(30px, 8.5vw, 36px); }
  #ii-copy { font-size: 15px; }
  #ii-detail { font-size: 13px; margin-top: 6px; }
  .ii-actions { margin-top: 12px; padding-top: 4px; }
}
@media (max-height: 480px) {
  #invite-introduction { width: min(390px, calc(100vw - 24px)); left: auto; }
  #ii-title { font-size: 25px; margin: 5px 0 8px; }
  .ii-card { max-height: calc(100dvh - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  /* CSS follows the preference directly, without waiting for a JS event. */
  #invitation-rooms-pause { display: none; }
  :is(#invite-introduction, .ii-taste-action) .ii-primary-action::before { animation: none; opacity: 0; }
  :is(#invite-introduction, .ii-taste-action) button { transition: none; }
}

/* Tour-only illustrations. Working rooms and the live storefront keep their
   own renderers. The photo and ruler are the visual focus, not extra chrome. */
.invitation-showcase main { max-width: 1280px; }
/* Existing workspace controls have explicit display styles; their hidden
   attribute alone must not leak them into the tour illustration. */
#match-view.ii-room-preview > :not(#ii-showcase) { display: none; }
#match-view.ii-room-preview { padding-bottom: 0; }
#taste-view.ii-taste-preview > :not(#ii-taste-showcase) { display: none; }
body.invitation-showcase main > [hidden] { display: none; }
#ii-showcase { max-width: 760px; margin: 20px auto; color: var(--ink); }
.invitation-intro #ii-showcase { margin-left: 0; margin-right: 410px; }
.ii-scene-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 16px; margin: 0 0 12px; }
.ii-scene-heading span:last-child { color: var(--accent-ink); font-size: 13px; font-style: italic; }
.ii-room-photo { position: relative; aspect-ratio: 3 / 2; border-radius: 14px; overflow: hidden; background: var(--line); }
.ii-room-image, .ii-room-base { display: block; width: 100%; height: 100%; }
.ii-measure { position: absolute; top: 53%; left: 5%; width: 90%; height: 14px;
  border: solid white; border-width: 0 1px; color: white; filter: drop-shadow(0 1px 2px #333); }
.ii-measure::before { content: ''; position: absolute; top: 6px; width: 100%; border-top: 1px solid white; }
.ii-measure span { position: absolute; left: 50%; transform: translate(-50%, -26px); font: 14px Georgia, serif; }
.ii-wall-space { position: absolute; left: 67.66%; top: 18.27%; width: 18.12%; height: 30.91%;
  border: 1px dashed white; box-shadow: 0 0 0 1px #0002; }
.ii-space-label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); white-space: nowrap;
  background: #fffE; color: var(--ink); padding: 5px 8px; border-radius: 4px; font-size: 12px; }
.ii-analysis { display: none; position: absolute; inset: 0; place-content: center; justify-items: center;
  background: #ffffffc9; color: var(--ink); text-align: center; gap: 12px; }
.ii-analysis > span { font: 24px/1.1 'Romla', Georgia, serif; }
.ii-analysis small { font-size: 13px; }
.ii-palette { display: flex; gap: 7px; }
.ii-palette i { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #0002; }
[data-phase="1"] .ii-analysis { display: grid; animation: invitation-enter .5s ease both; }
[data-phase="1"] .ii-palette i { animation: ii-colour-arrive 1.6s ease both; }
[data-phase="1"] .ii-palette i:nth-child(2) { animation-delay: .2s; }
[data-phase="1"] .ii-palette i:nth-child(3) { animation-delay: .4s; }
[data-phase="1"] .ii-palette i:nth-child(4) { animation-delay: .6s; }
[data-phase="1"] .ii-palette i:nth-child(5) { animation-delay: .8s; }
.ii-hung-art { position: absolute; opacity: 0; pointer-events: none; clip-path: inset(0 100% 0 0);
  transition: opacity .4s ease, clip-path 1s ease; }
.ii-hung-art img { width: 100%; height: 100%; object-fit: contain; display: block; }
[data-phase="2"] .ii-hung-art { opacity: 1; clip-path: inset(0); }
:is([data-phase="1"], [data-phase="2"]) :is(.ii-measure, .ii-space-label) { display: none; }
[data-phase="2"] .ii-wall-space { border-color: transparent; box-shadow: none; }
.ii-room-steps { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; margin: 0; list-style: none;
  border-bottom: 1px solid var(--line); font-size: 14px; color: var(--accent-ink); }
.ii-room-steps li { padding: 3px 9px; border-radius: 999px; }
.ii-room-steps [aria-current] { color: var(--ink); background: var(--ii-highlight);
  text-decoration: underline; text-underline-offset: 3px; }
.ii-criteria { color: var(--accent-ink); }
.ii-works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ii-work { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 7px; color: var(--ink);
  background: var(--card); cursor: pointer; font: 13px Georgia, serif; }
.ii-work img { width: 100%; height: 80px; object-fit: contain; display: block; margin-bottom: 7px; }
.ii-work small { display: block; font-size: 11px; color: var(--accent-ink); line-height: 1.4; margin-top: 4px; }
.ii-work:hover { background: var(--bg); border-color: var(--accent-ink); }
.ii-work:active { background: var(--line); }
.ii-work[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ii-work:focus-visible { outline: 2px solid var(--logo-cobalt); outline-offset: 3px; }
.ii-example-note, .ii-image-error { font-size: 13px; line-height: 1.45; margin: 12px 0; }
.ii-example-note { color: var(--accent-ink); }
.ii-credit { font-size: 11px; line-height: 1.5; color: var(--accent-ink); }
.ii-room-notes { flex: none; padding: 0 12px; overflow-wrap: anywhere; }
.ii-room-notes .ii-example-note { font-size: 12px; margin: 12px 0 6px; }
.ii-room-notes .ii-credit { margin: 0; }
/* Room-only footer: the guide and its CTA retain their existing footprint;
   supporting credit is readable by scrolling, never pinned beside the bubble. */
body.invitation-showcase:not(.invitation-taste) main { display: flex; flex-direction: column;
  min-height: calc(100svh + 160px); padding-bottom: 32px; }
body.invitation-showcase:not(.invitation-taste) main > :is(#match-view, #invite-introduction) { flex-shrink: 0; }
.ii-room-footnotes { width: 100%; max-width: 680px; margin-top: auto; padding-top: 48px; }
@media (max-width: 700px) and (max-height: 650px) {
  /* The scrollable footer reserves a scrollbar on small screens. Keep the
     analyze action fully visible even at 320 × 568, without shrinking type. */
  .invitation-showcase:not(.invitation-taste) #invite-introduction .ii-actions { margin-top: 4px; }
}
.ii-loading-line { width: 120px; height: 2px; background: var(--line); overflow: hidden; }
.ii-loading-line::after { content: ''; display: block; height: 100%; background: var(--accent-ink); transform-origin: left;
  animation: ii-analyse 2s ease-out both; }
@keyframes ii-analyse { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.ii-gallery-picture { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ii-gallery-picture img { display: block; width: 100%; height: auto; }
@keyframes ii-colour-arrive { from { opacity: .1; } to { opacity: 1; } }
/* Two local choices. Lime means selected, not saved; text and aria-pressed
   carry the same state. The runtime component token owns this tour-only hue. */
#ii-taste-showcase { --ii-choice-selected: var(--ii-highlight); max-width: 760px; margin: 20px 410px 20px 0; }
.ii-taste-stage { display: grid; min-height: clamp(220px, 49dvh, 480px); align-items: center; }
.ii-taste-pair { --ii-choice-gap: 18px; grid-area: 1 / 1;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ii-choice-gap); }
.ii-taste-pair[hidden], .ii-taste-choice[hidden] { display: none; }
.ii-taste-choice { position: relative; isolation: isolate; min-width: 0; width: 100%; padding: 14px 14px 8px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--card); color: var(--ink);
  font: 14px/1.4 Georgia, serif; cursor: pointer; transition: background .18s, border-color .18s; }
.ii-taste-choice::before { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: var(--line); opacity: 0; }
[data-state="ready"] .ii-taste-choice::before { animation: ii-choice-pulse 4.8s ease-in-out infinite; }
[data-state="ready"] .ii-taste-choice:nth-child(2)::before { animation-delay: -2.4s; }
.ii-taste-pair:has(:hover, :focus-visible) .ii-taste-choice::before { animation: none; opacity: 0; }
.ii-taste-choice:hover:not(:disabled) { border-color: var(--accent-ink); background: var(--bg); }
.ii-taste-choice:active:not(:disabled) { background: var(--line); }
.ii-taste-choice:focus-visible { outline: 2px solid var(--logo-cobalt); outline-offset: 4px; }
.ii-taste-choice:disabled { cursor: default; }
.ii-taste-choice[aria-pressed="true"] { background: var(--card); border-color: var(--ii-choice-selected); transition: none;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--ii-choice-selected) 40%, transparent),
    0 0 26px color-mix(in srgb, var(--ii-choice-selected) 35%, transparent); }
.ii-taste-choice-label { display: block; min-height: 20px; margin-top: 10px; }
.ii-taste-art { display: block; height: clamp(180px, 38dvh, 360px); }
.ii-taste-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ii-taste-space { display: block; position: relative; overflow: hidden; border-radius: 12px; }
.ii-taste-background { display: block; width: 100%; height: 100%; object-fit: contain; }
.ii-taste-action { grid-area: 1 / 2; align-self: center; min-width: 0; padding: 4px;
  font-family: Georgia, 'Times New Roman', serif; }
.ii-taste-action #ii-next { box-sizing: border-box; line-height: 1.4; }
#ii-taste-showcase .ii-taste-action #ii-next.ii-primary-action { padding: 12px 10px; gap: 8px; }
.ii-taste-action #ii-next-text { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.ii-taste-action .ii-next-arrow { flex-shrink: 0; }
.ii-taste-status { font-size: 13px; color: var(--accent-ink); min-height: 20px; line-height: 20px; margin: 10px 0 0; text-align: center; }
[data-example="art"][data-state="choosing"] .ii-taste-choice[aria-pressed="false"] { animation: ii-choice-away .4s ease both; }
[data-example="art"][data-state="choosing"] .ii-taste-choice[aria-pressed="true"] { animation: ii-choice-chosen .4s .4s ease both; }
/* Room selection keeps the picture intact: fade the other room first, then
   slide only a right-hand selection into the left slot. No scale or exit. */
[data-example="space"][data-state="choosing"] .ii-taste-choice[aria-pressed="false"] { animation: ii-room-choice-away .3s ease both; }
[data-example="space"][data-state="choosing"] .ii-taste-choice:nth-child(2)[aria-pressed="true"] { animation: ii-room-choice-left .45s .3s ease-in-out both; }
[data-example="space"][data-state="complete"] .ii-taste-choice[aria-pressed="true"] { grid-area: 1 / 1; }
@keyframes ii-room-choice-away { to { opacity: 0; } }
@keyframes ii-room-choice-left { from { transform: translateX(0); } to { transform: translateX(calc(-100% - var(--ii-choice-gap))); } }
@keyframes ii-choice-pulse { 0%, 45%, 100% { opacity: 0; } 22% { opacity: 1; } }
@keyframes ii-choice-away { to { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes ii-choice-chosen { to { opacity: 0; transform: translateY(-12px) scale(.98); } }
#invite-introduction[data-step^="taste"] #ii-title { font-size: 34px; }
#invite-introduction[data-step^="taste"] #ii-detail { color: var(--ink); }
#invite-introduction[data-step^="taste"] #ii-detail.ii-choice-prompt { color: var(--logo-cobalt); }
#invite-introduction:is([data-step^="taste"], [data-step="storefront"]) .ii-actions { flex-wrap: wrap; }
#invite-introduction:is([data-step^="taste"], [data-step="storefront"]) #ii-next { flex-basis: 12em; }
#invite-introduction:is([data-step^="taste"], [data-step="storefront"]) #ii-next-text { min-width: 0; white-space: normal; overflow-wrap: anywhere; }
#invite-introduction:is([data-step^="taste"], [data-step="storefront"]) .ii-next-arrow { flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) {
  #ii-taste-showcase *, #ii-taste-showcase *::before { animation: none !important; transition: none !important; }
}
@media (max-width: 700px) {
  .invitation-showcase main { padding: 0 14px 24px; }
  .invitation-intro #ii-showcase { margin: 12px auto 0; }
  .invitation-showcase #invite-introduction { position: relative; inset: auto; width: 100%; margin: 16px auto 24px; max-height: none; }
  .invitation-showcase #invite-introduction[data-step^="match"] { margin-top: 12px; }
  .invitation-showcase .ii-card { max-height: none; box-shadow: 0 5px 24px #0001; }
  .ii-scene-heading { font-size: 15px; margin-bottom: 8px; }
  .ii-room-steps { font-size: 13px; }
  .ii-work { padding: 5px; font-size: 12px; }
  .ii-work img { height: 60px; }
  .ii-works { gap: 7px; }
  .ii-gallery-picture { background: var(--bg); }
  .ii-gallery-picture img { height: 430px; object-fit: contain; }
  /* Keep the room and its action together on a phone. Scale the complete
     illustration, including its measurement overlay, without cropping it. */
  .ii-room-photo { width: min(100%, calc(max(104px, 100dvh - 500px) * 1.5)); margin-inline: auto; }
  .ii-space-label { left: auto; right: 0; transform: translateY(-50%); }
  .ii-analysis { gap: 6px; }
  .ii-analysis > span { font: 14px/1.2 Georgia, 'Times New Roman', serif; }
  .ii-analysis small { font-size: 10px; }
  .ii-palette i { width: 18px; height: 18px; }
  #invite-introduction[data-step^="match"] #ii-title { font-size: clamp(24px, 6vw, 30px); }
  #invite-introduction[data-step^="match"] #ii-progress { display: none; } /* Already in the step label. */
  #invite-introduction[data-step^="match"] .ii-actions { justify-content: space-between; }
  #invite-introduction[data-step^="match"] #ii-next { white-space: nowrap; }
  #ii-taste-showcase { margin: 12px auto 0; }
  .ii-taste-stage { min-height: clamp(180px, 29dvh, 300px); }
  .ii-taste-pair { --ii-choice-gap: 12px; }
  .ii-taste-choice { padding: 10px 10px 6px; border-radius: 18px; }
  .ii-taste-choice-label { font-size: 12px; margin-top: 8px; }
  .ii-taste-art { height: clamp(135px, 23dvh, 230px); }
  #invite-introduction[data-step^="taste"] #ii-title { font-size: 30px; }
  #invite-introduction[data-step^="taste"] #ii-progress { display: none; }
  #invite-introduction[data-step^="taste"] .ii-card { padding-top: 12px; }
}
@media (max-width: 700px) and (max-height: 650px) {
  #invite-introduction[data-step^="match"] .ii-card { padding-top: 12px; }
  #invite-introduction[data-step^="match"] #ii-title { margin: 6px 0 8px; }
  #invite-introduction[data-step^="match"] .ii-actions { margin-top: 8px; }
}
/* The storefront guide is a non-modal disclosure, not another dialog. Lift its
   white handle into the upper-right banner area, with the panel below it. */
#invite-introduction.ii-floating { --ii-float-top: max(env(safe-area-inset-top), clamp(180px, 24dvh, 224px));
  left: auto; right: max(clamp(20px, 10vw, 120px), env(safe-area-inset-right));
  top: var(--ii-float-top); bottom: auto; width: min(390px, calc(100vw - 40px)); gap: 12px;
  max-height: calc(100dvh - var(--ii-float-top) - max(20px, env(safe-area-inset-bottom))); }
#invite-introduction.ii-collapsed { width: 56px; }
#invite-introduction #ii-guide-toggle { display: grid; place-items: center; align-self: flex-end; flex: none;
  width: 56px; height: 56px; padding: 0; color: var(--ink); background: var(--card, #fff);
  border: 1px solid var(--line); box-shadow: 0 5px 24px #0002; position: relative; }
#invite-introduction.ii-collapsed #ii-guide-toggle::after { content: ''; position: absolute; inset: -4px;
  border: 1px solid var(--card, #fff); border-radius: inherit; pointer-events: none;
  animation: ii-guide-pulse 3.2s ease-out infinite; }
@keyframes ii-guide-pulse {
  0%, 100% { transform: scale(1); opacity: 0; }
  18% { opacity: .7; }
  75% { transform: scale(1.22); opacity: 0; }
}
#invite-introduction #ii-guide-toggle:hover { background: var(--bg); border-color: var(--accent-ink); }
#invite-introduction #ii-guide-toggle:active { background: var(--line); }
#ii-guide-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.25; stroke-linecap: round; }
#ii-guide-toggle .ii-plus-stem { transition: opacity .18s ease; }
#ii-guide-toggle[aria-expanded="true"] .ii-plus-stem { opacity: 0; }
#invite-introduction #ii-guide-toggle[hidden], #invite-introduction .ii-card[hidden] { display: none; }
@media (max-width: 700px) {
  #invite-introduction.ii-floating { --ii-float-top: max(124px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    width: calc(100vw - 32px);
    max-height: calc(100dvh - var(--ii-float-top) - max(12px, env(safe-area-inset-bottom))); }
  #invite-introduction.ii-floating.ii-collapsed { width: 56px; }
  /* The removed sign-in row no longer reserves this small landing space. */
  .invitation-gallery #profile-head { margin-top: 3rem; }
}
@media (max-height: 360px) {
  #invite-introduction.ii-floating { --ii-float-top: max(12px, env(safe-area-inset-top)); }
}
@media (prefers-reduced-motion: reduce) {
  #ii-guide-toggle .ii-plus-stem { transition: none; }
  #invite-introduction.ii-collapsed #ii-guide-toggle::after { animation: none; opacity: .55; }
  [data-phase="1"] .ii-analysis, [data-phase="1"] .ii-palette i, .ii-loading-line::after { animation: none; }
  .ii-hung-art { transition: none; }
}
