.shared-plan-composer-open {
    overflow: hidden;
}

.shared-plan-composer-overlay {
    position: fixed;
    inset: 0;
    z-index: 2400;
    pointer-events: none;
    visibility: hidden;
}

.shared-plan-composer-overlay.open {
    pointer-events: auto;
    visibility: visible;
}

.shared-plan-composer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.shared-plan-composer-overlay.open .shared-plan-composer-backdrop {
    opacity: 1;
}

.shared-plan-composer-sheet {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(100%, 520px);
    max-height: calc(100dvh - 12px);
    display: flex;
    flex-direction: column;
    transform: translate(-50%, 100%);
    background:
        radial-gradient(circle at top, rgba(244, 63, 94, 0.14), transparent 40%),
        linear-gradient(180deg, rgba(20, 20, 22, 0.98), rgba(6, 6, 8, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.45);
    color: #fff;
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.shared-plan-composer-overlay.open .shared-plan-composer-sheet {
    transform: translate(-50%, 0);
}

.shared-plan-composer-handle {
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    margin: 10px auto 0;
}

.shared-plan-composer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px 0;
}

.shared-plan-composer-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 4px;
}

.shared-plan-composer-header h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.shared-plan-composer-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.shared-plan-composer-body {
    padding: 16px 20px 0;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.shared-plan-identity {
    margin-bottom: 14px;
    min-height: 48px;
}

.shared-plan-signed-in {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.shared-plan-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.shared-plan-avatar-fallback {
    background: rgba(244, 63, 94, 0.2);
    color: #f43f5e;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.shared-plan-signed-in-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-plan-sign-out {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
}

.shared-plan-sign-out:active {
    background: rgba(255, 255, 255, 0.08);
}

.shared-plan-field {
    display: block;
    margin-bottom: 14px;
}

.shared-plan-field span {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.50);
    margin-bottom: 8px;
}

.shared-plan-field input,
.shared-plan-field textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 16px;
    padding: 14px 15px;
    font: inherit;
    resize: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.shared-plan-field textarea {
    min-height: 92px;
    line-height: 1.45;
}

.shared-plan-field input:focus,
.shared-plan-field textarea:focus {
    outline: none;
    border-color: rgba(244, 63, 94, 0.5);
    box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.15);
}

.shared-plan-preview {
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    padding: 14px;
}

.shared-plan-preview-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.shared-plan-preview-list {
    display: grid;
    gap: 8px;
}

.shared-plan-preview-item {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
}

.shared-plan-preview-time {
    min-width: 54px;
    color: #fda4af;
    font-weight: 700;
}

.shared-plan-preview-name {
    color: rgba(255, 255, 255, 0.82);
}

.shared-plan-composer-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    margin-top: auto;
    padding: 24px 20px calc(20px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(6, 6, 8, 0), rgba(6, 6, 8, 0.98) 28%);
}

.shared-plan-composer-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

.shared-plan-composer-close:active {
    transform: scale(0.92);
}

.shared-plan-composer-close:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
}

.shared-plan-preview-name {
    color: rgba(255, 255, 255, 0.82);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.shared-plan-preview-list {
    max-height: 200px;
    overflow-y: auto;
}

.shared-plan-primary-btn,
.shared-plan-secondary-btn,
.shared-plan-seed-btn {
    border: none;
    border-radius: 16px;
    min-height: 48px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.shared-plan-secondary-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: filter 0.1s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.shared-plan-secondary-btn:hover {
    filter: brightness(1.1);
}

.shared-plan-secondary-btn:active {
    transform: scale(0.97);
    filter: brightness(0.9);
}

.shared-plan-secondary-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 2px;
}

.shared-plan-secondary-btn:disabled,
.shared-plan-primary-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.shared-plan-primary-btn,
.shared-plan-seed-btn {
    flex: 1.25;
    background: linear-gradient(180deg, #f43f5e 0%, #e11d48 100%);
    color: #fff;
    box-shadow: 0 10px 26px rgba(225, 29, 72, 0.24);
    transition: filter 0.1s, transform 0.1s;
    -webkit-tap-highlight-color: transparent;
}

.shared-plan-primary-btn:hover {
    filter: brightness(1.08);
}

.shared-plan-primary-btn:active {
    transform: scale(0.97);
    filter: brightness(0.92);
}

.shared-plan-primary-btn:focus-visible {
    outline: 2px solid #f43f5e;
    outline-offset: 2px;
}

.shared-plan-seed-btn {
    width: 100%;
    margin-top: 12px;
    -webkit-tap-highlight-color: transparent;
}

.shared-plan-seed-btn:hover {
    filter: brightness(1.08);
}

.shared-plan-seed-btn:active {
    transform: scale(0.97);
    filter: brightness(0.92);
}

.shared-plan-seed-btn:focus-visible {
    outline: 2px solid #f43f5e;
    outline-offset: 2px;
}

.shared-plan-seed-card {
    position: relative;
}

.shared-plan-seed-dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}

.shared-plan-seed-dismiss:active {
    background: rgba(255, 255, 255, 0.15);
}

.shared-plan-summary-card,
.shared-plan-seed-card {
    margin: 0 0 14px;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.07);
}

.shared-plan-summary-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.shared-plan-summary-title,
.shared-plan-seed-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.shared-plan-summary-meta,
.shared-plan-seed-copy {
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.64);
    margin: 0;
    margin-top: 6px;
}

.shared-plan-summary-link {
    font-size: 12px;
    font-weight: 700;
    color: #fda4af;
    text-decoration: none;
    white-space: nowrap;
}

.shared-plan-meetup-card {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.22);
}

.shared-plan-meetup-kicker,
.shared-plan-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.46);
    margin-bottom: 5px;
}

.shared-plan-meetup-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.shared-plan-meetup-copy {
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 4px;
}

.shared-plan-section {
    margin-top: 12px;
}

.shared-plan-suggestions,
.shared-plan-activity-list {
    display: grid;
    gap: 8px;
}

.shared-plan-suggestion-chip,
.shared-plan-activity-item {
    padding: 10px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.shared-plan-suggestion-title {
    font-size: 12px;
    line-height: 1.4;
    color: #fff;
}

.shared-plan-suggestion-note,
.shared-plan-activity-text,
.shared-plan-suggestions-empty {
    font-size: 12px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.58);
    margin-top: 4px;
}

.shared-plan-activity-actor {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    margin-right: 4px;
}

.rsvp-badge-maybe {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

.rsvp-badge-later {
    background: rgba(96, 165, 250, 0.12);
    color: #93c5fd;
}

@media (max-width: 640px) {
    .shared-plan-composer-sheet {
        width: 100%;
        border-left: none;
        border-right: none;
    }

    .shared-plan-composer-header {
        padding: 12px 16px 0;
    }

    .shared-plan-composer-body {
        padding: 14px 16px 0;
    }

    .shared-plan-composer-actions {
        padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    }
}
