/*
 * Spacing scale convention
 * -----------------------
 * Use rem values from this 8-step scale for `padding`, `gap`, and
 * `margin` declarations:
 *
 *   0.25rem · 0.5rem · 0.75rem · 1rem · 1.25rem · 1.5rem · 1.75rem · 2rem
 *
 * Plus a few documented escape hatches: 0.1/0.15/0.2rem for sub-pixel
 * icon spacing, 0.875rem to match the standard 14px text size, and
 * 2.5/3/3.5/4/4.5/10rem for hero / page-level spacing.
 *
 * Historic outliers (0.3/0.35/0.4/0.45/0.55/0.6/0.65/0.85/0.9/0.95rem
 * etc.) still appear in the file — each was a deliberate per-component
 * tweak. A wholesale migration to the canonical scale is deferred to
 * a future PR with visual testing because changing them touches
 * dozens of selectors and would risk widespread visual drift.
 */

:root {
    color-scheme: dark;
    --font-sans: "DM Sans", "Inter", "Segoe UI", sans-serif;
    --bg: #050f1f;
    --bg-alt: #071731;
    --surface: rgba(10, 25, 49, 0.75);
    --surface-solid: #0b1f3b;
    --border: rgba(255, 255, 255, 0.08);
    --text: #eaf6ff;
    --muted: #9cb5d4;
    --accent: #2bb7ff;
    --accent-strong: #1a9ae6;
    --accent-soft: rgba(43, 183, 255, 0.2);
    --orange: #f6a035;
    --orange-strong: #f28b20;
    /* Semantic state colours. Use these in `color` / `background` rules
     * instead of hardcoded hex/rgba so the theme switcher can override
     * them and a future palette tweak only touches the :root block. */
    --error: #ff4444;
    --error-soft: rgba(255, 68, 68, 0.12);
    --warning: #ffd18c;
    --warning-soft: rgba(255, 209, 140, 0.16);
    --success: #99f7c2;
    --success-soft: rgba(58, 233, 144, 0.16);
    --shadow: 0 24px 80px rgba(6, 14, 30, 0.45);
    --radius-card: 0.75rem;
    --radius-pill: 999px;
}

/* Light mode overrides */
[data-theme="light"] {
    color-scheme: light;
    --bg: #ffffff;
    --bg-alt: #f8f9fa;
    --surface: rgba(248, 249, 250, 0.9);
    --surface-solid: #f0f2f5;
    --border: rgba(0, 0, 0, 0.08);
    --text: #1a1a1a;
    --muted: #5a6c7d;
    --accent: #1a9ae6;
    --accent-strong: #0f7ac2;
    --accent-soft: rgba(26, 154, 230, 0.15);
    --orange: #f28b20;
    --orange-strong: #d67616;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] body.page {
    background: radial-gradient(circle at 15% 20%, rgba(15, 94, 255, 0.08), transparent 50%),
        radial-gradient(circle at 85% 10%, rgba(240, 152, 63, 0.08), transparent 55%),
        var(--bg);
}

[data-theme="light"] .orb {
    opacity: 0.3;
}

/* Self-hosted DM Sans font */
@font-face {
    font-family: 'DM Sans';
    src: url('/static/fonts/dm-sans-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DM Sans';
    src: url('/static/fonts/dm-sans-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DM Sans';
    src: url('/static/fonts/dm-sans-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'DM Sans';
    src: url('/static/fonts/dm-sans-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body.page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 15% 20%, rgba(15, 94, 255, 0.18), transparent 50%),
        radial-gradient(circle at 85% 10%, rgba(240, 152, 63, 0.18), transparent 55%),
        var(--bg);
    font-family: var(--font-sans);
    color: var(--text);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.skip-link {
    position: absolute;
    top: 1rem;
    left: 1rem;
    transform: translateY(-150%);
    padding: 0.75rem 1.25rem;
    background: var(--text);
    color: var(--bg);
    border-radius: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0;
    z-index: 30;
}

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

.page__glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.orb {
    position: absolute;
    filter: blur(110px);
    opacity: 0.6;
}

.orb--one {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -120px;
    background: rgba(31, 104, 255, 0.65);
}

.orb--two {
    width: 360px;
    height: 360px;
    top: 40%;
    right: -140px;
    background: rgba(247, 153, 55, 0.55);
}

.orb--three {
    width: 500px;
    height: 500px;
    bottom: -220px;
    left: 25%;
    background: rgba(17, 140, 255, 0.35);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 1.25rem 0;
    background: linear-gradient(180deg, rgba(5, 15, 31, 0.95) 0%, rgba(5, 15, 31, 0.75) 85%, transparent 100%);
    backdrop-filter: blur(16px);
}

/* Reserve space for the sticky .site-header whenever the browser
 * scrolls to an anchored element (e.g. /dashboard/servers/{id}#events
 * or the "Skip to content" link's #main-content target). Without
 * this the targeted element's top edge slides up behind the header
 * instead of landing just below it.
 *
 * 10rem (~160px) covers the worst case where the nav row wraps onto
 * two lines on mid-width viewports (~1100-1280px). On wider viewports
 * the header is more compact and the extra space below it just shows
 * a slim band of page background — acceptable trade vs. the targeted
 * card title disappearing behind the header.
 *
 * Scoped tightly (instead of the broader ``[id]`` selector) so that
 * form inputs, error containers, cookie-banner labels, etc. don't
 * inherit the reservation. The previous global rule caused weird
 * jumps when the browser focused unrelated ID'd elements after a
 * fresh page load, leaving the user "at the previous scroll height"
 * instead of at the top of the new page. */
.card[id],
#main-content {
    scroll-margin-top: 10rem;
}

.site-header__inner {
    width: min(1120px, 100% - 2.5rem);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    /* Graceful fallback for viewports just past the hamburger breakpoint
     * where ~10 nav items + brand + CTA still don't quite fit on one
     * line: wrap the brand / nav rows rather than overflowing or
     * forcibly squishing items into each other. */
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.01em;
}

.brand__mark {
    width: 40px;
    height: 40px;
}

.brand__text {
    display: inline-flex;
    align-items: center;
}

.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.75rem;
    padding: 0.6rem 0.7rem;
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease;
}

.nav-toggle__bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 99px;
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-toggle:focus-visible {
    background: var(--accent-soft);
    border-color: var(--accent-strong);
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.site-nav {
    position: fixed;
    inset: 5rem 1.25rem auto 1.25rem;
    padding: 1.5rem;
    background: rgba(6, 18, 36, 0.95);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 10;
}

.site-nav--visible {
    visibility: visible;
}

.site-nav--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
}

.site-nav--visible {
    visibility: visible;
}

.site-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.site-nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    padding: 0.6rem 0.75rem;
    border-radius: 0.9rem;
    display: block;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
    background: rgba(43, 183, 255, 0.16);
    color: white;
}

.inline-form {
    margin: 0;
}

.site-nav__link-button {
    appearance: none;
    border: 0;
    background: transparent;
    width: 100%;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font: inherit;
    padding: 0.6rem 0.75rem;
    border-radius: 0.9rem;
    display: block;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav__link-button:hover,
.site-nav__link-button:focus-visible {
    background: rgba(43, 183, 255, 0.16);
    color: white;
}

.language-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.language-selector__select {
    background: rgba(6, 18, 36, 0.6);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    padding: 0.5rem 0.75rem;
    font: inherit;
    cursor: pointer;
}

.language-selector__select:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.language-selector__button {
    background: rgba(43, 183, 255, 0.16);
    border: 1px solid rgba(43, 183, 255, 0.32);
    color: var(--text);
    border-radius: 0.9rem;
    padding: 0.5rem 0.9rem;
    font: inherit;
    cursor: pointer;
}

.site-nav__cta a,
.site-nav__cta .site-nav__link-button {
    background: var(--accent);
    color: #041126;
    font-weight: 600;
    text-align: center;
}

.site-nav__cta a:hover,
.site-nav__cta a:focus-visible,
.site-nav__cta .site-nav__link-button:hover,
.site-nav__cta .site-nav__link-button:focus-visible {
    background: var(--accent-strong);
    color: #01060f;
}

.site-nav__cta--discord a {
    background: linear-gradient(135deg, #5865f2 0%, #7984ff 100%);
    color: #f5f7ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    box-shadow: 0 16px 36px rgba(88, 101, 242, 0.35);
}

.site-nav__cta--discord a:hover,
.site-nav__cta--discord a:focus-visible {
    background: linear-gradient(135deg, #4752c4 0%, #636cf5 100%);
    color: #ffffff;
}

.page-main {
    flex: 1;
    width: min(1120px, 100% - 2.5rem);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-bottom: 4rem;
    z-index: 1;
}

.page-hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: center;
    gap: 2.5rem;
    padding: 3.5rem 0 1rem;
    position: relative;
    overflow: visible;
}

.page-hero__content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    z-index: 3;
}

.page-hero__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

.page-hero__title {
    font-size: clamp(2.2rem, 3.2vw + 1rem, 3.5rem);
    line-height: 1.1;
    margin: 0;
}

.page-hero__subtitle {
    margin: 0;
    color: var(--muted);
    max-width: 36ch;
}

.page-hero__definition {
    margin: 0;
    color: var(--text);
    font-weight: 500;
    max-width: 48ch;
}

.page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.page-hero__note {
    margin: 0.5rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.page-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(13, 33, 63, 0.7);
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.hero-badge__icon {
    font-size: 1rem;
}

.hero-badge__text {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.hero-badge--germany {
    border-color: rgba(255, 84, 84, 0.5);
    background: linear-gradient(135deg, rgba(255, 84, 84, 0.18), rgba(13, 33, 63, 0.75));
    box-shadow: 0 12px 24px rgba(13, 33, 63, 0.25);
}

.hero-badge--source:hover,
.hero-badge--source:focus {
    border-color: rgba(43, 183, 255, 0.6);
    color: #ffffff;
}

.page-hero__art {
    padding: 1.5rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    position: relative;
    z-index: 1;
}

.page-hero__testimonials {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}

.page-hero__testimonial {
    --visible-shift: 0px;
    max-width: clamp(220px, 32vw, 320px);
    padding: 1.5rem 2rem;
    background: rgba(11, 31, 59, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.75rem;
    box-shadow: 0 30px 60px rgba(6, 14, 30, 0.35);
    color: var(--muted);
    backdrop-filter: blur(12px);
    opacity: 0;
    position: absolute;
    top: var(--testimonial-top, 50%);
    left: auto;
    right: auto;
    transform: translate3d(0, calc(-50% + var(--visible-shift, 0px) + 25px), 0);
    transition: opacity 1.4s ease, transform 1.4s ease, left 0.8s ease, right 0.8s ease, top 1s ease;
    z-index: 0;
}

.page-hero__testimonial[data-side="left"] {
    left: max(1rem, calc((100vw - 1120px) / 2 + 1.5rem));
    right: auto;
}

.page-hero__testimonial[data-side="right"] {
    right: max(1rem, calc((100vw - 1120px) / 2 + 1.5rem));
    left: auto;
}

.page-hero__testimonial.is-visible {
    opacity: 0.9;
    transform: translate3d(0, calc(-50% + var(--visible-shift, 0px)), 0);
}

.page-hero__testimonial-rating {
    font-size: 1.2rem;
    letter-spacing: 0.3em;
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--accent);
    opacity: 0.8;
}

.page-hero__testimonial-text {
    margin: 0 0 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.page-hero__testimonial-user {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    opacity: 0.75;
}

.page-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}  

.guide-wrapper {
    flex: 1;
}

.guide-frame {
    width: 100%;
    min-height: 80vh;
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #fff;
}

.flex-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.75rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: 0 18px 50px rgba(4, 11, 22, 0.45);
    backdrop-filter: blur(14px);
}

.section--accent {
    background: linear-gradient(135deg, rgba(15, 41, 72, 0.92), rgba(10, 28, 56, 0.85));
}

.section__header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.section__title {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.2;
}

.section__subtitle {
    margin: 0;
    color: var(--muted);
}

.button,
button,
input[type="submit"],
button[type="submit"] {
    cursor: pointer;
    border: none;
    outline: none;
    font: inherit;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.18s ease, background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 30px rgba(3, 10, 22, 0.25);
}

.button--primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #021427;
    box-shadow: 0 18px 40px rgba(43, 183, 255, 0.35);
}

.button--ghost {
    background: rgba(255, 255, 255, 0.08);
}

.button--secondary {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.12);
}

.button:focus-visible,
button:focus-visible,
input[type="submit"]:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.button--primary:hover,
.button--primary:focus-visible {
    background: linear-gradient(135deg, var(--accent-strong) 0%, #33c9ff 100%);
}

.button--discord {
    background: linear-gradient(135deg, #5865f2 0%, #7c87ff 100%);
    color: #ffffff;
    box-shadow: 0 22px 48px rgba(88, 101, 242, 0.35);
}

.button--discord:hover,
.button--discord:focus-visible {
    background: linear-gradient(135deg, #4752c4 0%, #636cf5 100%);
}

.button__icon {
    display: inline-flex;
    align-items: center;
    font-size: 1.15em;
    line-height: 1;
}

.button--secondary:hover,
.button--secondary:focus-visible {
    background: rgba(255, 255, 255, 0.22);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(43, 183, 255, 0.18);
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
}

.status-pill::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px rgba(43, 183, 255, 0.5);
}

form {
    display: grid;
    gap: 1rem;
}

label {
    font-weight: 600;
    color: var(--text);
}

.form__label {
    display: block;
    font-weight: 600;
    color: var(--text);
}

.toggle-group {
    margin: 0;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.25rem;
    background: rgba(7, 23, 49, 0.6);
    display: grid;
    gap: 1rem;
}

.toggle-group > legend {
    margin: 0;
    padding: 0 0.4rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.toggle-group__controls {
    display: grid;
    gap: 0.75rem;
}

.toggle-switch {
    position: relative;
    display: block;
}

.toggle-switch__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.toggle-switch__content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 1.15rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 25, 49, 0.7);
    transition: border 0.2s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.toggle-switch__label {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--text);
}

.toggle-switch__control {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 26px;
    border-radius: 999px;
    background: rgba(234, 246, 255, 0.15);
    transition: background 0.2s ease;
}

.toggle-switch__control::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--muted);
    transform: translate(0, -50%);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.toggle-switch__input:focus-visible + .toggle-switch__content {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(43, 183, 255, 0.25);
}

.toggle-switch__input:checked + .toggle-switch__content {
    background: rgba(27, 61, 104, 0.85);
    border-color: rgba(43, 183, 255, 0.4);
    box-shadow: 0 18px 35px rgba(10, 25, 49, 0.35);
}

.toggle-switch__input:checked + .toggle-switch__content .toggle-switch__control {
    background: rgba(43, 183, 255, 0.25);
}

.toggle-switch__input:checked + .toggle-switch__content .toggle-switch__control::after {
    transform: translate(18px, -50%);
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(43, 183, 255, 0.25);
}

.toggle-switch:hover .toggle-switch__content {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.toggle-switch__input:disabled + .toggle-switch__content {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-switch__input:disabled + .toggle-switch__content .toggle-switch__control::after {
    background: rgba(255, 255, 255, 0.35);
    box-shadow: none;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(7, 23, 49, 0.72);
    color: var(--text);
    font: inherit;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

/* Native ``<option>`` elements inherit the parent ``<select>``'s
   colour only intermittently across browsers (Chrome on Windows
   renders them with the OS theme; the dropdown then shows
   dim-grey-on-dim-grey on dark UIs and is barely readable). Pin
   them to the surface colour + readable text so every native
   select-dropdown in the dark theme is legible regardless of
   browser / OS theme. */
option {
    background-color: #0d1d3a;
    color: var(--text);
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    padding: 0;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(43, 183, 255, 0.2);
    outline: none;
}

/* Form submit styling — canonical class is `.button--submit`. The
 * broader `form button` selector stays as a back-compat fallback so
 * existing markup without the explicit modifier keeps the orange look,
 * but new buttons should prefer `<button class="button button--submit">`
 * (or another explicit variant like `--primary`/`--danger`) so the
 * variant is declared at the element, not inherited via `<form>` ancestry. */
.button--submit,
form button,
form .button,
.button[type="submit"],
button[type="submit"] {
    justify-self: flex-start;
    border-radius: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-strong) 100%);
    color: #1a1726;
    font-weight: 600;
    box-shadow: 0 16px 35px rgba(242, 140, 32, 0.35);
}

.button--submit:hover,
.button--submit:focus-visible,
form button:hover,
form button:focus-visible {
    filter: brightness(1.05);
}

.icon-button,
form .icon-button {
    width: 2.5rem;
    height: 2.5rem;
    min-width: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(7, 23, 49, 0.72);
    color: var(--text);
    box-shadow: none;
}

.icon-button:hover,
.icon-button:focus-visible {
    filter: none;
    transform: translateY(-1px);
}

.icon-button--danger,
form .icon-button--danger {
    border-color: rgba(255, 124, 124, 0.35);
    color: #ffbdbd;
}

.icon-button--danger:hover,
.icon-button--danger:focus-visible {
    background: rgba(255, 76, 76, 0.18);
    color: #ffffff;
}

.table-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Dashboard section grouping */
.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-section__title {
    margin: 1.5rem 0 1rem;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
}

/* Badge styles for expiry warnings */
.expiry-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-left: 0.5rem;
}

.expiry-badge--warning {
    background: rgba(255, 196, 88, 0.25);
    color: #ffc458;
    border: 1px solid rgba(255, 196, 88, 0.4);
}

.expiry-badge--urgent {
    background: rgba(255, 89, 115, 0.25);
    color: #ff5973;
    border: 1px solid rgba(255, 89, 115, 0.5);
}

.expiry-badge--expired {
    background: rgba(255, 255, 255, 0.12);
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dashboard-shell {
    display: grid;
    gap: 1.75rem;
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    align-items: start;
}

.dashboard-shell--no-nav {
    grid-template-columns: minmax(0, 1fr);
}

.dashboard-shell__content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
}

.dashboard-nav__link {
    padding: 0.65rem 0.85rem;
    border-radius: 0.85rem;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.dashboard-nav__link:hover,
.dashboard-nav__link:focus-visible {
    background: var(--accent-soft);
    color: var(--text);
}

.dashboard-nav__link:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.dashboard-nav__link.is-active {
    background: var(--accent-soft);
    color: var(--text);
}

/* Compact variant: used by detail / new pages whose nav links target a
 * specific server's dashboard sections (with #anchor) instead of the
 * global list. Items shrink to content width with centered text so the
 * nav reads as "back to that server card", matching the visual weight
 * of the existing "Back to list" buttons elsewhere on the same pages. */
.dashboard-nav--compact .dashboard-nav__link {
    align-self: center;
    text-align: center;
    padding: 0.45rem 0.95rem;
    min-width: 7rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.dashboard-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-filters {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    align-items: end;
}

.dashboard-filters label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.95rem;
}

.dashboard-table__wrapper {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.dashboard-table th,
.dashboard-table td {
    text-align: left;
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.table-row--link {
    cursor: pointer;
}

.table-row--link:hover {
    background: var(--surface);
}

.table-row--link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    background: rgba(43, 183, 255, 0.08);
}

.dashboard-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.table-muted {
    color: var(--muted);
    font-size: 0.85rem;
}

.login__status {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid transparent;
}

.login__status--error {
    background: rgba(255, 89, 115, 0.16);
    border-color: rgba(255, 89, 115, 0.45);
    color: #ffd4dc;
}

.login__status--info {
    background: rgba(43, 183, 255, 0.16);
    border-color: rgba(43, 183, 255, 0.45);
    color: #d0efff;
}

.login__redirect {
    margin: 0.65rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.status-badge {
    display: inline-flex;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-badge--active {
    background: rgba(44, 201, 126, 0.2);
    color: #99f7c2;
}

.status-badge--paused {
    background: rgba(255, 196, 88, 0.2);
    color: #ffd18c;
}

.status-badge--error {
    background: rgba(255, 86, 90, 0.18);
    color: #ff9ea1;
}

.status-badge--warning {
    background: rgba(255, 196, 88, 0.18);
    color: #ffd18c;
}

.status-badge--inactive {
    background: rgba(255, 255, 255, 0.12);
    color: var(--muted);
}

.card--notice {
    border-color: rgba(115, 196, 255, 0.4);
    background: rgba(43, 183, 255, 0.12);
}

.inline-alert {
    margin: 0.85rem 0 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.92rem;
    line-height: 1.45;
}

.inline-alert--warning {
    border-color: rgba(255, 196, 88, 0.35);
    background: rgba(255, 196, 88, 0.12);
    color: #ffe0a8;
}

.readonly-field {
    min-height: 3.1rem;
    display: flex;
    align-items: center;
    margin-top: 0.35rem;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(7, 23, 49, 0.42);
    color: var(--text);
}

.empty-state {
    display: grid;
    gap: 0.75rem;
}

.empty-state h3 {
    margin: 0;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

.form__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.form__grid--compact {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.form__span {
    grid-column: 1 / -1;
}

.form__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.form__field {
    position: relative;
}

.form__error {
    display: block;
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
}

.form__error:empty {
    display: none;
}

.form__field input.error,
.form__field textarea.error,
.form__field select.error {
    border-color: var(--error);
}

.form__help {
    display: block;
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.help-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-left: 0.35rem;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    cursor: help;
    user-select: none;
    vertical-align: middle;
    border: 1px solid transparent;
}

.help-tip:hover,
.help-tip:focus-visible {
    background: var(--accent);
    color: var(--bg);
    outline: none;
}

.mention-dropdown {
    position: absolute;
    z-index: 1500;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    box-shadow: var(--shadow);
    padding: 0.25rem;
    max-height: 14rem;
    overflow-y: auto;
}

.mention-dropdown[hidden] {
    display: none;
}

.mention-dropdown__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    color: var(--text);
    padding: 0.4rem 0.6rem;
    border-radius: 0.4rem;
    cursor: pointer;
    font: inherit;
    line-height: 1.3;
}

.mention-dropdown__item:hover,
.mention-dropdown__item--active {
    background: var(--accent-soft);
    color: var(--text);
}

.mention-dropdown__label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mention-dropdown__kind {
    flex: 0 0 auto;
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mention-dropdown__item[data-kind="role"] .mention-dropdown__kind {
    color: var(--accent);
}

.mention-dropdown__empty {
    padding: 0.5rem 0.6rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.role-picker {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.role-picker__search {
    flex: 1 1 220px;
    min-width: 220px;
}

.role-picker__selected {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: var(--accent-soft, rgba(99, 102, 241, 0.16));
    color: var(--accent, #6366f1);
    font-size: 0.875rem;
    font-weight: 600;
}

.role-picker__clear {
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0 0.4rem;
}

.role-picker__clear:hover,
.role-picker__clear:focus-visible {
    color: var(--accent);
    outline: none;
}

.admin-access-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-access-banner > div {
    flex: 1 1 24rem;
    min-width: 0;
}

.admin-access-banner h3 {
    margin: 0 0 0.35rem;
}

.admin-access-banner p {
    margin: 0;
    color: var(--muted);
}

.admin-access-banner__form {
    margin: 0;
    flex: 0 0 auto;
}

.package-list__action {
    flex-basis: 100%;
    margin-top: 0.5rem;
}

.toggle-switch--inline {
    align-items: center;
}

.toggle-switch--inline .toggle-switch__label {
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.admin-access-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.perm-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 0.5rem;
    flex-basis: 100%;
    margin-top: 0.25rem;
}

.perm-grid[hidden] {
    display: none;
}

.perm-grid__cell {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.perm-grid__label {
    font-weight: 500;
}

.perm-grid__select {
    font-size: 0.875rem;
    padding: 0.25rem 0.4rem;
}

.perm-grid--inline {
    grid-template-columns: repeat(3, minmax(90px, max-content));
    gap: 0.4rem;
    margin-top: 0.4rem;
    flex-basis: auto;
}

.perm-grid--inline .perm-grid__select {
    font-size: 0.8rem;
    padding: 0.2rem 0.3rem;
}

/* Compact variant for inline-in-row toggle pills (per-user-grant
 * "Manage permissions"). Strips the padded card around the switch
 * so it sits cleanly next to the profile dropdown / Remove button. */
.toggle-switch--compact .toggle-switch__content {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.toggle-switch--compact:hover .toggle-switch__content {
    transform: none;
    border: none;
    box-shadow: none;
}

.toggle-switch--compact .toggle-switch__control {
    width: 36px;
    height: 20px;
}

.toggle-switch--compact .toggle-switch__control::after {
    width: 12px;
    height: 12px;
    left: 4px;
}

.toggle-switch--compact .toggle-switch__input:checked + .toggle-switch__content .toggle-switch__control::after {
    transform: translate(16px, -50%);
}

.admin-access-form__can-admin {
    flex-basis: 100%;
    margin-top: 0.5rem;
}

.admin-access-form__can-admin .toggle-switch__label .form__help {
    display: block;
    margin-top: 0.25rem;
}

.user-grants__can-admin {
    margin-left: 0.4rem;
}

.user-grants__can-admin.toggle-switch--compact .toggle-switch__content {
    gap: 0.5rem;
}

.user-grants__can-admin .toggle-switch__label {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 500;
    /* Override the .user-grants__add-field span uppercase rule so
     * the inline toggle label matches the per-row variant. */
    text-transform: none;
    letter-spacing: 0;
}

/* Toggle in the add-user form. The parent .user-grants__add-form is
 * `align-items: end`, so the toggle pill naturally bottom-aligns with
 * the input/select controls (the labels above them push the inputs
 * down). Bottom padding matches the form field control padding so
 * the switch's vertical center lands at the input's vertical center. */
.user-grants__add-toggle {
    margin-left: 0;
    padding-bottom: 0.4rem;
}

/* Disabled state: dim the toggle and disable the cursor so it reads
 * as "pick a user first". */
.toggle-switch--compact .toggle-switch__input:disabled + .toggle-switch__content {
    opacity: 0.45;
    cursor: not-allowed;
}

.toggle-switch--compact .toggle-switch__input:disabled {
    cursor: not-allowed;
}

.user-grants__can-admin--readonly {
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    background: var(--accent-soft, rgba(99, 102, 241, 0.16));
    color: var(--accent, #6366f1);
    font-weight: 600;
}

.user-grants__self-tag {
    margin-left: 0.4rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: var(--accent-soft, rgba(99, 102, 241, 0.16));
    color: var(--accent, #6366f1);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.user-grants__profile--readonly {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0.4rem;
    font-size: 0.875rem;
    color: var(--muted);
}

.event-reminders {
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.75rem 1rem;
    margin: 0;
}

.event-reminders legend {
    font-weight: 600;
    padding: 0 0.4rem;
}

.event-reminders__rows {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.event-reminders__row {
    display: grid;
    grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 2fr) auto;
    gap: 0.5rem;
    align-items: end;
}

.event-reminders__row label,
.event-reminders__row .event-reminders__time {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.875rem;
}

.event-reminders__time-label {
    font-weight: 500;
}

.event-reminders__time-fields {
    display: grid;
    grid-template-columns: minmax(70px, 1fr) minmax(100px, 1.3fr);
    gap: 0.4rem;
}

.event-reminders__row .role-picker {
    flex-wrap: nowrap;
}

.event-reminders__row .role-picker__search {
    min-width: 0;
    flex: 1 1 100%;
}

.event-reminders__remove {
    padding: 0.25rem 0.6rem;
    font-size: 1rem;
    line-height: 1;
}

.event-reminders__add {
    margin-top: 0.25rem;
}

.admin-access-form > label.toggle-switch {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-access-form__tier {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 0 0 auto;
}

.admin-access-form__tier-label {
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.admin-access-form__tier-select {
    padding: 0.35rem 0.5rem;
    border-radius: 0.4rem;
    border: 1px solid var(--border);
    background: var(--surface-solid);
    color: var(--text);
    font-size: 0.85rem;
}

.user-grants {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-basis: 100%;
}

.user-grants__header h4 {
    margin: 0 0 0.15rem;
    font-size: 0.95rem;
}

.user-grants__hint {
    color: var(--muted);
    font-size: 0.78rem;
}

.user-grants__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.user-grants__row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.55rem;
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.03);
}

.user-grants__name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.user-grants__profile-form,
.user-grants__remove-form {
    margin: 0;
    flex: 0 0 auto;
}

.user-grants__profile {
    padding: 0.3rem 0.45rem;
    border-radius: 0.35rem;
    border: 1px solid var(--border);
    background: var(--surface-solid);
    color: var(--text);
    font-size: 0.8rem;
}

.user-grants__empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.user-grants__add-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 0.55rem;
}

.user-grants__add-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1 1 9rem;
    min-width: 0;
}

.user-grants__add-field span {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.user-grants__user-search {
    padding: 0.35rem 0.5rem;
    border-radius: 0.4rem;
    border: 1px solid var(--border);
    background: var(--surface-solid);
    color: var(--text);
    font-size: 0.85rem;
}

.user-grants__user-selected {
    margin-top: 0.15rem;
    color: var(--accent);
    font-size: 0.75rem;
}

.server-card__manage {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.server-card__manage-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
}

.server-card__manage-link:hover,
.server-card__manage-link:focus-visible {
    color: var(--accent);
    text-decoration: underline;
    outline: none;
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
    /* Wrap on narrow viewports so the card title + actions don't
     * overflow or visually crash into each other when the filter
     * dropdown + "+ Add" button no longer fit alongside the heading. */
    flex-wrap: wrap;
}

.card__header h3 {
    margin: 0;
}

.card__header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card__header-filter {
    margin: 0;
}

.card__header-filter-label {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.card__header-filter select {
    padding: 0.35rem 0.6rem;
    font-size: 0.9rem;
}

.button--small {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
}

.discord-preview {
    display: flex;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    margin-top: 0.85rem;
    background: #313338;
    color: #dbdee1;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-family: "gg sans", "Whitney", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.discord-preview__avatar {
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    background: #5865f2;
}

.discord-preview__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.discord-preview__body {
    flex: 1 1 auto;
    min-width: 0;
}

.discord-preview__header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.discord-preview__author {
    color: #f2f3f5;
    font-weight: 500;
    font-size: 1rem;
}

.discord-preview__badge {
    display: inline-flex;
    align-items: center;
    padding: 0 0.3rem;
    height: 0.95rem;
    border-radius: 0.2rem;
    background: #5865f2;
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
}

.discord-preview__time {
    color: #949ba4;
    font-size: 0.75rem;
}

.discord-preview__headline {
    color: #f2f3f5;
    font-weight: 600;
    margin-top: 0.2rem;
    margin-bottom: 0.15rem;
    font-size: 1rem;
}

.discord-preview__content {
    color: #dbdee1;
    font-size: 1rem;
    line-height: 1.375;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Embed variant — adds a left colour strip mimicking Discord's
   ``embed.color`` rendering. ``--embed-stripe`` is inlined on the
   element from the admin's configured colour; defaults to muted
   when no override is set. Used by the birthday dry-run preview. */
.discord-preview__embed {
    margin-top: 0.4rem;
    padding: 0.55rem 0.8rem;
    background: rgba(255, 255, 255, 0.025);
    border-left: 4px solid var(--embed-stripe, #4f545c);
    border-radius: 0.25rem;
}
.discord-preview__embed .discord-preview__content {
    font-size: 0.95rem;
}

.discord-mention {
    display: inline-block;
    padding: 0 0.15rem;
    border-radius: 0.2rem;
    background: rgba(88, 101, 242, 0.3);
    color: #c9cdfb;
    font-weight: 500;
    transition: background 0.1s ease;
}

.discord-preview__headline .discord-mention {
    color: #dee0fc;
}

.server-card {
    padding: 0;
}

.server-card__link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 0.75rem;
    border-radius: 0.6rem;
    color: inherit;
    text-decoration: none;
    transition: background 0.15s ease, transform 0.15s ease;
}

.server-card__link:hover,
.server-card__link:focus-visible {
    background: var(--accent-soft);
    outline: none;
}

.server-card__link--inert {
    cursor: default;
}

.server-card__link--inert:hover {
    background: transparent;
}

.server-avatar {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    flex: 0 0 auto;
    isolation: isolate;
}

.server-avatar--lg {
    width: 4rem;
    height: 4rem;
}

.server-avatar--sm {
    width: 1.75rem;
    height: 1.75rem;
}

.server-avatar__initial {
    color: var(--accent);
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    line-height: 1;
}

.server-avatar--lg .server-avatar__initial {
    font-size: 1.6rem;
}

.server-avatar--sm .server-avatar__initial {
    font-size: 0.8rem;
}

.server-avatar__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.server-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.server-card__name {
    font-size: 1rem;
    color: var(--text);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.server-card__meta {
    font-size: 0.8rem;
    color: var(--muted);
}

.server-card__role-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: help;
}

.dashboard-header--with-icon {
    align-items: flex-start;
}

.dashboard-header__main {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1 1 auto;
    min-width: 0;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkbox label {
    font-weight: 500;
}

.form__character-count {
    display: block;
    color: var(--muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    text-align: right;
}

.form__character-count--warning {
    color: #ffa500;
}

.form__character-count--error {
    color: var(--error);
}

.schedule-builder {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.schedule-builder__controls {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
}

.schedule-builder__actions {
    display: flex;
    grid-column: 1 / -1;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.schedule-builder__actions .button {
    min-height: 3.1rem;
}

.schedule-weekdays-field {
    grid-column: 1 / -1;
    min-width: 0;
}

.schedule-weekdays {
    position: relative;
    margin-top: 0.35rem;
}

.schedule-weekdays__toggle {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(8, 22, 40, 0.85);
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.schedule-weekdays__toggle:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.schedule-weekdays__toggle:focus-visible {
    outline: 2px solid rgba(124, 197, 255, 0.8);
    outline-offset: 2px;
}

.schedule-weekdays__chevron {
    font-size: 0.75rem;
    opacity: 0.7;
}

.schedule-weekdays__popover {
    position: static;
    z-index: auto;
    width: 100%;
    min-width: 0;
    padding: 0.5rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(8, 22, 40, 0.72);
    box-shadow: none;
    display: grid;
    gap: 0.4rem;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.schedule-weekdays__option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.25rem;
    padding: 0.35rem 0.45rem;
    border-radius: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(12, 32, 58, 0.45);
    font-size: 0.85rem;
    cursor: pointer;
}

.schedule-weekdays__option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.schedule-weekdays__option:has(input:checked) {
    border-color: rgba(43, 183, 255, 0.6);
    background: rgba(43, 183, 255, 0.18);
    color: #ffffff;
}

.schedule-weekdays__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
    min-height: 1.6rem;
}

.schedule-weekdays__chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 32, 58, 0.7);
    font-size: 0.75rem;
}

.schedule-builder__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.schedule-builder__item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(12, 32, 58, 0.7);
    font-size: 0.85rem;
}

.schedule-builder__remove {
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.8rem;
}

.schedule-builder__remove:hover {
    color: #ffffff;
}

.schedule-builder__remove:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    color: #ffffff;
}

.schedule-builder__empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 820px) {
    .schedule-builder__controls {
        grid-template-columns: 1fr;
    }

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

    .schedule-builder__actions {
        align-items: stretch;
    }

    .schedule-builder__actions .button {
        width: 100%;
        justify-content: center;
    }
}

.list {
    margin: 0.75rem 0 0;
    padding-left: 1.5rem;
}

@media (max-width: 960px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }
}

.checkout-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.card--warning {
    border-color: rgba(255, 124, 124, 0.5);
    background: rgba(255, 76, 76, 0.16);
    box-shadow: 0 16px 36px rgba(90, 16, 16, 0.4);
}

.card--warning h3 {
    color: #ffd7d7;
}

.card--warning p {
    color: #ffbdbd;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.card p {
    margin: 0;
    color: var(--muted);
}

/* Progress bar component */
.progress-bar {
    position: relative;
    width: 100%;
    height: 12px;
    background: var(--surface-solid);
    border-radius: 999px;
    border: 1px solid var(--border);
    overflow: hidden;
    margin: 0.75rem 0;
}

.progress-bar__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
    transition: width 0.3s ease, background 0.3s ease;
    box-shadow: 0 0 12px rgba(43, 183, 255, 0.4);
}

.progress-bar__fill--green {
    background: linear-gradient(90deg, #44d88e, #2bc97e);
    box-shadow: 0 0 12px rgba(68, 216, 142, 0.4);
}

.progress-bar__fill--yellow {
    background: linear-gradient(90deg, #ffc458, #f6a035);
    box-shadow: 0 0 12px rgba(255, 196, 88, 0.4);
}

.progress-bar__fill--red {
    background: linear-gradient(90deg, #ff5973, #ff4159);
    box-shadow: 0 0 12px rgba(255, 89, 115, 0.5);
}

.progress-bar__text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.progress-bar__text strong {
    color: var(--text);
}

.feature-list {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature {
    background: rgba(8, 24, 47, 0.85);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 1.35rem;
    box-shadow: 0 12px 32px rgba(4, 10, 20, 0.3);
}

.feature__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
    margin: 0 0 0.35rem 0;
}

.feature__title::before {
    content: "";
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--orange));
    box-shadow: 0 0 12px rgba(43, 183, 255, 0.45);
}

.feature p {
    margin: 0;
    color: var(--muted);
}

.tutorial-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.tutorial-step {
    background: rgba(8, 24, 47, 0.85);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 1.75rem;
    box-shadow: 0 12px 32px rgba(4, 10, 20, 0.3);
}

.tutorial-step__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.tutorial-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    font-weight: 700;
    color: #0b1220;
    background: linear-gradient(135deg, var(--accent), var(--orange));
    box-shadow: 0 0 16px rgba(43, 183, 255, 0.4);
}

.tutorial-step__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.tutorial-step p,
.tutorial-step ul {
    margin: 0 0 0.75rem 0;
    color: var(--muted);
}

.tutorial-step ul {
    padding-left: 1.2rem;
}

.tutorial-code {
    margin: 0.75rem 0 1rem 0;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    background: rgba(8, 24, 47, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    white-space: pre;
    font-size: 0.95rem;
}

.tutorial-tabs {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.tutorial-tabs__list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    background: rgba(8, 24, 47, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0.4rem;
    width: fit-content;
}

.tutorial-tabs__tab {
    border: none;
    background: transparent;
    color: #dbe9ff;
    padding: 0.55rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tutorial-tabs__tab.is-active {
    color: #dbe9ff;
    background: linear-gradient(135deg, var(--accent), var(--orange));
    box-shadow: 0 0 14px rgba(43, 183, 255, 0.35);
}

.tutorial-tabs__panel {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
}

.tutorial-tabs__panel.is-active {
    display: flex;
}

.billing-history {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.billing-entry {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    background: rgba(6, 18, 36, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.billing-entry__timestamp {
    font-weight: 600;
}

.billing-entry__status {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.68rem;
    color: var(--muted);
}

.billing-entry--paid {
    border-color: rgba(43, 183, 255, 0.4);
    box-shadow: 0 0 0 1px rgba(43, 183, 255, 0.2);
}

.billing-entry--failed {
    border-color: rgba(255, 89, 115, 0.45);
}

.billing-entry__reference a {
    color: var(--accent);
    text-decoration: none;
}

.billing-entry__reference a:hover {
    text-decoration: underline;
}

.faq-list {
    display: grid;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.faq-item {
    background: rgba(6, 18, 36, 0.8);
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.25rem;
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: '▶';
    display: inline-block;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-item[open] summary::before {
    transform: rotate(90deg);
}

.faq-item summary:hover {
    color: var(--accent);
}

.faq-item summary:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 0.5rem;
}

.faq-item summary strong {
    display: inline;
    margin: 0;
}

.faq-item p,
.faq-item ul {
    margin-top: 0.75rem;
}

.faq-item strong {
    display: block;
    margin-bottom: 0.4rem;
}

.link-inline {
    color: var(--accent);
    text-decoration: none;
}

.link-inline:hover,
.link-inline:focus-visible {
    text-decoration: underline;
}

.site-footer {
    padding: 3rem 0 3.5rem;
    background: linear-gradient(180deg, transparent 0%, rgba(3, 9, 20, 0.9) 40%, rgba(3, 9, 20, 1) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer__inner {
    width: min(1120px, 100% - 2.5rem);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
    color: var(--muted);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

.site-footer__links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 0.95rem;
}

.site-footer__links a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer__link-button {
    background: none;
    border: none;
    color: var(--muted);
    font: inherit;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.site-footer__links a:hover,
.site-footer__links a:focus-visible,
.site-footer__link-button:hover,
.site-footer__link-button:focus-visible {
    color: var(--text);
}

.footer-brand__mark {
    width: 32px;
    height: 32px;
}

/* The site header has ~10 nav items + brand + CTA + theme/locale
 * toggles. Inline rendering needs a viewport >=1024px to lay them out
 * comfortably; below that the hamburger menu shows instead, both for
 * tablets (~768-1023px) and phones (<768px). Raising the breakpoint
 * from the previous 768px fixed the cramped/overlapping nav users
 * reported on tablet-width viewports. */
@media (min-width: 1024px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        position: static;
        inset: unset;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        visibility: visible;
    }

    .site-nav__list {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .site-nav a {
        padding: 0.55rem 0.95rem;
    }

    .site-nav__link-button {
        padding: 0.55rem 0.95rem;
    }

    .site-nav__cta a,
    .site-nav__cta .site-nav__link-button {
        margin-left: 0.5rem;
    }

    .page-hero {
        padding-top: 4.5rem;
    }
}

@media (max-width: 640px) {
    .page-main {
        width: min(100% - 2rem, 100%);
    }

    .page-hero__testimonials {
        position: static;
        padding: 1.25rem 0;
    }

    .page-hero__testimonial {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        max-width: 100%;
        padding: 1.25rem 1.5rem;
        transform: translate3d(0, 15px, 0);
    }

    .page-hero__testimonial.is-visible {
        transform: translate3d(0, 0, 0);
    }

    .page-hero__actions {
        width: 100%;
    }

    .page-hero__actions .button {
        flex: 1 1 auto;
        text-align: center;
    }

    .dashboard-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 0.75rem;
    }

    .dashboard-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .dashboard-table tbody,
    .dashboard-table tr,
    .dashboard-table td {
        display: block;
        width: 100%;
    }

    .dashboard-table tr {
        padding: 0.85rem;
        border-radius: 1rem;
        border: 1px solid var(--border);
        background: rgba(8, 24, 47, 0.82);
    }

    .dashboard-table td {
        padding: 0.35rem 0;
        border: 0;
    }

    .dashboard-table td:first-child {
        padding-top: 0;
    }

    .dashboard-table td:last-child {
        padding-bottom: 0;
    }

    /* Inline-row-actions variant: on mobile keep the trailing two
     * action cells (e.g. Unlink checkbox + Delete icon button) sharing
     * one row instead of stacking, mirroring the desktop layout. */
    .dashboard-table.dashboard-table--inline-row-actions tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 0.75rem;
        row-gap: 0.4rem;
    }

    .dashboard-table.dashboard-table--inline-row-actions td {
        width: auto;
        display: block;
    }

    /* Data cells (everything except the last two) span the full width
     * so they stack like the standard mobile-table pattern. */
    .dashboard-table.dashboard-table--inline-row-actions td:not(:nth-last-child(-n+2)) {
        grid-column: 1 / -1;
    }

    /* Trailing pair (Unlink, Delete) sits inline in a shared row. */
    .dashboard-table.dashboard-table--inline-row-actions td:nth-last-child(-n+2) {
        align-self: center;
        padding-bottom: 0;
    }
}


.package-list {
    list-style: none;
    margin: 2rem 0 0;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.package-list__item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.package-list__item--expired {
    opacity: 0.65;
    text-decoration: line-through;
}

.package-list__primary {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.package-list__primary strong {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.package-list__meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.legal-text {
    display: grid;
    gap: 1.5rem;
    background: rgba(6, 18, 36, 0.75);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.legal-text h2 {
    margin: 0;
    font-size: 1.25rem;
}

.legal-text p {
    margin: 0;
    color: var(--muted);
}

.cookie-banner {
    position: fixed;
    inset: auto 0 1.5rem 0;
    display: flex;
    justify-content: center;
    padding: 0 1.5rem;
    visibility: hidden;
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 40;
}

.cookie-banner--visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-banner__content {
    width: min(640px, 100%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(6, 18, 36, 0.95);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    box-shadow: var(--shadow);
}

.cookie-banner__text {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.cookie-banner__text a {
    color: var(--text);
    text-decoration: underline;
}

.cookie-banner__button {
    align-self: flex-start;
}

.cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.cookie-banner__preferences {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(10, 26, 46, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-banner__preferences--open {
    display: flex;
}

.cookie-banner__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-banner__option strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.cookie-banner__option p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.cookie-banner__badge {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cookie-banner__option--toggle {
    cursor: pointer;
}

.cookie-banner__option--toggle input {
    margin: 0;
}

.cookie-banner__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
    color: var(--text);
}

.cookie-banner__preferences-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.legal-disclaimer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--muted);
    max-width: 680px;
}

@media (max-width: 640px) {
    .cookie-banner__content {
        padding: 1rem 1.25rem;
    }

    .cookie-banner__button {
        width: 100%;
    }

    .legal-text {
        padding: 1.5rem;
    }
}

/* Pricing table component */
.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pricing-card {
    position: relative;
    background: rgba(7, 22, 44, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(3, 10, 20, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(3, 10, 20, 0.5);
}

.pricing-card--recommended {
    border: 2px solid var(--accent);
    box-shadow: 0 16px 48px rgba(43, 183, 255, 0.25);
    transform: scale(1.05);
}

.pricing-card--recommended:hover {
    transform: scale(1.05) translateY(-4px);
    box-shadow: 0 20px 60px rgba(43, 183, 255, 0.35);
}

.pricing-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #041126;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(43, 183, 255, 0.4);
}

.pricing-card__header {
    margin-bottom: 1rem;
}

.pricing-card__title {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.pricing-card__price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.pricing-card__amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
}

.pricing-card__period {
    font-size: 1rem;
    color: var(--muted);
}

.pricing-card__savings {
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
    color: var(--orange);
    font-weight: 600;
}

.pricing-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

.pricing-card__features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.pricing-card__features li:last-child {
    border-bottom: none;
}

.pricing-card__button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--accent);
    color: #041126;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.pricing-card__button:hover:not(:disabled) {
    background: var(--accent-strong);
    transform: translateY(-2px);
}

.pricing-card__button:active:not(:disabled) {
    transform: translateY(0);
}

.pricing-card__button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pricing-card--recommended .pricing-card__button {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    box-shadow: 0 8px 20px rgba(43, 183, 255, 0.3);
}

.pricing-card--recommended .pricing-card__button:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    box-shadow: 0 12px 28px rgba(43, 183, 255, 0.4);
}

/* Fallback dropdown - hidden on desktop, shown on mobile */
.pricing-dropdown {
    display: none;
}

/* Navigation active state */
.site-nav a.nav__link--active {
    background: rgba(43, 183, 255, 0.16);
    color: white;
    border-bottom: 2px solid var(--accent);
}

@media (max-width: 900px) {
    .pricing-table {
        display: none;
    }
    
    .pricing-dropdown {
        display: block;
        margin-bottom: 2rem;
    }
}

@media (min-width: 901px) {
    .pricing-table {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Theme toggle button */
/* Header tools cluster: theme-toggle + language picker grouped together
 * to the right of the brand (left of the inline nav). The wrapper takes
 * over what used to be theme-toggle's `margin-left: auto` so both
 * controls stay anchored at the right edge as a single unit. */
.site-header__tools {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
    background: var(--surface);
    border-color: var(--accent);
}

.theme-toggle:focus-visible {
    background: var(--accent-soft);
    border-color: var(--accent-strong);
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.theme-toggle__icon {
    font-size: 1.25rem;
    display: block;
    line-height: 1;
}

@media (max-width: 900px) {
    .site-header__tools {
        order: -1;
        margin-left: 1rem;
    }
}

/* Toast notification system */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow);
    transform: translateX(calc(100% + 2rem));
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: auto;
    max-width: 400px;
    word-wrap: break-word;
}

.toast--visible {
    transform: translateX(0);
    opacity: 1;
}

.toast__message {
    flex: 1;
    color: var(--text);
    line-height: 1.5;
}

.toast__close {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

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

.toast__close:focus-visible {
    outline: 2px solid rgba(124, 197, 255, 0.8);
    outline-offset: 2px;
    color: var(--text);
}

.toast--success {
    border-left: 4px solid #10b981;
}

.toast--error {
    border-left: 4px solid #ef4444;
}

.toast--warning {
    border-left: 4px solid #f59e0b;
}

.toast--info {
    /* Soft hint accent — used when the user's action was valid but
       caused no state change (e.g. re-clicking the already-active
       RSVP option). Same blue as the dashboard accent so it reads as
       informational rather than success/error. */
    border-left: 4px solid #5a8dff;
}

.toast--info {
    border-left: 4px solid var(--accent);
}

@media (max-width: 600px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
    
    .toast {
        max-width: none;
    }
}

/* Chart.js fallback message */
.chart-fallback {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    text-align: center;
    color: var(--muted);
}

.chart-fallback__title {
    color: var(--text);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.chart-fallback__message {
    margin: 0;
    line-height: 1.6;
}

/* Confirm-dialog modal — replaces browser-native confirm() so the
   copy follows the runtime locale (browser confirm is locale-blind).
   See static/js/confirm-modal.js. */
.button--danger {
    background: var(--error);
    color: #fff;
    border-color: var(--error);
}

.button--danger:hover,
.button--danger:focus-visible {
    background: #d63030;
    border-color: #d63030;
    color: #fff;
}

body.confirm-modal-open {
    overflow: hidden;
}

.confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.confirm-modal[hidden] {
    display: none;
}

.confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.confirm-modal__dialog {
    position: relative;
    z-index: 1;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    padding: 1.5rem;
    max-width: 32rem;
    width: 100%;
}

.confirm-modal__title {
    margin: 0 0 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
}

.confirm-modal__body {
    margin: 0 0 1.5rem;
    line-height: 1.6;
    color: var(--muted);
}

.confirm-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Event status badges (used by the events listing + per-guild calendar).
   The four event statuses (scheduled/draft/cancelled/completed) reuse the
   shared .status-badge base; this block adds the colour modifiers so
   each one reads at a glance. */
.status-badge--scheduled {
    background: rgba(43, 183, 255, 0.18);
    color: var(--accent);
}

.status-badge--draft {
    background: rgba(255, 209, 140, 0.2);
    color: var(--warning);
}

.status-badge--cancelled {
    background: rgba(255, 68, 68, 0.18);
    color: #ff9ea1;
}

.status-badge--completed {
    background: rgba(255, 255, 255, 0.12);
    color: var(--muted);
}

/* =====================================================================
   Calendar (templates/dashboard_server_events_calendar.html)
   Design adopted from Claude Design "Catcord Calendar.html". Tokens
   already live in :root above; this block layers the calendar UI:
   shell, toolbar, sub-toolbar, agenda list, month grid, day timeline,
   side drawer, toast.
   ===================================================================== */

/* layout shell — single pane, no nav rail (calendar stands alone per
   user constraint: "wir kommen vom server -> kalender"). */
.calendar-pane-shell {
    width: min(1280px, 100% - 2.5rem);
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

.calendar-pane {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 1.5rem 1.75rem 2rem;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    min-height: 70vh;
}

.calendar-pane-shell--share .calendar-pane {
    max-width: 64rem;
    margin: 0 auto;
}

/* breadcrumb */
.calendar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin: 0 0 1rem;
}
.calendar-breadcrumb__crumb {
    color: var(--muted);
}
.calendar-breadcrumb__crumb--link {
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
}
.calendar-breadcrumb__crumb--link:hover,
.calendar-breadcrumb__crumb--link:focus-visible {
    text-decoration: underline;
}
.calendar-breadcrumb__sep {
    color: var(--muted);
    opacity: 0.6;
}

/* Apollo-style toolbar */
.calendar-toolbar--apollo {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
}
.calendar-toolbar__nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.calendar-toolbar__label {
    margin: 0;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.01em;
}
.calendar-toolbar__label .year {
    color: var(--muted);
    font-weight: 500;
    margin-left: 0.35rem;
}
.calendar-toolbar__cta {
    margin-left: auto;
}

/* icon-only navigator buttons */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 1rem;
    text-decoration: none;
}
.icon-button:hover,
.icon-button:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    border-color: var(--border);
}

/* sub-toolbar (status filter + view toggle) */
.calendar-subtoolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.calendar-subtoolbar__filter {
    margin: 0;
}
.calendar-subtoolbar select {
    padding: 0.45rem 0.65rem;
    border-radius: 0.55rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
}
.calendar-subtoolbar__views {
    margin-left: auto;
    display: inline-flex;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 3px;
}
.calendar-subtoolbar__view-link {
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--muted);
    border-radius: var(--radius-pill);
    cursor: pointer;
    text-decoration: none;
}
.calendar-subtoolbar__view-link:hover {
    color: var(--text);
}
.calendar-subtoolbar__view-link.is-active {
    background: var(--accent);
    color: #0a1931;
    font-weight: 600;
}

/* agenda list */
.calendar-days {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}
.calendar-day {
    background: transparent;
    border: 0;
    padding: 0;
}
.calendar-day__header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin: 0 0 0.65rem;
}
.calendar-day__header--standalone {
    margin-bottom: 0.75rem;
}
.calendar-day__weekday {
    color: var(--muted);
    font-weight: 400;
    font-size: 0.95rem;
}
.calendar-day__date {
    color: var(--text);
    font-weight: 700;
    font-size: 0.95rem;
}
.calendar-day__events {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* today divider */
.calendar-today-divider {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.25rem 0 0;
    padding: 0;
}
.calendar-today-divider__chip {
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}
.calendar-today-divider__line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* event cards (agenda) */
.event-card {
    position: relative;
    border-radius: var(--radius-card);
    border: 0;
    border-left: 4px solid var(--accent);
    background: rgba(255, 255, 255, 0.045);
    transition: background 0.15s ease;
}
.event-card:hover {
    background: rgba(255, 255, 255, 0.075);
}
.event-card.is-selected {
    background: rgba(43, 183, 255, 0.10);
    outline: 1px solid var(--accent-soft);
}
.event-card--accent  { border-left-color: var(--accent); }
.event-card--orange  { border-left-color: var(--orange); }
.event-card--warning { border-left-color: var(--warning); }
.event-card--error   { border-left-color: var(--error); }
.event-card--muted   { border-left-color: var(--muted); }
.event-card--success { border-left-color: var(--success); }
/* Birthdays render with a warm gradient strip so they stand out from
   regular events without screaming. Same border treatment as the other
   variants — just a different colour stop. */
.event-card--birthday {
    border-left-color: #FF6B9D;
    background: linear-gradient(
        90deg,
        rgba(255, 107, 157, 0.10) 0%,
        rgba(255, 107, 157, 0.02) 60%,
        transparent 100%
    );
}
.month-grid__pill--birthday {
    background: rgba(255, 107, 157, 0.18);
    border-color: rgba(255, 107, 157, 0.35);
}
.day-view__event--birthday {
    background: rgba(255, 107, 157, 0.15);
    border-left: 3px solid #FF6B9D;
}
.calendar-subtoolbar__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.6rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.calendar-subtoolbar__toggle input { margin: 0; }

/* Greeting-message mode picker — radios stacked vertically so the
   "—" separators between the option label and its explanation
   don't visually run together when wrapped. */
.form__mode-radios {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin: 0.25rem 0 0.85rem;
}
.form__mode-radios > .form__radio {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    line-height: 1.45;
}
.form__mode-radios > .form__radio:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
}
.form__mode-radios > .form__radio input[type="radio"] {
    margin-top: 0.25rem;  /* baseline with the strong label */
    flex-shrink: 0;
}

/* Native ``<input type="color">`` renders as a tiny 1-line strip by
   default — give it actual block dimensions so it's clickable. */
.form__color-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.3rem;
    flex-wrap: wrap;
}
.form__color-row input[type="color"] {
    width: 72px;
    height: 40px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
}
.form__color-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
.form__color-row input[type="color"]::-webkit-color-swatch {
    border: 0;
    border-radius: 4px;
}
.form__color-row input[type="color"]::-moz-color-swatch {
    border: 0;
    border-radius: 4px;
}
.form__color-row output {
    font-family: var(--font-mono, ui-monospace, "SF Mono", Menlo, monospace);
    font-size: 0.85rem;
    color: var(--muted);
}

/* Birthday roster on /dashboard/servers/<id>/birthdays — shows
   which members opted in, sorted by next-upcoming date. */
.birthday-roster-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.birthday-roster-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}
.birthday-roster-row__main {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.birthday-roster-row__date {
    color: var(--muted);
    font-variant-numeric: tabular-nums;
    font-size: 0.85rem;
}
.birthday-roster-row__age {
    color: var(--muted);
    font-size: 0.85rem;
    font-style: italic;
}
.birthday-roster-row__pill {
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill, 12px);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
}
.birthday-roster-row--today {
    border-color: #FF6B9D;
    background: rgba(255, 107, 157, 0.10);
}
.birthday-roster-row__pill--today {
    background: #FF6B9D;
    border-color: #FF6B9D;
    color: #0a1931;
    font-weight: 600;
}

/* Server-template list rows — each row has a header line (name +
   swatch + message preview + actions) plus an optional inline
   dry-run preview that drops in below when the admin clicks Test
   on that row. */
.birthday-templates-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.birthday-template-row {
    padding: 0.7rem 0.85rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}
.birthday-template-row__top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    justify-content: space-between;
}
.birthday-template-row__main {
    flex: 1 1 auto;
    min-width: 0;
}
.birthday-template-row__main strong {
    display: inline-block;
    margin-right: 0.4rem;
}
.birthday-template-row__main p {
    margin: 0.3rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    word-wrap: break-word;
}
.birthday-template-row__swatch {
    display: inline-block;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    vertical-align: middle;
}
.birthday-template-row__actions {
    display: flex;
    flex-shrink: 0;
    gap: 0.4rem;
    align-items: center;
}
.birthday-template-row__actions > form {
    margin: 0;
}
/* Inline Discord-preview card inside a template row — small top
   spacer separates it from the row header. */
.birthday-template-row > .discord-preview {
    margin-top: 0.85rem;
}

/* Annual-recap widget — three year cells side-by-side, current year
   highlighted. */
.birthday-recap-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin: 0.75rem 0;
}
.birthday-recap-cell {
    text-align: center;
    padding: 0.85rem 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}
.birthday-recap-cell--current {
    border-color: #FF6B9D;
    background: rgba(255, 107, 157, 0.10);
}
.birthday-recap-cell__count {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}
.birthday-recap-cell__label {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.25rem;
    font-variant-numeric: tabular-nums;
}
.birthday-recap-total {
    margin-top: 0.4rem;
    font-style: italic;
}
.event-card__link {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.9rem 3rem 0.9rem 1.1rem;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.event-card__title {
    font-weight: 500;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.78);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.event-card__meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--muted);
    /* Reserve right space for the absolutely-positioned RSVP tally
       so long time strings don't slide underneath the pills. */
    padding-right: 7.5rem;
}
@media (max-width: 640px) {
    .event-card__meta {
        padding-right: 0;
    }
}
.event-card__time {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-variant-numeric: tabular-nums;
}
.event-card__icon {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    color: var(--muted);
}

/* kebab */
.event-card__actions {
    position: absolute;
    top: 50%;
    right: 0.6rem;
    transform: translateY(-50%);
}
.event-card__kebab {
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.45rem;
    background: transparent;
    border: 0;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-size: 1.1rem;
    line-height: 1;
}
.event-card__kebab:hover,
.event-card__kebab[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
}
.event-card__menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    min-width: 180px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 0.65rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    padding: 0.35rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
    z-index: 100;
}
/* When a card's menu is open, lift the whole card above its siblings
   so the dropdown isn't covered by the next event-card. */
.event-card:has(.event-card__menu:not([hidden])) {
    z-index: 5;
}
.event-card__menu[hidden] { display: none; }
.event-card__menu-item {
    background: transparent;
    border: 0;
    padding: 0.5rem 0.65rem;
    text-align: left;
    color: var(--text);
    font-size: 0.85rem;
    border-radius: 0.4rem;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    width: 100%;
    display: block;
    font-weight: 400;
    line-height: 1.35;
}
.event-card__menu-item:hover,
.event-card__menu-item:focus {
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}
.event-card__menu-item--danger { color: var(--error); }
.event-card__menu-item--danger:hover { background: rgba(255, 68, 68, 0.08); }

/* The kebab-menu cancel item is a <button type="submit"> inside a
   <form>, so the legacy form-button orange fallback (specificity
   0,1,1) would otherwise win over `.event-card__menu-item` (0,1,0).
   Bumping to `button.event-card__menu-item` (0,1,1) ties on specificity
   and wins on cascade order since it sits later in the file. Calendar-
   scoped — does NOT affect form buttons on other pages. */
button.event-card__menu-item {
    background: transparent;
    color: var(--text);
    padding: 0.5rem 0.65rem;
    border-radius: 0.4rem;
    font-weight: 400;
    box-shadow: none;
    justify-self: stretch;
}
button.event-card__menu-item:hover,
button.event-card__menu-item:focus {
    background: rgba(255, 255, 255, 0.06);
    filter: none;
}
button.event-card__menu-item--danger {
    color: var(--error);
}
button.event-card__menu-item--danger:hover {
    background: rgba(255, 68, 68, 0.08);
}
/* The cancel form wraps its trigger button. `display: contents` makes
   the form layout-transparent so the inner button still fills the
   menu row instead of being constrained by the form's block box. */
.event-card__menu-form {
    margin: 0;
    display: contents;
}

/* Compact RSVP tally — emoji + count pills that sit inside the
   event-card meta row. Doubles as a vote control when the event is
   editable, falls back to a passive count display otherwise. The
   tally is a sibling of the click-through link so pill clicks don't
   bubble up to open the drawer. */
.event-card__rsvp-tally {
    position: absolute;
    right: 2.6rem;
    bottom: 0.7rem;
    display: flex;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    align-items: center;
}
/* Tag the selector with the element name (button.X / span.X) so it
   beats the global `button[type="submit"]` legacy rule on specificity. */
button.event-card__rsvp-pill,
span.event-card__rsvp-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-pill);
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 400;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    line-height: 1.4;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
button.event-card__rsvp-pill:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    filter: none;
}
button.event-card__rsvp-pill strong,
span.event-card__rsvp-pill strong {
    color: var(--text);
    font-weight: 600;
}
button.event-card__rsvp-pill.is-active.event-card__rsvp-pill--yes {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(153, 247, 194, 0.3);
}
button.event-card__rsvp-pill.is-active.event-card__rsvp-pill--maybe {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: rgba(255, 209, 140, 0.3);
}
button.event-card__rsvp-pill.is-active.event-card__rsvp-pill--no {
    background: var(--error-soft);
    color: var(--error);
    border-color: rgba(255, 68, 68, 0.3);
}
span.event-card__rsvp-pill--passive {
    cursor: default;
    pointer-events: none;
}

@media (max-width: 640px) {
    /* Drop the absolute positioning on narrow screens — let the
       tally wrap onto its own row beneath the meta. */
    .event-card__rsvp-tally {
        position: static;
        margin: 0 0 0.7rem 1.1rem;
    }
}

/* Drawer RSVP buttons — chunky chips with full Yes/Maybe/No label.
   Only used inside the side drawer, never on cards. */
.event-card__rsvp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}
.event-card__rsvp-chip:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
}
.event-card__rsvp-chip.is-active.event-card__rsvp-chip--yes {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(153, 247, 194, 0.3);
}
.event-card__rsvp-chip.is-active.event-card__rsvp-chip--maybe {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: rgba(255, 209, 140, 0.3);
}
.event-card__rsvp-chip.is-active.event-card__rsvp-chip--no {
    background: var(--error-soft);
    color: var(--error);
    border-color: rgba(255, 68, 68, 0.3);
}

/* dragging cue */
.event-card--draggable {
    cursor: grab;
    /* The DragDropTouch polyfill (see templates/dashboard_server_
       events_calendar.html scripts block) translates touchstart/
       touchmove into dragstart/dragover, but iOS Safari claims the
       touch for native scroll BEFORE the polyfill's 5-px threshold
       fires unless we explicitly hand it over. ``touch-action: none``
       on the draggable disables native panning/zoom on those
       elements only — scroll still works by swiping the gaps between
       cards. Trade-off accepted to make mobile drag-to-reschedule
       actually work. */
    touch-action: none;
}
.event-card--draggable:active {
    cursor: grabbing;
}
.event-card--dragging {
    opacity: 0.45;
}
.month-grid__cell.is-drop-target {
    outline: 2px dashed var(--accent);
    outline-offset: -2px;
    background: rgba(43, 183, 255, 0.06);
}
.month-grid__pill.event-card--draggable {
    cursor: grab;
    touch-action: none;
}
.month-grid__pill.event-card--dragging {
    opacity: 0.45;
}
.calendar-day.is-drop-target {
    outline: 1px dashed var(--accent);
    outline-offset: 4px;
    border-radius: 0.5rem;
}

/* empty state */
.calendar-empty {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    margin: 2rem 0;
}

/* ----- MONTH grid view ----- */
.month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}
.month-grid__head {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.55rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.month-grid__cell {
    background: rgba(5, 15, 31, 0.6);
    min-height: 7rem;
    padding: 0.55rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    cursor: pointer;
    transition: background 0.15s ease;
    color: inherit;
    text-decoration: none;
}
.month-grid__cell:hover {
    background: rgba(255, 255, 255, 0.04);
}
.month-grid__cell--outside {
    opacity: 0.4;
}
.month-grid__cell--today .month-grid__num {
    background: var(--accent);
    color: #0a1931;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.month-grid__num {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    align-self: flex-start;
}
.month-grid__pill {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem 0.15rem 0.35rem;
    border-radius: 0.3rem;
    background: var(--accent-soft);
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 2px solid var(--accent);
    cursor: pointer;
}
.month-grid__pill:hover {
    filter: brightness(1.2);
}
.month-grid__pill--accent  { background: var(--accent-soft);   border-left-color: var(--accent); }
.month-grid__pill--orange  { background: rgba(246, 160, 53, 0.16); border-left-color: var(--orange); }
.month-grid__pill--warning { background: var(--warning-soft);  border-left-color: var(--warning); }
.month-grid__pill--error   { background: var(--error-soft);    border-left-color: var(--error); }
.month-grid__pill--muted   { background: rgba(156, 181, 212, 0.10); border-left-color: var(--muted); }
.month-grid__pill--success { background: var(--success-soft);  border-left-color: var(--success); }
.month-grid__more {
    font-size: 0.68rem;
    color: var(--muted);
    padding: 0 0.35rem;
}

/* ----- DAY timeline view ----- */
.day-view {
    display: grid;
    grid-template-columns: 56px 1fr;
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
}
.day-view__hour-col {
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
}
.day-view__hour {
    height: 60px;
    font-size: 0.7rem;
    color: var(--muted);
    text-align: right;
    padding: 0.2rem 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}
.day-view__col {
    position: relative;
    background: rgba(255, 255, 255, 0.01);
}
.day-view__line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}
.day-view__now {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--orange);
    z-index: 2;
    box-shadow: 0 0 12px rgba(246, 160, 53, 0.4);
}
.day-view__now::before {
    content: "";
    position: absolute;
    left: -5px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--orange);
}
.day-view__event {
    position: absolute;
    left: 8px;
    right: 8px;
    background: var(--accent-soft);
    border-left: 3px solid var(--accent);
    border-radius: 0.5rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.82rem;
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
}
.day-view__event:hover {
    filter: brightness(1.15);
}
.day-view__event--accent  { background: var(--accent-soft);            border-left-color: var(--accent); }
.day-view__event--orange  { background: rgba(246, 160, 53, 0.16);      border-left-color: var(--orange); }
.day-view__event--warning { background: var(--warning-soft);           border-left-color: var(--warning); }
.day-view__event--error   { background: var(--error-soft);             border-left-color: var(--error); }
.day-view__event--muted   { background: rgba(156, 181, 212, 0.10);     border-left-color: var(--muted); }
.day-view__event--success { background: var(--success-soft);           border-left-color: var(--success); }
.day-view__event-title {
    font-weight: 600;
    color: var(--text);
}
.day-view__event-time {
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 2px;
}

/* Day-view drag-to-reschedule: cursor + dragging + drop-target +
   ghost line indicator. Only the .event-card--draggable variant of a
   day-view event gets the grab cursor. */
.day-view__event.event-card--draggable {
    cursor: grab;
    /* Same touch-action override as agenda/month — see
       .event-card--draggable above for why. The day-view column is
       still scrollable by touching the empty grid lines between
       events. */
    touch-action: none;
}
.day-view__event.event-card--draggable:active {
    cursor: grabbing;
}
.day-view__event.event-card--dragging {
    opacity: 0.45;
}
.day-view__col.is-drop-target {
    background: rgba(43, 183, 255, 0.04);
    outline: 1px dashed rgba(43, 183, 255, 0.4);
    outline-offset: -1px;
}
.day-view__ghost {
    position: absolute;
    left: 4px;
    right: 4px;
    height: 0;
    border-top: 2px dashed var(--accent);
    z-index: 3;
    pointer-events: none;
}
.day-view__ghost[hidden] { display: none; }
.day-view__ghost-time {
    position: absolute;
    right: 0;
    top: -10px;
    background: var(--surface-solid);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding: 0.1rem 0.4rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(43, 183, 255, 0.4);
    line-height: 1.2;
}

/* ----- DRAWER (event detail) ----- */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    /* Sits above site-header (z-index 20) and any sticky toolbars. */
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.drawer-backdrop[hidden] { display: none; }
.drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 100vw);
    background: var(--surface-solid);
    border-left: 1px solid var(--border);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.drawer[hidden] { display: none; }
.drawer.is-open {
    transform: translateX(0);
}
.drawer__head {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.drawer__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    flex: 1;
}
.drawer__close {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-family: inherit;
}
.drawer__close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}
.drawer__body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.drawer__row {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 0.65rem;
    align-items: start;
    font-size: 0.9rem;
}
.drawer__row[hidden] { display: none; }
.drawer__row svg {
    width: 18px;
    height: 18px;
    color: var(--muted);
    margin-top: 2px;
}
.drawer__row-label {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.drawer__row-value {
    color: var(--text);
    margin-top: 2px;
}
.drawer__section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.drawer__section[hidden] { display: none; }
.drawer__section h4 {
    margin: 0;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 600;
}
.drawer__rsvp {
    display: flex;
    gap: 0.4rem;
    margin: 0;
    flex-wrap: wrap;
}
.drawer__rsvp-summary {
    display: flex;
    gap: 1rem;
    color: var(--muted);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}
.drawer__rsvp-summary strong {
    color: var(--text);
    margin-left: 0.25rem;
}

/* Drawer RSVP chip — slim pill buttons inside the drawer.
   Match the design reference: transparent background, thin border,
   colored soft fill when the viewer's RSVP is active. */
/* Tagged with `button.` so the legacy `form button` / `button[type="submit"]`
   global rule (line ~980) doesn't repaint these orange via gradient. */
button.drawer__rsvp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-pill);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    box-shadow: none;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
button.drawer__rsvp-chip:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
    filter: none;
}
button.drawer__rsvp-chip.is-active.drawer__rsvp-chip--yes {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(153, 247, 194, 0.3);
}
button.drawer__rsvp-chip.is-active.drawer__rsvp-chip--maybe {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: rgba(255, 209, 140, 0.3);
}
button.drawer__rsvp-chip.is-active.drawer__rsvp-chip--no {
    background: var(--error-soft);
    color: var(--error);
    border-color: rgba(255, 68, 68, 0.3);
}

/* Going / attendee list — pills with circular initial avatars.
   Per design palette: cycle 7 colors via inline style on the avatar. */
.drawer__attendees {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.drawer__attendees:empty { display: none; }
.drawer__attendees--loading,
.drawer__attendees--empty {
    color: var(--muted);
    font-size: 0.85rem;
    padding: 0.25rem 0;
}
.drawer__attendee {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.65rem 0.3rem 0.3rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--text);
}
.drawer__attendee--maybe { opacity: 0.85; }
.drawer__attendee--no    { opacity: 0.6; text-decoration: line-through; }
.drawer__avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #0a1931;
    flex: 0 0 22px;
}
.drawer__avatar--img {
    /* Real Discord avatar image — drop the initial styles, let the
       image fill the circle. object-fit guards against non-square
       Discord avatars (e.g. transparent-PNG uploads). */
    background: rgba(255, 255, 255, 0.04);
    object-fit: cover;
}
.drawer__foot {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.drawer__cancel-form {
    margin: 0;
}
/* Drawer-foot cancel: a <button class="button button--ghost button--small">
   wrapped in <form>, so the legacy form-button rule paints it orange.
   Tag with `button.` so specificity (0,2,1) beats `button[type="submit"]`
   (0,1,1). Calendar-scoped — does NOT affect other pages. */
.drawer__foot button.button--ghost,
.drawer__cancel-form button.button--ghost {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    font-weight: 500;
    font-size: 0.85rem;
    box-shadow: none;
    justify-self: auto;
}
.drawer__foot button.button--ghost:hover,
.drawer__cancel-form button.button--ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    filter: none;
}
.drawer__description {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ----- RESCHEDULE CONFIRM MODAL -----
   Opened on every drag-drop. Lives in the {% block overlays %} layer
   (rendered as a direct child of <body>) so it escapes the .section /
   .calendar-pane backdrop-filter stacking context — same trick the
   drawer uses. Z-index above the drawer (1001) but below the toast
   (1100) so success toast still shows over a fading-out modal. */
.reschedule-confirm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}
.reschedule-confirm-backdrop[hidden] { display: none; }
.reschedule-confirm-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}
.reschedule-confirm {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(440px, calc(100vw - 2rem));
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    z-index: 1060;
    transform: translate(-50%, calc(-50% + 12px));
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    flex-direction: column;
}
.reschedule-confirm[hidden] { display: none; }
.reschedule-confirm.is-open {
    opacity: 1;
    transform: translate(-50%, -50%);
}
.reschedule-confirm__head {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.reschedule-confirm__title {
    margin: 0;
    flex: 1;
    font-size: 1.05rem;
    font-weight: 700;
}
.reschedule-confirm__close {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    line-height: 1;
    font-size: 1.05rem;
}
.reschedule-confirm__close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}
.reschedule-confirm__body {
    padding: 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.reschedule-confirm__body-text {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.5;
}
.reschedule-confirm__row {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.reschedule-confirm__row-label {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.reschedule-confirm__new-time-input {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    color-scheme: dark;
}
.reschedule-confirm__new-time-input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(43, 183, 255, 0.06);
}
.reschedule-confirm__notify {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}
.reschedule-confirm__notify input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}
.reschedule-confirm__role {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.reschedule-confirm__role label {
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.reschedule-confirm__foot {
    padding: 0.85rem 1.25rem 1.1rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ----- TOAST ----- */
.toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--surface-solid);
    border: 1px solid var(--accent-soft);
    color: var(--text);
    padding: 0.65rem 1rem;
    border-radius: 0.65rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    /* Above the drawer (1001) + backdrop (1000) so feedback from a
       drawer-initiated action is visible while the drawer stays open. */
    z-index: 1100;
}
.toast[hidden] { display: none; }
.toast.is-open {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast.toast--error {
    border-color: rgba(255, 68, 68, 0.45);
    box-shadow: var(--shadow), 0 0 0 1px rgba(255, 68, 68, 0.18);
}

/* ----- Subscribe disclosures (carry-over from earlier feature) ----- */
.calendar-footer {
    margin-top: 2.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.calendar-subscribe {
    margin: 0;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
}
.calendar-subscribe__summary {
    cursor: pointer;
    color: var(--muted);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.calendar-subscribe[open] .calendar-subscribe__summary {
    color: var(--text);
}
.calendar-subscribe__body {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.calendar-subscribe__help {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}
.calendar-subscribe__url-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.calendar-subscribe__url {
    flex: 1;
    padding: 0.45rem 0.65rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text);
    font-family: ui-monospace, monospace;
    font-size: 0.8rem;
}

/* share-mode banner / footer (carry-over) */
.share-banner {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
}
.share-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.8rem;
    margin: 2rem 0 0;
}

/* ----- responsive ----- */
@media (max-width: 720px) {
    .calendar-toolbar__label {
        font-size: 1.5rem;
    }
    .calendar-toolbar__cta {
        margin-left: 0;
    }
    .event-card__link {
        padding-right: 2.5rem;
    }
    .month-grid__cell {
        min-height: 5rem;
        padding: 0.4rem;
    }
    .month-grid__pill {
        font-size: 0.65rem;
    }
}

