/* ============ invite links (InviteCard.dc.html, InviteMaker.dc.html) ============
   ivc- = the opened invite card (and its signed-out / dead takes), ivm- = "Invite people".
   On a wide screen both are a taped card over a dimmed page; on a phone they ride the shared
   bottom sheet (.psheet). The card is paper, so it pins the light roles like .canvas-dialog. */

.ivc-back { z-index: 210; }
.ivc-card {
    color-scheme: light;
    --paper: var(--cream); --ink: var(--gray-900); --ink-soft: var(--gray-600); --line: var(--gray-900);
    --hi-yellow: var(--yellow-500); --accent-strong: var(--blue-700);
    position: fixed; left: 50%; top: 50%; z-index: 211;
    translate: -50% -50%;
    width: min(520px, 94vw); max-height: calc(100dvh - 32px); overflow: auto; box-sizing: border-box;
    background: var(--paper); color: var(--ink);
    border: 2.5px solid var(--line); border-radius: var(--wobble-2);
    padding: 26px 28px 24px;
    box-shadow: 5px 6px 0 var(--line), 0 10px 30px color-mix(in srgb, var(--gray-900) 14%, transparent);
    rotate: -1deg;
    animation: slap .22s cubic-bezier(.2, 1.4, .5, 1);
}
.ivc-card::before { /* tape */
    content: ""; position: absolute; top: -14px; left: 50%; width: 110px; height: 26px; translate: -50% 0; rotate: 3deg;
    background: color-mix(in srgb, var(--yellow-500) 75%, transparent);
    border-left: 2px dashed color-mix(in srgb, var(--black) 12%, transparent);
    border-right: 2px dashed color-mix(in srgb, var(--black) 12%, transparent);
}
.ivc-sheet { z-index: 211; padding: 0 20px 26px; }
.ivc-sheet ~ .psheet-scrim, .psheet-scrim:has(+ .ivc-sheet) { z-index: 210; }

.ivc-top { display: flex; align-items: flex-start; gap: 8px; }
.ivc-grow { flex: 1; }
.ivc-from { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 1.06rem; color: var(--ink-soft); padding-top: 8px; }
.ivc-from b { font-weight: 400; color: var(--ink); }
.ivc-av { width: 30px; height: 30px; font-size: 19px; }
.ivc-wait { margin: 18px 0; color: var(--ink-soft); }

/* the board as its post-it, in its own palette */
.ivc-board { display: flex; align-items: center; gap: 18px; margin: 14px 0 4px; }
.ivc-note {
    position: relative; flex-shrink: 0; width: 120px; min-height: 104px; box-sizing: border-box; padding: 22px 10px 12px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; rotate: -3deg;
    background: linear-gradient(180deg, color-mix(in srgb, var(--black) 4%, transparent), transparent 22%), var(--p-note);
    color: var(--p-note-ink);
    border-radius: 2px 2px 24px 2px / 2px 2px 14px 2px;
    box-shadow: 0 1px 1px color-mix(in srgb, var(--black) 12%, transparent), 4px 10px 14px -6px color-mix(in srgb, var(--black) 35%, transparent);
}
.ivc-note::before {
    content: ""; position: absolute; top: -9px; left: 50%; translate: -50% 0; width: 22px; height: 22px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--white) 55%, var(--p-accent)), var(--p-accent) 55%, color-mix(in srgb, var(--black) 30%, var(--p-accent)));
    box-shadow: 0 3px 4px color-mix(in srgb, var(--black) 35%, transparent);
}
.ivc-note .nm { font-family: var(--font-marker); font-weight: 700; font-size: 24px; line-height: 1; overflow-wrap: anywhere; }
.ivc-note .sub { font-size: .8rem; opacity: .75; }
.ivc-what { flex: 1; min-width: 0; }
.ivc-name { margin: 0; font-size: 38px; line-height: 1.05; overflow-wrap: anywhere; }
.ivc-name.sm { font-size: 30px; }
.ivc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: .94rem; color: var(--ink-soft); margin-top: 2px; }
.ivc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--green-500); margin-right: 5px; }
.ivc-tag { font-size: .8rem; padding: 1px 9px; border-radius: 10px; background: var(--purple-100); color: var(--purple-900); }
.ivc-desc { margin: 8px 0 0; font-size: 1.06rem; line-height: 1.3; }
.ivc-desc.soft { color: var(--ink-soft); }

/* the link it came from: always the full real address */
.ivc-link { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: .88rem; color: var(--ink-soft); overflow-wrap: anywhere; }
.ivc-link code { font-family: var(--font-mono); font-size: .82rem; padding: 1px 6px; border-radius: 6px; background: var(--stone-200); color: var(--ink); }

.ivc-ok { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 8px 12px; border-radius: 12px 14px 10px 13px; background: var(--green-100); color: var(--green-900); }
.ivc-note2 { margin: 10px 0 0; font-size: .94rem; line-height: 1.3; color: var(--ink-soft); }
.ivc-acts { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 2.5px dashed color-mix(in srgb, var(--line) 20%, transparent); }
.ivc-sheet .ivc-acts { flex-direction: column-reverse; align-items: stretch; }
.ivc-sheet .ivc-acts .ivc-grow { display: none; }

/* run out / signed out: no board, a torn link or an envelope */
.ivc-dead { display: flex; align-items: center; gap: 16px; margin: 4px 0 2px; }
.ivc-torn {
    flex-shrink: 0; width: 92px; height: 80px; display: grid; place-items: center; rotate: -4deg;
    background: var(--stone-200); color: var(--gray-500);
    border: 2.5px dashed var(--gray-500); border-radius: 4px 10px 6px 12px;
}
.ivc-torn.env { background: var(--yellow-200); color: var(--ink); border: 2.5px solid var(--line); rotate: 3deg; }

.ivc-toast {
    position: fixed; left: 50%; top: 16px; translate: -50% 0; z-index: 212;
    display: flex; align-items: center; gap: 10px; padding: 10px 16px;
    background: var(--green-100); color: var(--green-900);
    border: 2.5px solid var(--gray-900); border-radius: 14px 18px 12px 16px; box-shadow: 3px 4px 0 var(--gray-900);
}

/* ---- "Invite people" ---- */
.ivm-head { flex: 1; }
.ivm-sub { font-size: 1rem; color: var(--ink-soft); margin-top: 2px; }
.ivm-linkbox { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.ivc-sheet .ivm-linkbox { flex-direction: column; align-items: stretch; }
.ivm-url {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; min-height: 48px; box-sizing: border-box; padding: 6px 14px;
    background: var(--white); color: var(--ink); border: 2px solid var(--line); border-radius: var(--wobble-1);
    font-family: var(--font-mono); font-size: .94rem; overflow-wrap: anywhere;
}
.ivm-url b { font-weight: 400; color: var(--accent-strong); }
.ivm-wait { color: var(--ink-soft); font-family: var(--font-hand); }
.ivm-btns { display: flex; gap: 10px; }
.ivm-wide { flex: 1; }
.ivm-who { margin: 10px 0 0; font-size: .94rem; line-height: 1.3; color: var(--ink-soft); }
.ivm-fold {
    display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 16px; padding: 12px 0 0;
    border: none; border-top: 2.5px dashed color-mix(in srgb, var(--line) 20%, transparent);
    background: none; font: inherit; font-size: 1.06rem; color: var(--ink); cursor: pointer; text-align: left;
}
.ivm-fold small { margin-left: auto; font-size: .88rem; color: var(--ink-soft); }
.ivm-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ivm-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.ivm-row .nm { flex: 1; min-width: 130px; }
.ivm-seg { display: flex; border: 2px solid var(--line); border-radius: 12px 14px 12px 10px; overflow: hidden; }
.ivm-seg button { min-height: 38px; padding: 0 11px; border: none; border-left: 2px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: .94rem; cursor: pointer; }
.ivm-seg button:first-child { border-left: none; }
.ivm-seg button.on { background: var(--hi-yellow); }
.ivm-fresh { margin: 2px 0 0; font-size: .88rem; color: var(--ink-soft); }
.ivm-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: .94rem; color: var(--ink-soft); }

/* ---- the board map: who's on the board, and bringing more in ---- */
.map-people { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; margin: 2px 2px 4px; padding-bottom: 8px; border-bottom: 2px dashed color-mix(in srgb, var(--line) 20%, transparent); }
.map-invite {
    display: flex; align-items: center; gap: 8px; width: 100%; min-height: 42px; box-sizing: border-box; padding: 0 10px;
    font: inherit; font-size: 1.06rem; color: var(--gray-900); text-align: left; cursor: pointer;
    background: var(--yellow-200); border: 2px solid var(--line); border-radius: 10px 12px 10px 9px; box-shadow: 2px 2px 0 var(--line);
}
.map-invite:hover { translate: -1px -1px; box-shadow: 3px 3px 0 var(--line); }
.map-invite .map-name { flex: 1; }
.map-invite small { font-size: .82rem; color: var(--gray-600); }
.map-search { flex-shrink: 0; margin: 8px 2px 4px; }
