* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f7f8fb;
    color: #101828;
    font-family: Arial, sans-serif;
}

a {
    color: #d92d73;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.app-shell {
    width: min(1080px, calc(100% - 24px));
    margin: 0 auto;
    padding: 18px 0 42px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 48px;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    padding: 30px 0 28px;
    border-bottom: 1px solid #dfe3ea;
}

.hero h1 {
    margin: 0 0 8px;
    font-size: clamp(32px, 5vw, 54px);
}

.hero p {
    margin: 0;
    max-width: 660px;
    color: #485467;
    font-size: 18px;
    line-height: 1.45;
}

.stat-strip {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stat-strip span {
    min-width: 110px;
    padding: 12px 14px;
    border: 1px solid #dfe3ea;
    border-radius: 8px;
    background: #fff;
    color: #485467;
    text-align: center;
}

.stat-strip strong {
    display: block;
    color: #101828;
    font-size: 26px;
    line-height: 1;
}

.grid {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel,
.message,
.invite-card,
.empty-state {
    border: 1px solid #dfe3ea;
    border-radius: 8px;
    background: #fff;
}

.panel {
    padding: 20px;
}

.panel.narrow {
    max-width: 520px;
    margin: 24px auto 0;
}

.panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

.panel summary {
    margin: 0 0 16px;
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
}

label {
    display: block;
    margin: 0 0 6px;
    color: #344054;
    font-weight: 700;
}

input,
select,
button,
.button-link {
    width: 100%;
    min-height: 46px;
    padding: 11px 12px;
    margin: 0 0 14px;
    border-radius: 8px;
    font-size: 16px;
}

input,
select {
    border: 1px solid #cfd6e3;
    background: #fff;
    color: #101828;
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto;
    margin: 0 0 14px;
    color: #344054;
    cursor: pointer;
    font-weight: 700;
}

.checkbox-row input {
    width: 20px;
    min-height: 20px;
    margin: 0;
    padding: 0;
    accent-color: #ff4f8b;
    cursor: pointer;
}

button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #ff4f8b;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    text-decoration: none;
}

button:disabled {
    cursor: not-allowed;
    background: #cfd6e3;
}

.delete,
.icon-delete {
    background: #667085;
}

.message {
    margin-top: 18px;
    padding: 14px 16px;
}

.message.error {
    border-color: #f7b7b7;
    background: #fff1f1;
    color: #9b1c1c;
}

.message.success {
    border-color: #b9e6c9;
    background: #effaf3;
    color: #157347;
}

.manual-fields {
    padding: 14px;
    margin-bottom: 14px;
    border-radius: 8px;
    background: #f7f8fb;
}

.manual-fields summary {
    width: fit-content;
    margin-bottom: 0;
    color: #d92d73;
    cursor: pointer;
    font-weight: 700;
}

.manual-fields[open] summary {
    margin-bottom: 12px;
}

.manual-fields input:last-child {
    margin-bottom: 0;
}

.invite-save-row {
    display: grid;
}

.poster-actions p {
    margin: 0 0 16px;
    color: #485467;
}

.mobile-share-panel {
    display: none !important;
}

.copy-status {
    display: block;
    min-height: 20px;
    margin: -6px 0 14px;
    color: #157347;
    font-weight: 700;
}

.poster-generator {
    display: grid;
    gap: 8px;
    padding-top: 4px;
}

.poster-generator label {
    margin-bottom: -2px;
}

.poster-generator select {
    margin-bottom: 6px;
}

.poster-generator button {
    margin-bottom: 0;
}

.poster-generator + .button-link {
    margin-top: 14px;
}

.invite-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.invite-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 18px;
}

.invite-card h3 {
    margin: 0 0 8px;
    font-size: 22px;
    overflow-wrap: anywhere;
}

.invite-card p,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 16px;
    margin: 0 0 10px;
    color: #485467;
}

.meta-row {
    align-items: center;
    margin-bottom: 0;
    font-size: 14px;
}

.icon-delete {
    width: 44px;
    min-height: 44px;
    padding: 0;
    margin: 0;
}

.icon-delete svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.user-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
    padding: 12px 0;
    border-top: 1px solid #dfe3ea;
}

.user-edit {
    display: grid;
    grid-template-columns: 130px 64px minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.user-link {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
}

.user-row input,
.user-row button {
    margin: 0;
}

.empty-state {
    display: grid;
    gap: 6px;
    padding: 24px;
    color: #485467;
}

.empty-state strong {
    color: #101828;
    font-size: 20px;
}

.poster-canvas,
.is-hidden {
    display: none;
}

@media (max-width: 760px) {
    .app-shell {
        width: min(100% - 18px, 1080px);
        padding: 10px 0 28px;
    }

    .topbar,
    .hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar {
        gap: 8px;
        min-height: 38px;
    }

    .hero {
        gap: 14px;
        padding: 18px 0;
    }

    .topbar nav,
    .stat-strip {
        justify-content: flex-start;
    }

    .stat-strip {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .stat-strip span {
        min-width: 0;
        padding: 9px 10px;
    }

    .stat-strip strong {
        font-size: 22px;
    }

    .grid {
        gap: 14px;
        margin-top: 14px;
    }

    .grid.two,
    .user-row,
    .user-edit {
        grid-template-columns: 1fr;
    }

    .panel {
        padding: 14px;
    }

    .desktop-share-panel {
        display: none !important;
    }

    .mobile-share-panel {
        display: block !important;
        padding: 12px;
        margin-top: 0;
        border-radius: 8px;
        background: #f7f8fb;
    }

    .panel h2,
    .panel summary {
        margin-bottom: 12px;
        font-size: 22px;
    }

    label {
        font-size: 15px;
    }

    input,
    select,
    button,
    .button-link {
        min-height: 44px;
        margin-bottom: 12px;
        font-size: 16px;
    }

    .manual-fields {
        padding: 12px;
        margin-bottom: 12px;
    }

    .invite-save-row {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 10px;
        align-items: end;
    }

    .invite-save-row input,
    .invite-save-row button {
        margin-bottom: 12px;
    }

    .manual-fields > summary,
    .poster-actions > summary {
        color: #101828 !important;
        font-size: 16px !important;
        line-height: 1.2;
    }

    .invite-list {
        gap: 10px;
        margin-top: 14px;
    }

    .invite-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        padding: 14px;
    }

    .invite-card h3 {
        margin-bottom: 6px;
        font-size: 21px;
        line-height: 1.15;
    }

    .invite-card p,
    .meta-row {
        gap: 5px 12px;
        margin-bottom: 8px;
        font-size: 15px;
        line-height: 1.3;
    }

    .meta-row {
        font-size: 14px;
    }

    .icon-delete {
        width: 34px;
        min-height: 34px;
    }

    .icon-delete svg {
        width: 17px;
        height: 17px;
    }

    .poster-actions:not([open]) {
        border-color: transparent;
        background: #f7f8fb;
        padding-bottom: 2px;
    }

    .mobile-share-panel:not([open]) {
        padding: 12px;
    }

    .poster-actions:not([open]) summary {
        margin-bottom: 0;
    }

    .panel summary::marker,
    .manual-fields summary::marker,
    .poster-actions summary::marker {
        color: currentColor;
        font-size: 0.82em;
    }

    .hero h1 {
        margin-bottom: 0;
        font-size: 30px;
    }
}
