:root {
    color-scheme: dark;
    font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--color-canvas);
    color: var(--color-text);

    --color-canvas: #0b1020;
    --color-canvas-muted: #0f1628;
    --color-canvas-translucent: rgb(11 16 32 / 72%);
    --color-canvas-translucent-strong: rgb(11 16 32 / 88%);
    --color-canvas-glow: rgb(109 94 252 / 15%);
    --color-surface: #121a2b;
    --color-surface-raised: #182238;
    --color-surface-interactive: #1c2942;
    --color-surface-hover: #23314d;
    --color-surface-translucent-subtle: rgb(18 26 43 / 52%);
    --color-surface-translucent-muted: rgb(18 26 43 / 68%);
    --color-surface-translucent-strong: rgb(18 26 43 / 84%);
    --color-text: #f3f6fb;
    --color-text-muted: #aeb9cc;
    --color-text-subtle: #8997ae;
    --color-border-subtle: #293650;
    --color-border-control: #596e95;
    --color-border-control-translucent: rgb(89 110 149 / 42%);
    --color-primary: #9aa7ff;
    --color-primary-hover: #b7c0ff;
    --color-primary-active: #8493f3;
    --color-primary-highlight: rgb(154 167 255 / 8%);
    --color-primary-soft: rgb(154 167 255 / 14%);
    --color-primary-border-subtle: rgb(154 167 255 / 24%);
    --color-primary-border: rgb(154 167 255 / 36%);
    --color-primary-border-strong: rgb(154 167 255 / 42%);
    --color-primary-underline: rgb(154 167 255 / 48%);
    --color-on-primary: #0b1020;
    --color-success: #55d6be;
    --color-success-highlight: rgb(85 214 190 / 8%);
    --color-success-soft: rgb(85 214 190 / 13%);
    --color-success-border: rgb(85 214 190 / 36%);
    --color-warning: #f6c86a;
    --color-warning-soft: rgb(246 200 106 / 13%);
    --color-warning-border: rgb(246 200 106 / 38%);
    --color-danger: #ff8793;
    --color-danger-hover: #ffa0a9;
    --color-danger-active: #ed6f7c;
    --color-danger-soft: rgb(255 135 147 / 13%);
    --color-danger-border: rgb(255 135 147 / 38%);
    --color-focus: #bac3ff;
    --color-backdrop: rgb(3 7 18 / 72%);
    --font-family-body: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-family-heading: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-family-monospace: "Cascadia Code", "Cascadia Mono", consolas, monospace;
    --font-size-small: 0.86rem;
    --font-size-compact: 0.92rem;
    --font-size-body: 1rem;
    --font-size-lead: 1.06rem;
    --font-weight-medium: 600;
    --font-weight-strong: 720;
    --font-weight-heading: 780;
    --space-extra-small: 0.35rem;
    --space-small: 0.65rem;
    --space-medium: 1rem;
    --space-large: 1.5rem;
    --space-extra-large: 2.25rem;
    --radius-small: 0.55rem;
    --radius-medium: 0.8rem;
    --radius-large: 1.1rem;
    --radius-pill: 999px;
    --control-height: 2.75rem;
    --shadow-surface: 0 12px 36px rgb(0 0 0 / 18%);
    --shadow-raised: 0 18px 50px rgb(0 0 0 / 28%);
    --shadow-header: 0 8px 28px rgb(0 0 0 / 14%);
    --shadow-brand: 0 6px 18px rgb(0 0 0 / 24%);
    --shadow-preview: 0 20px 50px rgb(0 0 0 / 24%);
    --scroll-offset: 5.5rem;
    --content-width: 96rem;
    --motion-duration-quick: 120ms;
    --motion-duration-standard: 180ms;
    --motion-duration-deliberate: 240ms;
    --motion-easing-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
    --motion-easing-emphasized: cubic-bezier(0.16, 1, 0.3, 1);

    /* Keep PrimeFaces variables aligned with the application theme. */
    --surface-a: var(--color-surface);
    --surface-b: var(--color-canvas);
    --surface-c: var(--color-surface-hover);
    --surface-d: var(--color-border-subtle);
    --surface-e: var(--color-surface-raised);
    --surface-f: var(--color-surface);
    --surface-ground: var(--color-canvas);
    --surface-section: var(--color-canvas-muted);
    --surface-card: var(--color-surface);
    --surface-overlay: var(--color-surface-raised);
    --surface-border: var(--color-border-subtle);
    --surface-hover: var(--color-surface-hover);
    --text-color: var(--color-text);
    --text-color-secondary: var(--color-text-muted);
    --primary-color: var(--color-primary);
    --primary-color-text: var(--color-on-primary);
    --font-family: var(--font-family-body);
    --border-radius: var(--radius-small);
    --focus-ring: 0 0 0 3px var(--color-focus);
}
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--color-canvas);
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 8% -10%, var(--color-canvas-glow), transparent 30rem),
        radial-gradient(circle at 92% 4%, var(--color-success-highlight), transparent 26rem),
        var(--color-canvas);
    color: var(--color-text);
    font-family: var(--font-family-body);
    font-size: var(--font-size-body);
    line-height: 1.5;
}

::selection {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

a {
    color: var(--color-primary);
    text-decoration-line: underline;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--color-primary-hover);
}

button,
input,
select,
textarea {
    font: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
body .ui-button:focus-visible,
body .ui-button.ui-state-focus,
body .ui-inputfield.ui-state-focus,
body .ui-chkbox:focus-within .ui-chkbox-box,
body .ui-dialog .ui-button:focus,
body .ui-datepicker a:focus,
body .ui-datepicker button:focus,
body .ui-datepicker input:focus,
body .ui-messages .ui-messages-close:focus,
body .ui-messages:focus,
.lightweight-message-region:focus {
    outline: 3px solid var(--color-focus);
    outline-offset: 3px;
    box-shadow: none;
}

:target,
h1,
h2,
h3,
input,
select,
textarea,
button,
[tabindex] {
    scroll-margin-block-start: var(--scroll-offset);
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    color: var(--color-text);
    font-family: var(--font-family-heading);
}

strong {
    font-weight: var(--font-weight-strong);
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1000;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-medium);
    background: var(--color-surface-raised);
    color: var(--color-text);
    font-weight: var(--font-weight-strong);
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform var(--motion-duration-quick) var(--motion-easing-standard);
}

.skip-link:focus {
    transform: translateY(0);
}

.lead-text,
.form-footer {
    color: var(--color-text-muted);
    line-height: 1.65;
}

.lead-text {
    display: block;
    max-width: 43rem;
    margin: 0.9rem 0 0;
    font-size: var(--font-size-lead);
}

.description-text {
    white-space: pre-wrap;
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: var(--font-weight-strong);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.secondary-line,
.field-help,
.copy-status,
.empty-state-description,
.status-line,
.settings-grid .ui-panel-content p {
    color: var(--color-text-muted);
}

.secondary-line {
    display: block;
    margin: 0.3rem 0 0;
    font-size: var(--font-size-small);
    line-height: 1.5;
}

.field-help {
    margin-top: -0.35rem;
    font-size: var(--font-size-small);
    line-height: 1.5;
}

.form-footer {
    margin-bottom: 0;
}

@media (forced-colors: active) {
    .role-chip,
    .status-dot,
    .empty-state-mark {
        border: 1px solid currentcolor;
    }

    .status-dot {
        background: CanvasText;
    }
}
.app-main {
    width: min(100%, var(--content-width));
    margin: 0 auto;
    padding: var(--space-extra-large);
}

.app-main:focus {
    outline: none;
}

.page-section,
.narrow-section,
.home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
}

.narrow-section {
    max-width: 34rem;
    margin: 0 auto;
}

.home-layout {
    max-width: 64rem;
    margin: 0 auto;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--space-large);
}

.page-header-compact {
    align-items: center;
}

.page-header-copy {
    min-width: 0;
}

.page-header h1,
.narrow-section > h1,
.narrow-section > div > h1,
.intro-copy h1 {
    margin: 0;
    font-weight: var(--font-weight-heading);
    letter-spacing: -0.035em;
    line-height: 1.05;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 2.85rem);
}

.narrow-section > h1,
.narrow-section > div > h1 {
    font-size: clamp(1.9rem, 5vw, 2.3rem);
}

.page-header-actions,
.page-header-action-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-small);
}

.page-header-actions {
    justify-content: flex-end;
}

.page-header-meta {
    margin-bottom: 0.75rem;
}

.settings-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.settings-grid > *,
.form-grid > * {
    min-width: 0;
}

.not-found-state {
    padding-top: 4rem;
    text-align: center;
}

@media (width <= 52rem) {
    :root {
        --scroll-offset: 1rem;
    }

    .app-main {
        padding: 1rem;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .page-header-actions,
    .page-header-action-group {
        justify-content: flex-start;
    }

    .settings-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }
}
.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem var(--space-extra-large);
    border-bottom: 1px solid var(--color-border-control-translucent);
    background: var(--color-canvas-translucent-strong);
    box-shadow: var(--shadow-header);
    backdrop-filter: blur(18px);
}

.app-brand-lockup {
    min-width: 0;
}

.app-brand {
    display: inline-flex;
    min-height: var(--control-height);
    align-items: center;
    gap: 0.7rem;
    color: var(--color-text);
    font-family: var(--font-family-heading);
    font-size: 1.08rem;
    font-weight: var(--font-weight-heading);
    letter-spacing: -0.015em;
    text-decoration: none;
}

.app-brand:hover {
    color: var(--color-text);
}

.app-brand-mark {
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: 0.6rem;
    box-shadow: var(--shadow-brand);
}

.app-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.nav-form {
    margin: 0;
}

.app-nav a {
    display: inline-flex;
    min-height: var(--control-height);
    align-items: center;
    padding: 0.68rem 0.78rem;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition:
        color var(--motion-duration-quick) var(--motion-easing-standard),
        background-color var(--motion-duration-quick) var(--motion-easing-standard),
        border-color var(--motion-duration-quick) var(--motion-easing-standard),
        box-shadow var(--motion-duration-standard) var(--motion-easing-standard);
}

.app-nav a:hover {
    border-color: var(--color-border-subtle);
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.app-nav .current-nav-item {
    border-color: var(--color-primary-border);
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
}

@media (width <= 52rem) {
    .app-header {
        position: static;
        align-items: stretch;
        flex-direction: column;
        gap: 0.9rem;
        padding: 1rem;
    }

    .app-nav {
        justify-content: flex-start;
    }

}

@media (width <= 32rem) {
    .app-nav a {
        padding-inline: 0.65rem;
        font-size: 0.86rem;
    }
}
.app-button,
body input.app-button,
body .ui-button,
body .fc .fc-button {
    display: inline-flex;
    appearance: none;
    align-items: center;
    justify-content: center;
    min-height: var(--control-height);
    padding: 0 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    cursor: pointer;
    font-family: var(--font-family-body);
    font-size: var(--font-size-compact);
    font-weight: var(--font-weight-strong);
    line-height: 1;
    text-align: center;
    box-shadow: none;
    white-space: nowrap;
    transition:
        color var(--motion-duration-quick) var(--motion-easing-standard),
        background-color var(--motion-duration-quick) var(--motion-easing-standard),
        border-color var(--motion-duration-quick) var(--motion-easing-standard),
        box-shadow var(--motion-duration-standard) var(--motion-easing-standard);
}

.app-button {
    text-decoration: none;
}

body .ui-button {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-on-primary);
}

body .ui-button .ui-button-text {
    padding: 0;
    color: inherit;
    line-height: 1;
}

body .fc .fc-button-primary {
    border-color: var(--color-border-control);
    background: var(--color-surface);
    color: var(--color-text);
}

body .fc .fc-button-primary:not(:disabled):hover {
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
    color: var(--color-text);
}

body .fc .fc-button-primary:not(:disabled):active,
body .fc .fc-button-primary.fc-button-active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-on-primary);
}

body .fc .fc-button-primary:not(:disabled):focus {
    border-color: var(--color-focus);
    box-shadow: 0 0 0 3px var(--color-primary-border);
}

.app-button-primary,
body input.app-button.app-button-primary {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-on-primary);
}

.app-button-primary:not(:disabled):hover,
body .ui-button:not(.ui-state-disabled):hover {
    border-color: var(--color-primary-hover);
    background: var(--color-primary-hover);
    color: var(--color-on-primary);
}

.app-button-primary:not(:disabled):active,
body .ui-button:not(.ui-state-disabled):active {
    border-color: var(--color-primary-active);
    background: var(--color-primary-active);
    color: var(--color-on-primary);
}

body .ui-button.ui-button-outlined {
    border-color: var(--color-primary);
    background: transparent;
    color: var(--color-primary-hover);
}

body .ui-button.ui-button-outlined:not(.ui-state-disabled):hover {
    border-color: var(--color-primary-hover);
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
}

body .ui-button.ui-button-outlined:not(.ui-state-disabled):active {
    border-color: var(--color-primary-active);
    background: var(--color-primary-highlight);
    color: var(--color-primary-hover);
}

.app-button-secondary,
body input.app-button.app-button-secondary,
body .ui-button.ui-button-secondary {
    border-color: var(--color-border-control);
    background: var(--color-surface);
    color: var(--color-text);
}

.app-button-secondary:not(:disabled):hover,
body .ui-button.ui-button-secondary:not(.ui-state-disabled):hover {
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.app-button-secondary:not(:disabled):active,
body .ui-button.ui-button-secondary:not(.ui-state-disabled):active {
    border-color: var(--color-primary-active);
    background: var(--color-surface-interactive);
    color: var(--color-text);
}

body .ui-button.ui-button-danger {
    border-color: var(--color-danger);
    background: var(--color-danger);
    color: var(--color-on-primary);
}

body .ui-button.ui-button-danger:not(.ui-state-disabled):hover {
    border-color: var(--color-danger-hover);
    background: var(--color-danger-hover);
    color: var(--color-on-primary);
}

body .ui-button.ui-button-danger:not(.ui-state-disabled):active {
    border-color: var(--color-danger-active);
    background: var(--color-danger-active);
    color: var(--color-on-primary);
}

body .ui-button.ui-button-danger.ui-button-outlined {
    border-color: var(--color-danger);
    background: transparent;
    color: var(--color-danger);
}

body .ui-button.ui-button-danger.ui-button-outlined:not(.ui-state-disabled):hover {
    border-color: var(--color-danger-hover);
    background: var(--color-danger-soft);
    color: var(--color-danger-hover);
}

body .ui-button.ui-button-danger.ui-button-outlined:not(.ui-state-disabled):active {
    border-color: var(--color-danger-active);
    background: var(--color-danger-soft);
    color: var(--color-danger-hover);
}

.app-button:disabled,
.app-button[aria-disabled="true"],
body .ui-button.ui-state-disabled,
body .fc .fc-button:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}
.action-row,
.item-actions,
.member-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-small);
}

.action-row {
    margin-top: 1.5rem;
}

.member-actions {
    justify-content: flex-end;
}

@media (width <= 52rem) {
    .item-actions,
    .item-actions form,
    .item-actions .app-button,
    .item-actions .ui-button,
    .member-actions,
    .member-actions .app-button,
    .member-actions .ui-button {
        width: 100%;
    }

    .member-actions {
        justify-content: stretch;
    }
}
.intro-panel,
.surface-panel,
.ui-panel.surface-panel,
.list-card,
.generated-invitation,
.generated-token {
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-medium);
    background: var(--color-surface);
}

.intro-panel,
.surface-panel,
.ui-panel.surface-panel,
.generated-invitation,
.generated-token {
    box-shadow: var(--shadow-surface);
}

.intro-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(17rem, 0.85fr);
    gap: clamp(2rem, 6vw, 4rem);
    overflow: hidden;
    padding: clamp(1.5rem, 5vw, 3.25rem);
    background:
        linear-gradient(145deg, var(--color-primary-highlight), transparent 45%),
        var(--color-surface);
}

.intro-panel::before {
    position: absolute;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: var(--color-success-highlight);
    content: "";
    filter: blur(1px);
    pointer-events: none;
    right: -8rem;
    top: -10rem;
}

.intro-copy {
    position: relative;
    z-index: 1;
    align-self: center;
}

.intro-copy h1 {
    max-width: 42rem;
    font-size: clamp(2.6rem, 8vw, 4.4rem);
}

.intro-kicker {
    margin: 0 0 0.75rem;
    color: var(--color-success);
    font-size: 0.8rem;
    font-weight: var(--font-weight-strong);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.home-preview {
    position: relative;
    z-index: 1;
    align-self: center;
    padding: 1rem;
    border: 1px solid var(--color-primary-border-subtle);
    border-radius: var(--radius-large);
    background: var(--color-canvas-translucent);
    box-shadow: var(--shadow-preview);
}

.home-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.home-preview-label {
    color: var(--color-text-muted);
    font-size: 0.78rem;
    font-weight: var(--font-weight-strong);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-preview-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-success);
    font-size: 0.78rem;
    font-weight: var(--font-weight-medium);
}

.home-preview-status::before {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: currentcolor;
    content: "";
}

.home-preview-events {
    display: grid;
    gap: 0.65rem;
}

.home-preview-event {
    display: grid;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-medium);
    background: var(--color-surface-raised);
}

.home-preview-date {
    display: flex;
    min-height: 3.25rem;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    border-radius: var(--radius-small);
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
    font-weight: var(--font-weight-heading);
    line-height: 1.05;
    text-align: center;
}

.home-preview-event:nth-child(2) .home-preview-date {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.home-preview-event:nth-child(3) .home-preview-date {
    background: var(--color-warning-soft);
    color: var(--color-warning);
}

.home-preview-copy strong,
.home-preview-copy span {
    display: block;
}

.home-preview-copy strong {
    color: var(--color-text);
    font-size: var(--font-size-compact);
}

.home-preview-copy span {
    margin-top: 0.18rem;
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    padding: 0.9rem 1rem;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-medium);
    background: var(--color-surface-translucent-muted);
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.card-list {
    display: grid;
    gap: 0.75rem;
}

.list-card {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-surface-translucent-strong);
}

.list-card > * {
    min-width: 0;
}

.card-heading,
.panel-heading {
    margin: 0;
    letter-spacing: 0;
}

.card-heading {
    font-size: 1rem;
}

.card-heading a {
    color: var(--color-text);
    text-decoration-color: var(--color-primary-underline);
}

.panel-heading {
    font-size: 1.08rem;
}

.invitation-card {
    align-items: flex-end;
}

.invitation-details {
    flex: 1;
}

.generated-invitation,
.generated-token {
    display: grid;
    gap: 0.5rem;
    padding: 1rem;
    border-color: var(--color-success-border);
    background: linear-gradient(135deg, var(--color-success-soft), var(--color-surface));
}

.generated-token,
.api-token-list {
    margin-top: 1rem;
}

.lightweight-panel {
    padding: 1.25rem;
}

@media (width <= 52rem) {
    .intro-panel {
        grid-template-columns: 1fr;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .list-card {
        align-items: stretch;
        flex-direction: column;
    }

    .invitation-card {
        align-items: stretch;
    }
}

@media (width <= 32rem) {
    .intro-panel {
        padding: 1.25rem;
    }

    .home-preview {
        padding: 0.75rem;
    }

    .home-preview-event {
        grid-template-columns: 3.2rem minmax(0, 1fr);
        padding: 0.65rem;
    }
}
.calendar-card {
    position: relative;
    isolation: isolate;
    cursor: pointer;
    transform: none;
    transition:
        background-color var(--motion-duration-quick) var(--motion-easing-standard),
        border-color var(--motion-duration-quick) var(--motion-easing-standard),
        box-shadow var(--motion-duration-standard) var(--motion-easing-standard);
}

.calendar-card:hover,
.calendar-card:focus-within {
    border-color: var(--color-primary-border-strong);
    background: var(--color-surface-interactive);
    box-shadow: inset 0 0 0 1px var(--color-primary-border-subtle);
    transform: none;
}

.calendar-card-link::after {
    position: absolute;
    z-index: 0;
    border-radius: var(--radius-medium);
    content: "";
    cursor: pointer;
    inset: 0;
}

.calendar-card-link:focus-visible {
    outline: none;
}

.calendar-card-link:focus-visible::after {
    outline: 3px solid var(--color-focus);
    outline-offset: 3px;
}

.calendar-card .item-actions {
    position: relative;
    z-index: 1;
}
.stacked-form,
.field-stack {
    display: grid;
    gap: 0.75rem;
}

.stacked-form {
    margin-top: 1rem;
}

.panel-heading + .stacked-form {
    margin-top: 0.9rem;
}

.two-column-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.checkbox-field,
.status-line {
    display: flex;
    align-items: center;
    gap: var(--space-small);
}

.copy-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: start;
    margin-top: 0.45rem;
}

.copy-control .ui-inputfield {
    width: 100%;
    font-family: var(--font-family-monospace);
    font-size: 0.9rem;
}

.copy-status {
    grid-column: 1 / -1;
    min-height: 1.25rem;
    margin: 0;
    font-size: var(--font-size-small);
}

.copy-help {
    margin: 0;
}

body input.native-input,
body select,
body .ui-inputfield {
    width: 100%;
    min-width: 0;
    min-height: var(--control-height);
    border-radius: var(--radius-small);
    caret-color: var(--color-primary);
    font: inherit;
}

body input.native-input,
body select {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--color-border-control);
    background: var(--color-surface-raised);
    color: var(--color-text);
}

body input.native-input::placeholder,
body .ui-inputfield::placeholder {
    color: var(--color-text-subtle);
    opacity: 1;
}

body input.native-input:disabled,
body select:disabled {
    border-color: var(--color-border-subtle);
    background: var(--color-canvas-muted);
    color: var(--color-text-subtle);
    cursor: not-allowed;
    opacity: 0.72;
}

body input.native-input:not(:disabled):hover,
body select:not(:disabled):hover {
    border-color: var(--color-primary);
}

@media (width <= 52rem) {
    .two-column-fields {
        grid-template-columns: 1fr;
    }
}

@media (width <= 32rem) {
    .copy-control {
        grid-template-columns: 1fr;
    }

    .copy-control .app-button {
        width: 100%;
    }
}
body .ui-datepicker-trigger.ui-button {
    width: var(--control-height);
    min-width: var(--control-height);
    padding: 0;
    border-color: var(--color-border-control);
    background: var(--color-surface-raised);
    color: var(--color-primary-hover);
}

body .ui-datepicker-trigger.ui-button:not(.ui-state-disabled):hover {
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
    color: var(--color-text);
}

body .ui-datepicker {
    border: 1px solid var(--color-border-control);
    border-radius: var(--radius-medium);
    background: var(--color-surface-raised);
    color: var(--color-text);
    box-shadow: var(--shadow-raised);
}

body .event-date-picker-panel.ui-datepicker {
    width: min(20rem, calc(100vw - 1rem)) !important;
    min-width: 0 !important;
    padding: 0.65rem;
}

body .event-date-picker-panel .ui-datepicker-group {
    width: 100%;
    background: transparent;
}

body .ui-datepicker .ui-datepicker-header,
body .ui-datepicker .ui-timepicker,
body .ui-datepicker .ui-datepicker-buttonbar {
    border-color: var(--color-border-subtle);
    background: var(--color-surface-raised);
    color: var(--color-text);
}

body .event-date-picker-panel .ui-datepicker-header {
    min-height: 2.5rem;
    padding: 0.2rem 0 0.65rem;
    border-width: 0 0 1px;
}

body .event-date-picker-panel .ui-datepicker-prev,
body .event-date-picker-panel .ui-datepicker-next {
    display: inline-grid;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: var(--radius-small);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    place-items: center;
}

body .event-date-picker-panel .ui-datepicker-prev:hover,
body .event-date-picker-panel .ui-datepicker-next:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

body .event-date-picker-panel .ui-datepicker-title {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    gap: 0.35rem;
    color: var(--color-text);
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-strong);
}

body .event-date-picker-panel .ui-datepicker-title select {
    width: auto;
    min-height: 2.25rem;
    padding: 0.3rem 1.75rem 0.3rem 0.55rem;
    border-color: var(--color-border-subtle);
    background: var(--color-surface);
    color: var(--color-text);
    font-size: var(--font-size-small);
}

body .event-date-picker-panel .ui-datepicker-calendar {
    width: 100%;
    margin: 0.45rem 0 0;
    table-layout: fixed;
}

body .ui-datepicker .ui-datepicker-calendar th {
    color: var(--color-text-muted);
}

body .event-date-picker-panel .ui-datepicker-calendar th {
    padding: 0.35rem 0.1rem;
    font-size: 0.75rem;
    font-weight: var(--font-weight-strong);
}

body .event-date-picker-panel .ui-datepicker-calendar td {
    padding: 0.08rem;
}

body .ui-datepicker .ui-datepicker-calendar td > a,
body .ui-datepicker .ui-datepicker-calendar td > span {
    border-radius: 0.4rem;
    color: var(--color-text);
}

body .event-date-picker-panel .ui-datepicker-calendar td > a,
body .event-date-picker-panel .ui-datepicker-calendar td > span {
    display: grid;
    width: 100%;
    min-height: 2.25rem;
    padding: 0;
    font-size: var(--font-size-small);
    place-items: center;
}

body .ui-datepicker .ui-datepicker-calendar td > a.ui-state-hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

body .ui-datepicker .ui-datepicker-calendar td > a.ui-state-active {
    background: var(--color-primary);
    color: var(--color-on-primary);
}

body .ui-datepicker .ui-datepicker-calendar td.ui-datepicker-today > a {
    border: 1px solid var(--color-primary);
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
}

body .event-date-picker-panel .ui-datepicker-other-month > a,
body .event-date-picker-panel .ui-datepicker-other-month > span {
    color: var(--color-text-subtle);
    opacity: 0.58;
}

body .event-date-picker-panel .ui-timepicker {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3.5rem;
    padding: 0.65rem 0 0;
    border-width: 1px 0 0;
    gap: 0.35rem;
}

body .event-date-picker-panel .ui-timepicker-timeinput .ui-picker-up,
body .event-date-picker-panel .ui-timepicker-timeinput .ui-picker-down {
    display: none;
}

body .event-date-picker-panel .ui-timepicker-timeinput .ui-hour-picker,
body .event-date-picker-panel .ui-timepicker-timeinput .ui-minute-picker,
body .event-date-picker-panel .ui-timepicker-timeinput .ui-separator {
    display: grid;
    width: auto;
    height: auto;
    place-items: center;
}

body .event-date-picker-panel .ui-timepicker-timeinput .ui-inputfield {
    width: 3.25rem;
    min-height: 2.5rem;
    padding: 0.35rem;
    text-align: center;
}

body .event-date-picker-panel .ui-timepicker-timeinput .ui-separator {
    color: var(--color-text-muted);
    font-weight: var(--font-weight-strong);
}

body .event-form .ui-calendar {
    display: flex;
    width: 100%;
}

body .event-form .ui-calendar > .event-date-input {
    flex: 1 1 auto;
    min-width: 0;
    border-radius: var(--radius-small) 0 0 var(--radius-small);
}

body .event-form .ui-calendar > .ui-datepicker-trigger {
    flex: 0 0 var(--control-height);
    border-left: 0;
    border-radius: 0 var(--radius-small) var(--radius-small) 0;
}
.notice-message {
    padding: 0.9rem 1rem;
    border: 1px solid var(--color-primary-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-medium);
    background: var(--color-primary-soft);
    color: var(--color-text);
    line-height: 1.5;
}

.role-chip {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    padding: 0.38rem 0.68rem;
    border: 1px solid var(--color-success-border);
    border-radius: var(--radius-pill);
    background: var(--color-success-soft);
    color: var(--color-success);
    font-size: 0.78rem;
    font-weight: var(--font-weight-strong);
}

.member-role-label {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    font-weight: var(--font-weight-strong);
}

.status-line {
    margin: 0.35rem 0 0;
    font-weight: var(--font-weight-strong);
}

.status-dot {
    width: 0.65rem;
    height: 0.65rem;
    flex: 0 0 auto;
    border-radius: 50%;
}

.status-dot.enabled {
    background: var(--color-success);
    box-shadow: 0 0 0 4px var(--color-success-soft);
}

.status-dot.disabled {
    background: var(--color-danger);
    box-shadow: 0 0 0 4px var(--color-danger-soft);
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    padding: 1.4rem;
    border: 1px dashed var(--color-border-control);
    border-radius: var(--radius-medium);
    background: var(--color-surface-translucent-subtle);
    text-align: center;
}

.empty-state-mark {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.2rem;
    border: 1px solid var(--color-primary-border-strong);
    border-radius: 0.75rem;
    background: var(--color-primary-soft);
}

.empty-state-mark::before,
.empty-state-mark::after {
    position: absolute;
    content: "";
}

.empty-state-mark::before {
    inset: 0.72rem 0.48rem 0.48rem;
    border: 2px solid var(--color-primary);
    border-radius: 0.2rem;
}

.empty-state-mark::after {
    top: 0.72rem;
    right: 0.48rem;
    left: 0.48rem;
    border-top: 2px solid var(--color-primary);
}

.empty-state-title,
.empty-state-description {
    margin: 0;
}

.empty-state-title {
    color: var(--color-text);
    font-weight: var(--font-weight-strong);
}

.empty-state-description {
    max-width: 34rem;
    font-size: 0.9rem;
}

.lightweight-messages {
    display: grid;
    gap: 0.5rem;
    margin: 0 0 1rem;
    padding: 0;
    line-height: 1.5;
    list-style: none;
}

.lightweight-messages > li {
    padding: 0.9rem 1rem;
    border: 1px solid currentcolor;
    border-left-width: 4px;
    border-radius: var(--radius-medium);
}

.lightweight-message-info {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.lightweight-message-warn {
    background: var(--color-warning-soft);
    color: var(--color-warning);
}

.lightweight-message-error,
.lightweight-message-fatal {
    background: var(--color-danger-soft);
    color: var(--color-danger);
}
.calendar-schedule-form {
    margin: 0;
}

body .calendar-schedule {
    padding: var(--space-medium);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-large);
    background:
        linear-gradient(145deg, var(--color-primary-highlight), transparent 38%),
        var(--color-surface);
    box-shadow: var(--shadow-surface);
}

body .calendar-schedule.fc {
    color: var(--color-text);
    font-family: var(--font-family-body);
}

body .calendar-schedule.fc .fc-toolbar {
    gap: var(--space-small);
}

body .calendar-schedule.fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: var(--space-medium);
}

body .calendar-schedule.fc .fc-toolbar-title {
    color: var(--color-text);
    font-family: var(--font-family-heading);
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    font-weight: var(--font-weight-heading);
    letter-spacing: -0.02em;
}

body .calendar-schedule.fc .fc-button-group {
    gap: 0.3rem;
}

body .calendar-schedule.fc .fc-button-group > .fc-button {
    margin: 0;
    border-radius: var(--radius-small);
}

body .calendar-schedule.fc .fc-button {
    display: inline-flex;
    min-height: var(--control-height);
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    border-radius: var(--radius-small);
    font-family: var(--font-family-body);
    font-size: var(--font-size-compact);
    font-weight: var(--font-weight-strong);
    line-height: 1;
    box-shadow: none;
}

body .calendar-schedule.fc .fc-prev-button,
body .calendar-schedule.fc .fc-next-button {
    gap: 0.5rem;
}

body .calendar-schedule.fc .fc-prev-button::before,
body .calendar-schedule.fc .fc-next-button::after {
    width: 0.5rem;
    height: 0.5rem;
    flex: 0 0 auto;
    border: solid currentcolor;
    border-width: 0 0.125rem 0.125rem 0;
    content: "";
}

body .calendar-schedule.fc .fc-prev-button::before {
    transform: rotate(135deg);
}

body .calendar-schedule.fc .fc-next-button::after {
    transform: rotate(-45deg);
}

body .calendar-schedule.fc .fc-button-primary {
    border-color: var(--color-border-control);
    background: var(--color-surface);
    color: var(--color-text);
}

body .calendar-schedule.fc .fc-button-primary:not(:disabled):hover {
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
    color: var(--color-text);
}

body .calendar-schedule.fc .fc-button-primary:not(:disabled):active,
body .calendar-schedule.fc .fc-button-primary.fc-button-active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-on-primary);
}

body .calendar-schedule.fc .fc-button-primary:not(:disabled):focus {
    border-color: var(--color-focus);
    box-shadow: 0 0 0 3px var(--color-primary-border);
}

body .calendar-schedule.fc-theme-standard .fc-scrollgrid,
body .calendar-schedule.fc-theme-standard td,
body .calendar-schedule.fc-theme-standard th {
    border-color: var(--color-border-subtle);
}

body .calendar-schedule.fc-theme-standard .fc-scrollgrid {
    overflow: hidden;
    border-radius: var(--radius-medium);
    background: var(--color-canvas-muted);
}

body .calendar-schedule.fc .fc-col-header-cell {
    background: var(--color-surface-raised);
}

body .calendar-schedule.fc .fc-col-header-cell-cushion {
    padding: 0.75rem 0.4rem;
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-strong);
    text-decoration: none;
}

body .calendar-schedule.fc .fc-daygrid-day-frame {
    min-height: 7rem;
    background: var(--color-canvas-muted);
}

body .calendar-schedule.fc .fc-day-other .fc-daygrid-day-frame {
    background: var(--color-canvas);
}

body .calendar-schedule.fc .fc-daygrid-day-top {
    padding: 0.35rem;
}

body .calendar-schedule.fc .fc-daygrid-day-number {
    display: inline-grid;
    min-width: 1.9rem;
    min-height: 1.9rem;
    padding: 0.25rem;
    border-radius: var(--radius-pill);
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-medium);
    place-items: center;
    text-decoration: none;
}

body .calendar-schedule.fc .fc-daygrid-day-number:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

body .calendar-schedule.fc .fc-day-today {
    background: var(--color-primary-highlight);
}

body .calendar-schedule.fc .fc-day-today .fc-daygrid-day-number {
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-weight: var(--font-weight-strong);
}

body .calendar-schedule.fc .fc-day-other .fc-daygrid-day-number {
    color: var(--color-text-subtle);
    opacity: 0.72;
}

body .calendar-schedule.fc .fc-daygrid-day-events {
    margin: 0 0.35rem 0.35rem;
}

body .calendar-schedule.fc .fc-event {
    border-color: var(--color-primary-border);
    border-radius: 0.4rem;
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
    cursor: pointer;
    font-size: 0.8rem;
    transition:
        background-color var(--motion-duration-quick) var(--motion-easing-standard),
        border-color var(--motion-duration-quick) var(--motion-easing-standard);
}

body .calendar-schedule.fc .fc-event:hover {
    border-color: var(--color-primary);
    background: var(--color-surface-hover);
    color: var(--color-text);
}

body .calendar-schedule.fc .fc-event:focus {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

body .calendar-schedule.fc .fc-event-main {
    color: inherit;
}

body .calendar-schedule.fc .fc-daygrid-event {
    padding: 0.16rem 0.35rem;
}

body .calendar-schedule.fc .fc-event-time {
    font-weight: var(--font-weight-strong);
}

body .calendar-schedule.fc .calendar-event-all-day {
    border-color: var(--color-success-border);
    background: var(--color-success-soft);
    color: var(--color-success);
}

body .calendar-schedule.fc .fc-timegrid-slot-label-cushion,
body .calendar-schedule.fc .fc-timegrid-axis-cushion {
    color: var(--color-text-subtle);
    font-size: 0.78rem;
}

body .calendar-schedule.fc .fc-timegrid-now-indicator-line {
    border-color: var(--color-danger);
}

body .calendar-schedule.fc .fc-timegrid-now-indicator-arrow {
    border-left-color: var(--color-danger);
}

body .calendar-schedule.fc-theme-standard .fc-popover {
    border-color: var(--color-border-control);
    background: var(--color-surface-raised);
    color: var(--color-text);
    box-shadow: var(--shadow-raised);
}

body .calendar-schedule.fc-theme-standard .fc-popover-header {
    background: var(--color-surface-hover);
}

body .calendar-schedule.fc .fc-more-link {
    color: var(--color-primary-hover);
    font-size: 0.78rem;
    font-weight: var(--font-weight-strong);
}

body .ui-tooltip .ui-tooltip-text {
    max-width: min(22rem, calc(100vw - 2rem));
    border: 1px solid var(--color-border-control);
    border-radius: var(--radius-small);
    background: var(--color-surface-raised);
    color: var(--color-text);
    line-height: 1.45;
    white-space: pre-line;
    box-shadow: var(--shadow-raised);
}

@media (width <= 48rem) {
    body .calendar-schedule {
        padding: 0.625rem;
    }

    body .calendar-schedule.fc .fc-toolbar {
        flex-wrap: wrap;
    }

    body .calendar-schedule.fc .fc-toolbar-chunk:nth-child(2) {
        order: -1;
        width: 100%;
    }

    body .calendar-schedule.fc .fc-toolbar-title {
        text-align: left;
    }

    body .calendar-schedule.fc .fc-daygrid-day-frame {
        min-height: 4.5rem;
    }

    body .calendar-schedule.fc .fc-view-harness {
        overflow-x: auto;
    }

    body .calendar-schedule.fc [class~="fc-timeGridWeek-view"] {
        min-width: 42rem;
    }
}

@media (width <= 32rem) {
    body .calendar-schedule.fc .fc-toolbar-chunk {
        width: 100%;
    }

    body .calendar-schedule.fc .fc-button-group {
        display: flex;
    }

    body .calendar-schedule.fc .fc-button-group .fc-button {
        flex: 1;
    }

    body .calendar-schedule.fc .fc-daygrid-day-frame {
        min-height: 3.75rem;
    }

    body .calendar-schedule.fc .fc-col-header-cell-cushion {
        padding: 0.55rem 0.15rem;
        font-size: 0.75rem;
    }

    body .calendar-schedule.fc .fc-daygrid-day-top {
        padding: 0.15rem;
    }

    body .calendar-schedule.fc .fc-daygrid-day-number {
        min-width: 1.65rem;
        min-height: 1.65rem;
        padding: 0.15rem;
        font-size: 0.75rem;
    }

    body .calendar-schedule.fc .fc-daygrid-day-events {
        margin: 0 0.15rem 0.15rem;
    }

    body .calendar-schedule.fc .fc-daygrid-event {
        padding: 0.1rem 0.2rem;
        font-size: 0.7rem;
    }

    body .calendar-schedule.fc .fc-daygrid-event .fc-event-time {
        display: none;
    }
}
.calendar-agenda {
    position: sticky;
    top: calc(var(--scroll-offset) + var(--space-small));
    display: grid;
    min-width: 0;
    max-height: calc(100vh - var(--scroll-offset) - 2rem);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-large);
    background: var(--color-surface);
    box-shadow: var(--shadow-surface);
}

.calendar-agenda-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-small);
    padding: var(--space-medium);
    border-bottom: 1px solid var(--color-border-subtle);
    background: var(--color-surface-raised);
}

.calendar-agenda-header h2,
.calendar-agenda-header p {
    margin: 0;
}

.calendar-agenda-header h2 {
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.calendar-agenda-header p {
    margin-top: 0.15rem;
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
}

.calendar-agenda-count {
    display: inline-grid;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-strong);
    place-items: center;
}

.calendar-agenda-list {
    display: grid;
    min-height: 0;
    margin: 0;
    padding: 0.75rem;
    overflow-y: auto;
    gap: 0.6rem;
}

body .calendar-agenda-event {
    display: grid;
    min-width: 0;
    min-height: 5rem;
    grid-template-columns: 3.5rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    padding: 0.75rem;
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-medium);
    background: var(--color-canvas-muted);
    color: var(--color-text);
    cursor: pointer;
    text-decoration: none;
    transition:
        background-color var(--motion-duration-quick) var(--motion-easing-standard),
        border-color var(--motion-duration-quick) var(--motion-easing-standard),
        box-shadow var(--motion-duration-standard) var(--motion-easing-standard);
}

body .calendar-agenda-event:hover {
    border-color: var(--color-primary-border-strong);
    background: var(--color-surface-interactive);
    color: var(--color-text);
    box-shadow: inset 0 0 0 1px var(--color-primary-border-subtle);
}

body .calendar-agenda-event:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

.calendar-agenda-date {
    display: grid;
    min-height: 3.5rem;
    padding: 0.35rem;
    border: 1px solid var(--color-primary-border);
    border-radius: var(--radius-small);
    background: var(--color-primary-soft);
    color: var(--color-primary-hover);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-heading);
    line-height: 1.1;
    place-items: center;
    text-align: center;
}

.calendar-agenda-event-all-day .calendar-agenda-date {
    border-color: var(--color-success-border);
    background: var(--color-success-soft);
    color: var(--color-success);
}

.calendar-agenda-copy,
.calendar-agenda-copy strong,
.calendar-agenda-meta,
.calendar-agenda-description {
    display: block;
    min-width: 0;
}

.calendar-agenda-copy strong {
    line-height: 1.35;
}

.calendar-agenda-meta,
.calendar-agenda-description {
    margin-top: 0.22rem;
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
    line-height: 1.45;
}

.calendar-agenda-description {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.calendar-agenda-empty {
    padding: 2rem var(--space-medium);
    color: var(--color-text-muted);
    text-align: center;
}

@media (width <= 76rem) {
    .calendar-agenda {
        position: static;
        max-height: none;
    }

    .calendar-agenda-list {
        overflow-y: visible;
    }
}

@media (width <= 36rem) {
    .calendar-agenda-list {
        padding: 0.625rem;
    }

    body .calendar-agenda-event {
        grid-template-columns: 3rem minmax(0, 1fr);
        padding: 0.65rem;
    }

    .calendar-agenda-date {
        min-height: 3rem;
        padding-inline: 0.2rem;
        font-size: 0.78rem;
    }
}
.calendar-section {
    min-width: 0;
}

.calendar-workspace {
    display: grid;
    grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr) minmax(16rem, 18rem);
    gap: var(--space-medium);
    align-items: start;
}

.calendar-sidebar {
    position: sticky;
    top: calc(var(--scroll-offset) + var(--space-small));
    display: grid;
    min-width: 0;
    gap: var(--space-medium);
    padding: var(--space-medium);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-large);
    background:
        linear-gradient(145deg, var(--color-primary-highlight), transparent 45%),
        var(--color-surface);
    box-shadow: var(--shadow-surface);
}

.calendar-sidebar-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-small);
    color: var(--color-text-muted);
    font-size: var(--font-size-small);
}

.calendar-sidebar-copy,
.calendar-sidebar-guidance {
    display: grid;
    gap: var(--space-extra-small);
}

.calendar-sidebar h1,
.calendar-sidebar h2,
.calendar-sidebar p {
    margin: 0;
}

.calendar-sidebar h1 {
    overflow-wrap: anywhere;
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: var(--font-weight-heading);
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.calendar-sidebar h2 {
    font-size: 1rem;
    letter-spacing: -0.01em;
}

.calendar-sidebar-description,
.calendar-sidebar-guidance p,
.calendar-sidebar-supporting {
    color: var(--color-text-muted);
    line-height: 1.55;
}

.calendar-sidebar-description,
.calendar-sidebar-supporting {
    display: block;
}

.calendar-sidebar-guidance {
    padding-top: var(--space-medium);
    border-top: 1px solid var(--color-border-subtle);
}

.calendar-sidebar-actions {
    display: grid;
    gap: var(--space-small);
    padding-top: var(--space-medium);
    border-top: 1px solid var(--color-border-subtle);
}

.calendar-sidebar-actions form {
    margin: 0;
}

.calendar-sidebar-actions form,
.calendar-sidebar-actions .ui-button,
.calendar-sidebar-actions .app-button {
    width: 100%;
}

@media (width <= 76rem) {
    .calendar-workspace {
        grid-template-columns: minmax(13rem, 15rem) minmax(0, 1fr);
    }

    .calendar-agenda {
        grid-column: 1 / -1;
    }
}

@media (width <= 52rem) {
    .calendar-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .calendar-sidebar {
        position: static;
    }
}
body .event-dialog.ui-dialog {
    width: min(42rem, calc(100vw - 2rem)) !important;
}

body .event-dialog .ui-dialog-titlebar {
    padding: 1rem 1.25rem;
}

body .event-dialog .ui-dialog-content {
    max-height: calc(100vh - 8rem);
    padding: 0 1.25rem 1.25rem;
    overflow-y: auto;
}

.event-dialog-content .stacked-form {
    margin-top: 0;
}

.event-form textarea {
    min-height: 7rem;
}

.event-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-small);
    margin-top: var(--space-small);
}

.event-dialog-actions .delete-event-button {
    margin-left: auto;
}

.event-details h2,
.event-details p {
    margin: 0;
}

.event-details h2 {
    font-size: 1.35rem;
}

.event-details-schedule {
    margin-top: var(--space-extra-small) !important;
    color: var(--color-text-muted);
    line-height: 1.55;
}

.event-details .description-text {
    margin-top: var(--space-medium);
    padding: var(--space-medium);
    border: 1px solid var(--color-border-subtle);
    border-radius: var(--radius-medium);
    background: var(--color-canvas-muted);
    color: var(--color-text-muted);
    line-height: 1.6;
}

@media (width <= 36rem) {
    body .event-dialog.ui-dialog {
        width: calc(100vw - 1rem) !important;
    }

    body .event-dialog .ui-dialog-titlebar {
        padding: 0.9rem 1rem;
    }

    body .event-dialog .ui-dialog-content {
        max-height: calc(100vh - 6rem);
        padding: 0 1rem 1rem;
    }

    .event-dialog-actions,
    .event-dialog-actions .ui-button {
        width: 100%;
    }

    .event-dialog-actions .delete-event-button {
        margin-left: 0;
    }
}
.member-card-list.ui-datalist,
.member-card-list .ui-datalist-content {
    border: 0;
    background: transparent;
}

.member-card-list .ui-datalist-content {
    padding: 0;
}

.member-card-list .ui-datalist-data {
    display: grid;
    margin: 0;
    padding: 0;
    gap: 0.75rem;
    list-style: none;
}

.member-card-list .ui-datalist-item {
    padding: 0;
}
body .ui-widget:not(.ui-button) {
    color: var(--color-text);
    font-family: var(--font-family-body);
}

body .ui-panel,
body .ui-panel .ui-panel-content {
    color: var(--color-text);
}

body .ui-panel.surface-panel .ui-panel-content {
    border: 0;
    background: transparent;
}

body .ui-inputfield,
body .ui-inputfield.ui-state-default {
    border-color: var(--color-border-control);
    background: var(--color-surface-raised);
    color: var(--color-text);
    box-shadow: none;
}

body .ui-inputfield.ui-state-hover {
    border-color: var(--color-primary);
}

body .ui-inputfield.ui-state-focus {
    border-color: var(--color-focus);
    background: var(--color-surface-interactive);
}

body .ui-inputfield:disabled,
body .ui-inputfield.ui-state-disabled {
    border-color: var(--color-border-subtle);
    background: var(--color-canvas-muted);
    color: var(--color-text-subtle);
    opacity: 0.72;
}

body .ui-state-disabled {
    cursor: not-allowed;
}

body .ui-chkbox .ui-chkbox-box {
    border-color: var(--color-border-control);
    border-radius: 0.35rem;
    background: var(--color-surface-raised);
    color: var(--color-on-primary);
}

body .ui-chkbox .ui-chkbox-box.ui-state-hover {
    border-color: var(--color-primary);
}

body .ui-chkbox .ui-chkbox-box.ui-state-active {
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: var(--color-on-primary);
}

body .ui-dialog {
    overflow: hidden;
    border: 1px solid var(--color-border-control);
    border-radius: var(--radius-large);
    background: var(--color-surface-raised);
    color: var(--color-text);
    box-shadow: var(--shadow-raised);
}

body .ui-dialog .ui-dialog-titlebar,
body .ui-dialog .ui-dialog-content,
body .ui-dialog .ui-dialog-footer {
    border-color: var(--color-border-subtle);
    background: var(--color-surface-raised);
    color: var(--color-text);
}

body .ui-dialog .ui-dialog-titlebar {
    font-family: var(--font-family-heading);
}

body .ui-dialog .ui-confirm-dialog-message {
    color: var(--color-text-muted);
    line-height: 1.55;
}

body .ui-widget-overlay {
    background: var(--color-backdrop);
    backdrop-filter: blur(3px);
}

body .ui-messages {
    margin: 0 0 1rem;
    border-radius: var(--radius-medium);
}

body .ui-messages .ui-messages-info {
    border-color: var(--color-success-border);
    background: var(--color-success-soft);
    color: var(--color-success);
}

body .ui-messages .ui-messages-warn {
    border-color: var(--color-warning-border);
    background: var(--color-warning-soft);
    color: var(--color-warning);
}

body .ui-messages .ui-messages-error,
body .ui-messages .ui-messages-fatal {
    border-color: var(--color-danger-border);
    background: var(--color-danger-soft);
    color: var(--color-danger);
}

body .ui-messages .ui-messages-close {
    color: currentcolor;
}

body .ui-staticmessage {
    border-radius: var(--radius-medium);
}

body .ui-outputlabel,
body label {
    color: var(--color-text);
    font-weight: var(--font-weight-medium);
}

body .ui-state-error,
body .ui-inputfield.ui-state-error {
    border-color: var(--color-danger);
}
.generated-invitation,
.lightweight-messages > li,
body .ui-messages {
    animation: feedback-enter var(--motion-duration-deliberate) var(--motion-easing-emphasized);
}

@keyframes feedback-enter {
    from {
        opacity: 0;
        transform: translateY(-0.35rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
