body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

.alert.alert-survey-access-denied-highlight {
    background-color: #f55718f8;
    border-color: #b02a37;
    color: #fff;
    font-weight: 600;
}

.alert.alert-survey-access-denied-highlight .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.registration-form .form-control::placeholder {
    color: #adb5bd;
    opacity: 1;
}

.hero-bg {
    background-size: cover;
    background-position: center;
    position: relative;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 32, 72, 0.5);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.conference-hero {
    --hero-start: #0b102a;
    --hero-mid: #1d4ed8;
    --hero-end: #38bdf8;
    background: linear-gradient(135deg, var(--hero-start) 0%, var(--hero-mid) 45%, var(--hero-end) 100%);
    position: relative;
    color: #fff;
    overflow: hidden;
}

.conference-hero::before,
.conference-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.conference-hero::before {
    width: 260px;
    height: 260px;
    top: -120px;
    right: -80px;
}

.conference-hero::after {
    width: 320px;
    height: 320px;
    bottom: -160px;
    left: -120px;
    background: rgba(255, 255, 255, 0.12);
}

.conference-hero.theme-aurora {
    --hero-start: #0b102a;
    --hero-mid: #1d4ed8;
    --hero-end: #38bdf8;
}

.conference-hero.theme-ocean {
    --hero-start: #0f172a;
    --hero-mid: #0ea5e9;
    --hero-end: #22d3ee;
}

.conference-hero.theme-peacock {
    --hero-start: #083344;
    --hero-mid: #0f766e;
    --hero-end: #5eead4;
}

.conference-hero.theme-forest {
    --hero-start: #064e3b;
    --hero-mid: #16a34a;
    --hero-end: #86efac;
}

.conference-hero.theme-sunrise {
    --hero-start: #7c2d12;
    --hero-mid: #ea580c;
    --hero-end: #fbbf24;
}

.conference-hero.theme-sunset {
    --hero-start: #4c0519;
    --hero-mid: #be123c;
    --hero-end: #fb7185;
}

.conference-hero.theme-plum {
    --hero-start: #2e1065;
    --hero-mid: #7e22ce;
    --hero-end: #d8b4fe;
}

.conference-hero.theme-slate {
    --hero-start: #0f172a;
    --hero-mid: #334155;
    --hero-end: #94a3b8;
}

.conference-hero.theme-ember {
    --hero-start: #7f1d1d;
    --hero-mid: #dc2626;
    --hero-end: #fca5a5;
}

.conference-hero.theme-sand {
    --hero-start: #78350f;
    --hero-mid: #d97706;
    --hero-end: #fde68a;
}

.conference-body {
    --conference-accent: var(--hero-mid, #1d4ed8);
    --conference-surface: #f5f7fb;
    --conference-surface-alt: #eef2f7;
    --conference-border: #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 65%);
}

@supports (color: color-mix(in srgb, white 50%, black 50%)) {
    .conference-body {
        --conference-surface: color-mix(in srgb, var(--conference-accent) 10%, #f5f7fb 90%);
        --conference-surface-alt: color-mix(in srgb, var(--conference-accent) 16%, #eef2f7 84%);
        --conference-border: color-mix(in srgb, var(--conference-accent) 22%, #e2e8f0 78%);
        background: linear-gradient(
            180deg,
            color-mix(in srgb, var(--conference-accent) 12%, #f8fafc 88%) 0%,
            #ffffff 65%
        );
    }
}

.conference-body section.bg-white {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 0.8rem 1.6rem rgba(15, 23, 42, 0.08);
}

@supports (color: color-mix(in srgb, white 50%, black 50%)) {
    .conference-body section.bg-white {
        border-color: var(--conference-border);
    }
}

.conference-info-card {
    height: 100%;
    padding: 1.25rem;
    border-radius: 1rem;
    background: var(--conference-surface-alt);
    border: 1px solid var(--conference-border);
    box-shadow: 0 0.65rem 1.2rem rgba(15, 23, 42, 0.06);
}

.conference-info-card--alt {
    background: var(--conference-surface);
}

.conference-info-card h3 {
    margin-bottom: 0.75rem;
}

.conference-info-card ul {
    margin-bottom: 0;
    padding-left: 1.1rem;
}

.academic-card-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    object-position: center;
    background-color: #f8f9fa;
}

.agenda-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.agenda-session {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.agenda-session-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.agenda-session-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.agenda-session-description {
    font-size: 0.9rem;
    color: #6b7280;
    margin: 0;
}

.agenda-session-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.agenda-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    align-items: start;
}

.agenda-time {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: #6c757d;
}

.agenda-time-range {
    font-weight: 600;
    color: #111827;
}

.agenda-duration {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: var(--agenda-accent, #0d6efd);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    width: fit-content;
}

.agenda-seq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.agenda-card {
    position: relative;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.08);
}

.agenda-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 1rem 0 0 1rem;
    background: var(--agenda-accent, #0d6efd);
}

.agenda-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.agenda-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--agenda-accent-soft, rgba(13, 110, 253, 0.12));
    color: var(--agenda-accent, #0d6efd);
    font-size: 1rem;
}

.agenda-type {
    font-size: 0.9rem;
    color: #111827;
}

.agenda-title {
    font-size: 0.95rem;
    color: #111827;
}

.agenda-style--muted {
    background: #f8f9fa;
    border-color: #e9ecef;
    box-shadow: none;
}

.agenda-style--outline {
    background: transparent;
    border-style: dashed;
}

.agenda-style--accent {
    background: #eef2ff;
    border-color: rgba(99, 102, 241, 0.2);
}

.agenda-style--highlight {
    background: #fff7ed;
    border-color: #fed7aa;
}

.agenda-item--opening {
    --agenda-accent: #16a34a;
    --agenda-accent-soft: rgba(22, 163, 74, 0.12);
}

.agenda-item--talk {
    --agenda-accent: #2563eb;
    --agenda-accent-soft: rgba(37, 99, 235, 0.12);
}

.agenda-item--panel {
    --agenda-accent: #0ea5e9;
    --agenda-accent-soft: rgba(14, 165, 233, 0.12);
}

.agenda-item--qa {
    --agenda-accent: #7c3aed;
    --agenda-accent-soft: rgba(124, 58, 237, 0.12);
}

.agenda-item--break {
    --agenda-accent: #94a3b8;
    --agenda-accent-soft: rgba(148, 163, 184, 0.16);
}

.agenda-item--lunch {
    --agenda-accent: #f59e0b;
    --agenda-accent-soft: rgba(245, 158, 11, 0.18);
}

.agenda-item--closing {
    --agenda-accent: #dc2626;
    --agenda-accent-soft: rgba(220, 38, 38, 0.12);
}

@media (max-width: 767.98px) {
    .agenda-row {
        grid-template-columns: 1fr;
    }

    .agenda-time {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.notice-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.08);
}

.badge-active {
    background: linear-gradient(135deg, #0069c0, #0091ea);
}

.timeline::before {
    content: "";
    position: absolute;
    left: 12px;
    width: 2px;
    top: 0;
    bottom: 0;
    background: #0d6efd;
}

.timeline-item {
    position: relative;
    padding-left: 48px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0d6efd;
}

.program-session {
    border-left: 4px solid #0d6efd;
}

.program-item {
    border-radius: 0.75rem;
    background-color: #f8f9fa;
    padding: 1rem;
}

.navbar-nav .nav-link {
    border-radius: 0.75rem;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .dropdown.show>.nav-link,
.navbar-nav .dropdown:hover>.nav-link {
    background-color: #d8f1ff;
    color: #0a4c7a;
}

.navbar-nav .dropdown-menu {
    border-radius: 0.75rem;
    box-shadow: 0 0.75rem 2rem rgba(10, 76, 122, 0.12);
    border: none;
    padding: 0.5rem 0;
}

.navbar-nav .dropdown-item {
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus,
.navbar-nav .dropdown-item.active {
    background-color: #d8f1ff;
    color: #0a4c7a;
}

.nav-auth-btn {
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.nav-auth-btn.btn-outline-primary {
    border-color: #0a4c7a;
    color: #0a4c7a;
    background-color: #f3f8fc;
}

.nav-auth-btn.btn-outline-primary:hover,
.nav-auth-btn.btn-outline-primary:focus {
    background-color: #e2f0fb;
    color: #083a5f;
    border-color: #083a5f;
}

.nav-auth-btn.btn-primary {
    background-color: #0a4c7a;
    border-color: #0a4c7a;
    box-shadow: 0 0.5rem 1.2rem rgba(10, 76, 122, 0.18);
}

.nav-auth-btn.btn-primary:hover,
.nav-auth-btn.btn-primary:focus {
    background-color: #083a5f;
    border-color: #083a5f;
}

.map-embed-responsive {
    position: relative;
    width: 100%;
    background-color: #f5f7fb;
    border-radius: 1rem;
    overflow: hidden;
}

.map-embed-responsive::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}

.map-embed-responsive.map-embed-responsive--naver {
    height: clamp(260px, 45vh, 420px);
}

.map-embed-responsive.map-embed-responsive--naver::before {
    content: none;
}

.map-embed-responsive>.root_daum_roughmap,
.map-embed-responsive>iframe {
    position: absolute !important;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

.map-embed-responsive>.venue-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.map-embed-responsive .root_daum_roughmap,
.map-embed-responsive .root_daum_roughmap .wrap_map,
.map-embed-responsive iframe {
    width: 100% !important;
    height: 100% !important;
}

.map-embed-responsive script {
    display: none;
}

@media (min-width: 992px) {
    .navbar .dropdown:hover>.dropdown-menu {
        display: block;
        margin-top: 0;
    }

    .navbar .dropdown-menu {
        margin-top: 0;
    }

    .mobile-nav-toggle, .mobile-nav-overlay {
        display: none !important;
    }
}

/* --- Apple-style Mobile Nav --- */
@media (max-width: 991.98px) {
    header {
        position: sticky;
        top: 0;
        z-index: 1060;
    }

    .navbar {
        padding: 0.75rem 1.25rem !important;
    }

    .navbar-toggler {
        display: none !important;
    }

    /* Hide default bootstrap collapse on mobile since we use custom overlay */
    .navbar-collapse {
        display: none !important;
    }

    .mobile-nav-toggle {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        width: 26px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1100;
        touch-action: manipulation;
        transition: transform 0.3s ease;
    }

    .mobile-nav-toggle span {
        width: 26px;
        height: 2px;
        background: #2b2b2d;
        border-radius: 10px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center;
    }

    .mobile-nav-toggle.active span:nth-child(1) {
        transform: translateY(4px) rotate(45deg);
    }

    .mobile-nav-toggle.active span:nth-child(2) {
        transform: translateY(-4px) rotate(-45deg);
    }

    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #fff;
        z-index: 1050;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
        padding-top: calc(88px + env(safe-area-inset-top)); /* Space for sticky header */
        overflow-y: auto;
    }

    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .mobile-nav-list {
        list-style: none;
        padding: 0 32px;
        margin: 0;
    }

    .mobile-nav-item {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
        border-bottom: 1px solid #f5f5f7;
    }

    .mobile-nav-overlay.active .mobile-nav-item {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered animation for menu items */
    .mobile-nav-overlay.active .mobile-nav-item:nth-child(1) { transition-delay: 0.1s; }
    .mobile-nav-overlay.active .mobile-nav-item:nth-child(2) { transition-delay: 0.15s; }
    .mobile-nav-overlay.active .mobile-nav-item:nth-child(3) { transition-delay: 0.2s; }
    .mobile-nav-overlay.active .mobile-nav-item:nth-child(4) { transition-delay: 0.25s; }
    .mobile-nav-overlay.active .mobile-nav-item:nth-child(5) { transition-delay: 0.3s; }
    .mobile-nav-overlay.active .mobile-nav-item:nth-child(6) { transition-delay: 0.35s; }
    .mobile-nav-overlay.active .mobile-nav-item:nth-child(7) { transition-delay: 0.4s; }
    .mobile-nav-overlay.active .mobile-nav-item:nth-child(8) { transition-delay: 0.45s; }
    .mobile-nav-overlay.active .mobile-nav-item:nth-child(9) { transition-delay: 0.5s; }
    .mobile-nav-overlay.active .mobile-nav-item:nth-child(10) { transition-delay: 0.55s; }

    .mobile-nav-accordion {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 0;
        background: transparent;
        border: none;
        font-size: 22px;
        font-weight: 500;
        color: #1d1d1f;
        text-align: left;
        cursor: pointer;
    }

    .mobile-nav-indicator {
        width: 12px;
        height: 12px;
        border-right: 2px solid #6e6e73;
        border-bottom: 2px solid #6e6e73;
        transform: rotate(-45deg);
        transition: transform 0.2s ease, border-color 0.2s ease;
    }

    .mobile-nav-item.is-open .mobile-nav-indicator {
        transform: rotate(45deg);
        border-color: #0a4c7a;
    }

    .mobile-nav-submenu {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.35s ease, opacity 0.35s ease;
        padding: 0 0 8px;
    }

    .mobile-nav-item.is-open .mobile-nav-submenu {
        opacity: 1;
    }

    .mobile-nav-sublink {
        display: block;
        padding: 10px 0 12px 16px;
        font-size: 18px;
        color: #2d2d2f;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .mobile-nav-sublink:hover {
        color: #0a4c7a;
    }

    .mobile-nav-link {
        display: block;
        padding: 15px 0;
        font-size: 22px;
        font-weight: 500;
        color: #1d1d1f;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .mobile-nav-link:hover {
        color: #0a4c7a;
    }

    .mobile-nav-auth {
        margin-top: 30px;
        padding: 0 32px 40px;
    }

    .mobile-auth-btn {
        display: block;
        width: 100%;
        padding: 12px 16px;
        text-align: center;
        border-radius: 999px;
        font-weight: 600;
        margin-bottom: 12px;
        text-decoration: none;
    }

    .mobile-auth-btn.btn-primary {
        background-color: #0a4c7a;
        border-color: #0a4c7a;
        box-shadow: 0 0.75rem 1.5rem rgba(10, 76, 122, 0.2);
    }

    .mobile-auth-btn.btn-outline-primary {
        border-color: #0a4c7a;
        color: #0a4c7a;
        background-color: #f3f8fc;
    }
}

/* --- Member board editor (Tiptap) --- */
.member-editor-modes .nav-link {
    cursor: pointer;
}

.member-editor {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background-color: #ffffff;
    padding: 0.75rem;
}

.member-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.member-editor-toolbar .btn.active {
    background-color: #0a4c7a;
    border-color: #0a4c7a;
    color: #ffffff;
}

.member-editor-shell {
    width: 100%;
    border: 1px solid #64748b;
    border-radius: 0.5rem;
    background-color: #ffffff;
    overflow-x: auto;
}

.member-editor-canvas {
    width: 100%;
    max-width: 100%;
    min-height: 560px;
    padding: 0.875rem;
    outline: none;
    line-height: 1.6;
    overflow-wrap: break-word;
}

.member-editor-canvas > *:first-child {
    margin-top: 0;
}

.member-editor-canvas img,
.member-editor-canvas .member-editor-image {
    display: block;
    max-inline-size: 100% !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    margin: 0.5rem 0;
}

.member-editor-source-wrap textarea,
textarea.member-editor-source {
    min-height: 560px;
    border: 1px solid #64748b;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.member-editor-source-wrap {
    margin-top: 0.5rem;
}

.member-editor-source-hidden {
    display: none !important;
}

/* --- Scoped Responsive Images for Notice/Content Body --- */
.content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

.content-body img.fullwidth {
    width: 100%;
    display: block;
    margin: 2rem 0;
}

.content-body img.left {
    float: left;
    margin: 0 1.5rem 1.5rem 0;
    max-width: 50%;
}

.content-body img.right {
    float: right;
    margin: 0 0 1.5rem 1.5rem;
    max-width: 50%;
}

/* Clearfix for floating images */
.content-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Responsive adjustments for mobile */
@media (max-width: 767.98px) {

    .content-body img.left,
    .content-body img.right {
        float: none;
        display: block;
        margin: 1.5rem auto;
        max-width: 100%;
    }

    /* Scoped padding adjustment specifically for the notice article */
    .content-body {
        overflow-wrap: break-word;
    }
}
