
/* =========================================
   BASE RESET
========================================= */

:root {
    --ink: #000000;
    --bg-color: #f4f4f5;
    --paper: #ffffff;
    --navy-border: #031333;
    --label-width: 115px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    font-family: "Times New Roman", Times, serif;
    color: var(--ink);
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
}


/* =========================================
   NAVIGATION
========================================= */

.nav-bar {
    background: var(--navy-border);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 50;
    text-align: center;
}

.back-link {
    color: #ffffff;
    text-decoration: none;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-link:hover {
    text-decoration: underline;
}


/* =========================================
   PAGE CONTAINER
========================================= */

.page-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 15px;
    gap: 40px;
}

.program-page {
    background-color: var(--paper);
    width: 100%;
    max-width: 794px;
    min-height: 1123px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}


/* =========================================
   COVER PAGE
========================================= */

.cover-page {
    padding: 35px;
}

.border-layer {
    width: 100%;
    min-height: 1043px;
    border: 4px solid var(--navy-border);
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding-top: 65px;
    padding-bottom: 45px;
}


/* =========================================
   ORIGINAL GEOMETRIC CORNERS
========================================= */

.corner {
    position: absolute;
    width: 160px;
    height: 110px;

    z-index: 2;
    pointer-events: none;
}

.tl {
    top: -4px;
    left: -4px;
}

.tr {
    top: -4px;
    right: -4px;
    transform: scaleX(-1);
}

.bl {
    bottom: -4px;
    left: -4px;
    transform: scaleY(-1);
}

.br {
    bottom: -4px;
    right: -4px;
    transform: scale(-1, -1);
}


/* =========================================
   ORIGINAL FLOURISH DECORATION
========================================= */

.flourish {
    width: 92%;
    aspect-ratio: 1280 / 84;
    height: auto;
    flex-shrink: 0;
    margin: 15px 0;

    position: relative;
    z-index: 1;
}

.flourish-top {
    margin-top: 15px;
    margin-bottom: 15px;
}

.flourish-bottom {
    margin-top: 15px;
    margin-bottom: 20px;
}


/* =========================================
   PORTRAIT
========================================= */

.portrait-container {
    width: 480px;
    max-width: 90%;
    aspect-ratio: 12 / 13;
    margin: 10px 0;

    overflow: hidden;

    display: flex;
    justify-content: center;
    align-items: center;
}

.portrait-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}


/* =========================================
   COVER TYPOGRAPHY
========================================= */

.cover-text {
    text-align: center;
    margin-top: 5px;
    padding: 0 15px;
    width: 100%;
}

.cover-text h1 {
    font-size: 1.45rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.strong-line {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.with-line {
    font-size: 1.1rem;
    margin-top: 14px;
    margin-bottom: 8px;
}

.leader-line {
    font-size: 1.15rem;
    margin-top: 5px;
}


/* =========================================
   AGENDA PAGE
========================================= */

.agenda-page {
    padding: 80px 70px;
}

.agenda-content {
    width: 100%;
}

.agenda-header {
    text-align: center;
    margin-bottom: 40px;
}

.agenda-label {
    font-weight: 700;
    font-size: 1.1rem;
}

.agenda-header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 5px 0;
}

.agenda-header h3 {
    font-size: 1.1rem;
    font-weight: normal;
}


/* =========================================
   LEADERSHIP
========================================= */

.leadership-block {
    margin-bottom: 40px;
    font-size: 1.05rem;
    font-family: inherit;
}

.leadership-block p {
    display: grid;
    grid-template-columns: var(--label-width) minmax(0, 1fr);
    align-items: baseline;
    margin-bottom: 7px;
    line-height: 1.5;
}

.role {
    font-weight: 700;
    width: auto;
}

.music-block {
    margin-top: 15px;
    padding-left: 0;
}


/* =========================================
   AGENDA SCHEDULE
========================================= */

.agenda-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 50px;
}

.agenda-row {
    display: grid;
    grid-template-columns: var(--label-width) minmax(0, 1fr);
    align-items: start;
    font-size: 1.05rem;
    font-family: inherit;
    line-height: 1.5;
}

.time {
    width: auto;
    font-weight: 600;
    flex-shrink: 0;
}

.details {
    min-width: 0;
    overflow-wrap: break-word;
}

.topic {
    font-style: italic;
    display: block;
    margin-top: 2px;
    margin-left: 10px;
}


/* =========================================
   EQUIPMENT
========================================= */

.equipment {
    text-align: center;
    font-size: 1.05rem;
    margin-top: 40px;
}


/* =========================================
   MOBILE RESPONSIVENESS
========================================= */

/* =========================================
   MOBILE RESPONSIVENESS
========================================= */

@media (max-width: 768px) {

    :root {
        --label-width: 105px;
    }

    .page-container {
        padding: 15px 0;
        gap: 20px;
    }

    .program-page {
        border-radius: 0;
        min-height: auto;
    }

    /* cover page */

    .cover-page {
        padding: 15px;
    }

    .border-layer {
        min-height: 850px;
        padding-top: 55px;
        padding-bottom: 30px;
    }

    .corner {
        width: 100px;
        height: 69px;
    }

    .flourish {
        width: 88%;
        margin: 10px 0;
    }

    .flourish-top {
        margin-bottom: 18px;
    }

    .flourish-bottom {
        margin-top: 18px;
        margin-bottom: 20px;
    }

    .portrait-container {
        width: 100%;
        max-width: 340px;
        aspect-ratio: 4 / 5;
    }

    .cover-text {
        margin-top: 5px;
        padding: 0 8px;
    }

    .cover-text h1 {
        font-size: 1.2rem;
    }

    .strong-line,
    .leader-line {
        font-size: 1rem;
    }

    /* agenda page */

    .agenda-page {
        padding: 40px 20px;
        font-family: inherit;
    }

    .agenda-header {
        margin-bottom: 30px;
    }

    .agenda-header h2 {
        font-size: 1.15rem;
    }

    .agenda-header h3 {
        font-size: 1rem;
    }

    /* leadership */

    .leadership-block p {
        display: grid;
        grid-template-columns: var(--label-width) minmax(0, 1fr);
        align-items: baseline;
        font-size: 0.95rem;
        gap: 0;
    }

    .role {
        width: auto;
    }

    /* schedule: time and activity stay side by side */

    .agenda-list {
        gap: 14px;
    }

    .agenda-row {
        display: grid;
        grid-template-columns: var(--label-width) minmax(0, 1fr);
        align-items: start;
        gap: 0;
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0;
    }

    .time {
        width: auto;
        font-weight: 700;
    }

    .details {
        min-width: 0;
    }

    .topic {
        margin-left: 0;
    }

    .equipment {
        font-size: 0.95rem;
    }
}


/* =========================================
   PRINT STYLES
========================================= */

@media print {

    @page {
        size: A4;
        margin: 0;
    }

    body {
        background: white;
    }

    .nav-bar {
        display: none;
    }

    .page-container {
        padding: 0;
        gap: 0;
    }

    .program-page {
        width: 210mm;
        height: 297mm;
        min-height: 297mm;
        max-width: none;
        box-shadow: none;
        page-break-after: always;
        break-after: page;
    }

    .cover-page {
        padding: 10mm;
    }

    .border-layer {
        min-height: 100%;
    }

    .agenda-page {
        padding: 20mm;
    }

}


/* Full-screen blocking overlay */
/* =========================================
   COUNTDOWN OVERLAY SECRECY STYLES
========================================= */
#countdown-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #fbf8f1;
  z-index: 999999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

#countdown-overlay.locked-active {
  display: flex; /* Shown by JS */
}

body.locked-scroll {
  overflow: hidden; /* Stops scrolling */
}

.overlay-content {
  max-width: 500px;
  width: 100%;
  padding: 40px 30px;
  background: #ffffff;
  border: 1px solid #e6dcc8;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(12, 47, 79, 0.08);
}

.agenda-divider {
    border: none;
    border-top: 3px solid #000;
    margin: 12px 0;
}