/* Geperuts official blue brand color, overriding DaisyUI's stock "emerald"
   theme primary tokens (--p/--pc) so btn-primary, badge-primary, etc. render
   blue instead of green app-wide. Values are OKLCH components matching the
   format DaisyUI v4's precompiled full.min.css uses for its shipped themes. */
[data-theme="emerald"] {
    --p: 0.524108 0.125925 252.323587;
    --pc: 1 0 0;
    /* Override accent (emerald teal → brand indigo-blue) so btn-accent/badge-accent
       render in the blue palette. */
    --a: 0.56 0.135 265;
    --ac: 1 0 0;
}

:root {
    --gp-brand-blue: #1e5bb8;
    --gp-brand-blue-soft: #5f86cd;
    --gp-brand-blue-pale: #e8eef9;
    --gp-topbar-bg: rgba(255, 255, 255, 0.66);
    --gp-topbar-border: rgba(15, 23, 42, 0.08);
    --gp-pill-text: #0f172a;
    --gp-pill-active: #0f172a;
    --gp-pill-active-text: #f8fafc;
    --gp-font-body: "Space Grotesk", "Segoe UI", sans-serif;
    --gp-font-display: "Fraunces", Georgia, serif;
    --gp-panel-bg: rgba(255, 255, 255, 0.74);
    --gp-panel-border: rgba(15, 23, 42, 0.1);
    --gp-shadow-soft: 0 14px 32px rgba(15, 23, 42, 0.08);
}

html,
body {
    min-height: 100vh;
}

body {
    font-family: var(--gp-font-body);
    color: #102035;
    background:
    radial-gradient(circle at 8% -14%, rgba(30, 91, 184, 0.34), transparent 40%),
    radial-gradient(circle at 92% -10%, rgba(95, 134, 205, 0.3), transparent 38%),
    linear-gradient(180deg, #f4f7fd 0%, var(--gp-brand-blue-pale) 58%, #dbe6f7 100%);
}

h1,
h2,
h3,
.card-title {
    font-family: var(--gp-font-display);
    letter-spacing: 0.01em;
}

.site-title {
    font-family: var(--gp-font-display);
    font-weight: 800;
    letter-spacing: 0.01em;
}

.site-brand {
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    align-items: center;
    gap: 0.45rem;
    white-space: nowrap;
    text-decoration: none;
    color: inherit;
}

.site-brand-logo {
    display: block;
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 54px;
    min-height: 54px;
    max-height: 54px;
    flex: 0 0 54px;
    object-fit: cover;
    border-radius: 0.3rem;
    border: 1px solid rgba(15, 23, 42, 0.2);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
    transform: rotate(0deg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-brand:hover .site-brand-logo,
.site-brand:focus-visible .site-brand-logo {
    transform: rotate(0deg) translateY(0px) scale(1.04);
    box-shadow: 0 12px 22px rgba(15, 23, 42, 0.16);
}

.site-brand .site-title {
    display: inline-block;
    white-space: nowrap;
}

.site-header-layout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.site-header-brand {
    min-width: 0;
}

.site-header-nav {
    display: flex;
    justify-content: center;
    min-width: 0;
}

.site-header-actions {
    align-self: flex-end;
}

.site-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid var(--gp-topbar-border);
    background: var(--gp-topbar-bg);
    backdrop-filter: blur(12px) saturate(1.4);
}

.gp-page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    background: linear-gradient(90deg, var(--gp-brand-blue), var(--gp-brand-blue-soft));
    transition: width 0.2s ease, opacity 0.2s ease;
}

.gp-page-loader.is-loading {
    opacity: 1;
    transition: width 0.3s cubic-bezier(0.1, 0.6, 0.2, 1), opacity 0.15s ease;
}

.gp-page-loader.is-loading.is-growing {
    width: 88%;
    transition: width 6s cubic-bezier(0.1, 0.6, 0.2, 1), opacity 0.15s ease;
}

.gp-page-loader.is-done {
    width: 100%;
    opacity: 0;
    transition: width 0.2s ease, opacity 0.3s ease 0.15s;
}

.apple-nav-shell {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    padding: 0.25rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.apple-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.4rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.apple-nav::-webkit-scrollbar {
    display: none;
}

.apple-nav .nav-pill {
    flex-shrink: 0;
    white-space: nowrap;
}

.mobile-nav-shell {
    width: 100%;
}

.mobile-nav-shell::-webkit-scrollbar {
    display: none;
}

.mobile-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
    gap: 0.35rem;
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.25rem;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.mobile-nav-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 2.5rem;
    height: auto;
    white-space: normal;
    text-align: center;
    line-height: 1.15;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.nav-pill {
    border: none;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--gp-pill-text);
    transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.nav-pill:hover {
    background: rgba(15, 23, 42, 0.09);
    transform: translateY(-1px);
}

.nav-pill.nav-pill-active {
    background: var(--gp-pill-active);
    color: var(--gp-pill-active-text);
}

#main-content {
    animation: gp-fade-up 0.38s ease;
}

#main-content.gp-content-enter {
    animation: gp-fade-up 0.38s ease;
}

#main-content.gp-content-exit {
    opacity: 0.55;
    transform: translateY(4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.card,
.stats,
.alert,
.modal-box,
.table,
#calendar-view > .overflow-x-auto,
#calendar-view > .flex {
    border: 1px solid var(--gp-panel-border);
    background: var(--gp-panel-bg);
    box-shadow: var(--gp-shadow-soft);
    backdrop-filter: blur(6px);
}

.modal-box {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.btn {
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.badge {
    font-weight: 600;
    border-radius: 999px;
}

.site-user-link {
    border-color: rgba(15, 23, 42, 0.16);
    background: transparent;
    color: #102035;
    transition: border-color 0.16s ease, color 0.16s ease;
}

.site-user-link:hover {
    background: transparent;
    border-color: #0f172a;
    color: #0f172a;
}

.input,
.select,
.textarea {
    border-radius: 0.9rem;
}

.table thead tr {
    font-family: var(--gp-font-body);
    letter-spacing: 0.02em;
}

.admin-tabs {
    --tab-border-color: rgba(148, 163, 184, 0.42);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-tabs > .tab {
    white-space: nowrap;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    color: #102035;
    background: #f1f5f9;
}

.admin-tabs > .tab:is(:checked, .tab-active) {
    background: #ffffff;
    color: #0f172a;
}

.admin-tab-panel {
    display: none;
    border-color: var(--gp-panel-border);
    background: #ffffff;
    margin-top: 0;
    border-top-left-radius: 0;
}

.admin-tab-panel.is-active {
    display: block;
}

.diades-shell {
    --diades-ink: #162238;
    --diades-berry: #c2410c;
    --diades-sea: #0f766e;
}

.diades-hero {
    position: relative;
    overflow: hidden;
    border-radius: 2rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background:
        radial-gradient(circle at 0% 0%, rgba(194, 65, 12, 0.24), transparent 42%),
        radial-gradient(circle at 100% 0%, rgba(15, 118, 110, 0.23), transparent 38%),
        linear-gradient(145deg, #fff7ed 0%, #f8fafc 45%, #ecfeff 100%);
    box-shadow: 0 24px 58px rgba(15, 23, 42, 0.1);
}

.diades-hero-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(6px);
    pointer-events: none;
}

.diades-hero-orb-a {
    width: 170px;
    height: 170px;
    left: -50px;
    bottom: -70px;
    background: rgba(194, 65, 12, 0.22);
}

.diades-hero-orb-b {
    width: 210px;
    height: 210px;
    right: -60px;
    top: -80px;
    background: rgba(15, 118, 110, 0.2);
}

.diades-kicker {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.8);
    padding: 0.34rem 0.72rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--diades-ink);
}

.diada-card {
    border-radius: 1.4rem;
    border: 2px solid rgba(15, 23, 42, 0.16);
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.65);
    padding: 1.15rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.diada-card-button {
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.diada-card-button:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.35);
    outline-offset: 3px;
}

.diada-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.14);
}

.diada-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.diada-type-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #ffedd5;
    border: 1px solid #fdba74;
    color: var(--diades-berry);
    padding: 0.18rem 0.62rem;
    font-size: 0.73rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.diada-date {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
}

.diada-empty-state {
    border-radius: 1.4rem;
    border: 1px dashed rgba(15, 23, 42, 0.2);
    background: rgba(255, 255, 255, 0.75);
    padding: 1.5rem;
}

.gp-calendar-toolbar {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(241, 245, 249, 0.82)),
        var(--gp-panel-bg);
}

.gp-calendar-grid {
    align-items: stretch;
}

.gp-calendar-weekday {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gp-calendar-day {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.gp-calendar-day:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.gp-calendar-day-today {
    border-color: rgba(14, 116, 144, 0.45);
    box-shadow: inset 0 0 0 1px rgba(14, 116, 144, 0.2);
    background: linear-gradient(180deg, rgba(224, 242, 254, 0.65), rgba(255, 255, 255, 0.95));
}

.gp-calendar-day-past {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.85), rgba(241, 245, 249, 0.8));
}

.gp-calendar-event {
    backdrop-filter: blur(3px);
}

.gp-timetable-table tbody tr {
    transition: background-color 0.18s ease;
}

.gp-timetable-table tbody tr:hover {
    background-color: rgba(15, 23, 42, 0.04);
}

.gp-past-events-details > summary {
    user-select: none;
}

.gp-past-events-details > summary::-webkit-details-marker {
    display: none;
}

.gp-past-events-details > summary::after {
    content: "+";
    font-weight: 700;
    opacity: 0.65;
}

.gp-past-events-details[open] > summary::after {
    content: "-";
}

.gp-designs-collapsible > summary {
    list-style: none;
}

.gp-designs-collapsible > summary::-webkit-details-marker {
    display: none;
}

.gp-designs-collapsible > summary .gp-designs-collapsible-caret {
    display: inline-block;
    transition: transform 0.15s ease;
}

.gp-designs-collapsible[open] > summary .gp-designs-collapsible-caret {
    transform: rotate(180deg);
}

.my-assignment-shell {
    max-width: 1100px;
    margin: 0 auto;
}

.my-assignment-design-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.my-assignment-design-card {
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 0.95rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.88));
    padding: 0.7rem;
}

.my-assignment-pos-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #115e59;
    border-radius: 999px;
    padding: 0.16rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.my-assignment-schema-panel {
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 249, 0.84));
    padding: 0.5rem;
    overflow: hidden;
}

.my-assignment-legend-panel {
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.88));
    padding: 0.7rem;
}

.my-assignment-legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.42);
    background: #ffffff;
    padding: 0.38rem 0.5rem;
}

.legend-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid #334155;
    flex-shrink: 0;
}

.assignment-schema-wrap {
    width: 100%;
    max-width: 100%;
}

.assignment-schema :where(svg) {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: min(80vh, 940px);
}

@keyframes gp-fade-up {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gp-event-modal {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}

.gp-event-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.32s ease, visibility 0s linear 0s;
}

.gp-event-modal-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gp-event-modal.is-open .gp-event-modal-overlay {
    opacity: 1;
}

.gp-event-modal-panel {
    opacity: 0.9;
    transform: translateX(2.25rem) scale(0.992);
    transition: transform 0.38s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.32s ease;
    will-change: transform, opacity;
}

.gp-event-modal.is-open .gp-event-modal-panel {
    opacity: 1;
    transform: translateX(0) scale(1);
}

#event-detail-panel {
    transform-origin: top right;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#event-detail-panel.is-loading {
    opacity: 0.55;
    transform: translateY(0.3rem);
}

#event-detail-panel.is-loaded {
    animation: gp-panel-in 0.24s ease;
}

@keyframes gp-panel-in {
    from {
        opacity: 0.62;
        transform: translateY(0.35rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .gp-event-modal,
    .gp-event-modal-overlay,
    .gp-event-modal-panel,
    #event-detail-panel,
    #main-content,
    #main-content.gp-content-enter,
    #main-content.gp-content-exit {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    .site-title {
        font-size: 1.55rem;
    }

    .site-header-actions {
        width: 100%;
    }

    .site-brand {
        gap: 0.38rem;
        max-width: 100%;
    }

    .site-brand-logo {
        width: 14px;
        min-width: 14px;
        max-width: 14px;
        height: 22px;
        min-height: 22px;
        max-height: 22px;
        flex-basis: 22px;
    }

    .site-brand .site-title {
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .apple-nav {
        gap: 0.3rem;
    }

    .nav-pill {
        font-size: 0.8rem;
        padding: 0.4rem 0.7rem;
    }

    .mobile-nav {
        gap: 0.3rem;
        grid-template-columns: repeat(auto-fit, minmax(4.1rem, 1fr));
    }

    .mobile-nav-pill {
        font-size: 0.68rem;
        padding: 0.38rem 0.32rem;
        min-height: 2.4rem;
        line-height: 1.1;
    }

    .gp-calendar-board {
        padding-bottom: 0.65rem;
    }

    .gp-calendar-weekdays,
    .gp-calendar-grid {
        min-width: 640px;
    }

    .gp-calendar-weekdays {
        font-size: 0.65rem;
        letter-spacing: 0.02em;
    }

    .gp-calendar-day {
        min-height: 5.5rem;
    }

    .assignment-schema-container {
        overflow: hidden;
    }

    .assignment-schema-wrap {
        width: 100%;
    }

    .assignment-schema :where(svg) {
        width: 100%;
        max-width: 100%;
        height: auto;
    }
}

@media (min-width: 768px) {
    .site-header-layout {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 1rem;
        row-gap: 0;
    }

    .site-header-brand {
        grid-column: 1;
        grid-row: 1;
    }

    .site-header-nav {
        grid-column: 2;
        grid-row: 1;
    }

    .site-header-actions {
        grid-column: 3;
        grid-row: 1;
        width: auto;
        align-self: center;
    }
}

/* Mobile-only floating chrome: replaces the top header entirely on phones.
   .gp-has-floating-nav is set on <body> so #main-content reserves clearance
   for the fixed bottom island regardless of which main_class block a page
   uses. */
body.gp-has-floating-nav {
    /* Total space the bottom island occupies, measured from the viewport
       bottom: safe area + the island's offset + its height + a breathing gap.
       Pages with their own bottom-anchored controls (notably the designer
       canvas) read this to lift those controls clear of the island, so it
       must stay in sync with .gp-floating-bottom-nav's bottom offset and the
       height of .gp-floating-nav-item plus its wrapper padding. */
    --gp-floating-nav-clearance: calc(env(safe-area-inset-bottom, 0px) + 6.25rem);
}

body.gp-has-floating-nav #main-content {
    padding-bottom: var(--gp-floating-nav-clearance);
}

/* The swap target must not be transformed while the floating island is on
   screen. A transform on #main-content makes the fixed island resolve its
   `bottom` against the document box instead of the viewport, so for the length
   of the animation the island drops by exactly (document height - viewport
   height) and then springs back -- measured at 74px on a 390x844 viewport.
   gp-fade-up's translateY is what triggers it, which is why the glitch was
   direction-dependent: arriving at Home ran an opacity-only override, arriving
   at any other page ran gp-fade-up with its transform. Keep the fade, drop only
   the vertical travel; desktop has no island and keeps the original motion. */
@keyframes gp-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Declared only on .gp-content-enter, never on the bare #main-content. The swap
   handler restarts the entrance by removing the class, forcing a reflow and
   re-adding it, and that only restarts an animation when the animation-name
   actually changes between the two states -- so keeping the base selector
   animation-free is what makes the fade replay on every swap. */
body.gp-has-floating-nav #main-content {
    animation: none;
}

body.gp-has-floating-nav #main-content.gp-content-enter {
    animation: gp-fade-in 0.38s ease;
}

body.gp-has-floating-nav #main-content.gp-content-exit {
    transform: none;
}

.gp-floating-avatar {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 3.25rem);
    right: 0.85rem;
    z-index: 70;
}

.gp-floating-avatar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px) saturate(1.6);
    -webkit-backdrop-filter: blur(14px) saturate(1.6);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    color: var(--gp-brand-blue);
    font-family: var(--gp-font-display);
    font-weight: 800;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.gp-floating-avatar-btn:hover,
.gp-floating-avatar-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.3);
}

.gp-floating-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gp-floating-avatar-initials {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.gp-floating-avatar-menu {
    margin-top: 0.6rem;
}

.gp-floating-avatar-menu-item {
    display: flex;
    width: 100%;
    text-align: left;
    font-weight: 600;
}

.gp-floating-avatar-logout {
    color: #dc2626;
}

.gp-floating-avatar-logout:hover {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.08);
}

.gp-floating-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 1.1rem);
    transform: translateX(-50%);
    z-index: 70;
    width: max-content;
    max-width: calc(100vw - 1.6rem);
}

.gp-floating-bottom-nav-inner {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.35rem;
    border-radius: 1.6rem;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(20px) saturate(1.7);
    -webkit-backdrop-filter: blur(20px) saturate(1.7);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.38), 0 2px 10px rgba(15, 23, 42, 0.28);
}

.gp-floating-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    min-width: 3.9rem;
    max-width: 5.5rem;
    height: 3.4rem;
    padding: 0 0.4rem;
    border-radius: 1.25rem;
    color: rgba(255, 255, 255, 0.72);
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

/* The label names the destination so the icon is never the only cue. The
   anchor's aria-label already provides the accessible name, so the visible
   text is marked presentational to avoid it being announced twice. */
.gp-floating-nav-label {
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.01em;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gp-floating-nav-item:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.gp-floating-nav-item.is-active-page {
    background: var(--gp-brand-blue);
    color: #f8fafc;
    box-shadow: 0 6px 18px rgba(30, 91, 184, 0.55);
}

.gp-floating-nav-item svg {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
}

/* On the narrowest phones four labelled items would overflow the island, so
   trade padding and label size for fit rather than letting it clip. */
@media (max-width: 360px) {
    .gp-floating-nav-item {
        min-width: 3.35rem;
        padding: 0 0.2rem;
    }

    .gp-floating-nav-label {
        font-size: 0.5625rem;
    }
}

/* Castle design status visuals + drag-and-drop reorder (shared by the admin
   event panel, the calendar event detail modal, and the my-assignment
   page). */
.gp-design-row {
    position: relative;
    transition: opacity 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.gp-design-row-in-progress {
    box-shadow: 0 0 0 2px #16a34a inset;
    background-color: rgba(22, 163, 74, 0.06);
}

.gp-design-progress-tag {
    position: absolute;
    top: -0.55rem;
    left: 0.5rem;
    background: #16a34a;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    line-height: 1.3;
    z-index: 1;
}

.gp-design-row-done {
    opacity: 0.55;
    filter: grayscale(35%);
}

.gp-design-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    cursor: grab;
    color: rgba(100, 116, 139, 0.8);
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    flex-shrink: 0;
}

.gp-design-drag-handle:active {
    cursor: grabbing;
}

[data-design-reorder-list] .gp-design-row {
    cursor: default;
    /* pan-y (not none): the browser only honors touch-action as set at the
       very start of a touch, before any movement — it can't be flipped to
       none once a scroll has begun, and starting none here would block
       every scroll swipe that happens to begin on a card. Drag-and-drop
       therefore only starts from .gp-design-drag-handle (touch-action:
       none, see above), a small dedicated surface with no scroll ambiguity
       of its own; the row stays natively scrollable everywhere else. */
    touch-action: pan-y;
}

/* Dragging a row starts from a pointerdown on its handle, but the pointer
   inevitably passes over sibling text (name, badges) while moving; without
   this the browser starts a text selection in parallel with the reorder
   drag on some browsers even though pointerdown's default is prevented. */
.gp-design-list[data-design-reorder-list],
[data-design-reorder-list] .gp-design-row {
    -webkit-user-select: none;
    user-select: none;
}

.gp-design-row.gp-design-row-dragging {
    opacity: 0.3;
}

.gp-design-row.gp-design-row-drop-before {
    box-shadow: inset 0 2px 0 0 #0ea5e9;
}

.gp-design-row.gp-design-row-drop-after {
    box-shadow: inset 0 -2px 0 0 #0ea5e9;
}

/* Floating clone that tracks the pointer while dragging a design row;
   pointer-events:none so elementFromPoint sees the row underneath it
   instead of the ghost itself, which is needed for drop-target detection. */
.gp-design-row-ghost {
    position: fixed;
    margin: 0;
    pointer-events: none;
    opacity: 1;
    background-color: var(--fallback-b1, oklch(var(--b1)));
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.3);
    transform: rotate(1.5deg) scale(1.03);
    z-index: 1000;
    cursor: grabbing;
}

/* daisyUI keeps closed <dialog class="modal"> elements rendered as invisible
   full-viewport overlays (display:grid + opacity:0) to animate open/close.
   The admin panel holds one event-edit dialog per event, and each contains a
   lazily loaded members panel with hx-trigger="intersect once" — with the
   daisyUI behavior, every closed dialog "intersects" the viewport as soon as
   the Events tab shows, firing all panel fetches at once. Closed event-edit
   dialogs must therefore be display:none (the native <dialog> default) so a
   panel only loads when its modal is actually opened. Costs the fade
   animation for these modals only. */
dialog[id^="modal-update-event-"]:not([open]) {
    display: none;
}
