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

        html {
            scroll-behavior: smooth;
            scroll-snap-type: y mandatory;
            scroll-padding-top: 0;
        }

        body {
            font-family: Arial, sans-serif;
            background: #002C58;
        }

        .deck {
            width: 100%;
            position: relative;
        }

        /* Sticky top bar */
        .top-bar {
            width: 100%;
            height: 34px;
            background: #002C58;
            display: flex;
            align-items: center;
            padding: 0 12px;
            position: sticky;
            top: 0;
            z-index: 100;
            border-radius: 0 0 16px 16px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
        }

        .top-bar .home-icon-wrapper {
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            cursor: pointer;
        }

        .top-bar .home-icon {
            width: 22px;
            height: 22px;
            flex-shrink: 0;
        }

        .top-bar .sections {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-left: 12px;
            height: 100%;
        }

        .top-bar .section-link {
            font-size: clamp(7px, 0.89vw, 16px);
            color: #ffffff;
            white-space: nowrap;
            cursor: pointer;
            text-decoration: none;
            display: flex;
            align-items: center;
            height: 100%;
            border-bottom: 2px solid transparent;
        }

        .top-bar .section-link:hover {
            opacity: 0.8;
        }

        .top-bar .section-link.active {
            border-bottom-color: #7B75FF;
        }

        .top-bar .right-area {
            position: absolute;
            right: 12px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .top-bar .mode-label {
            font-size: clamp(7px, 0.89vw, 16px);
            color: #ffffff;
            text-align: right;
        }

        .top-bar .toggle-btn {
            width: 40px;
            height: 16px;
            cursor: pointer;
            position: relative;
            flex-shrink: 0;
            border-radius: 8px;
            border: 1px solid rgba(255, 255, 255, 0.5);
            background: rgba(255, 255, 255, 0.12);
        }

        .top-bar .toggle-btn .knob {
            position: absolute;
            top: 1px;
            left: 1px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.95);
            transition: transform 0.22s ease;
        }

        .deck.reading-mode .top-bar .toggle-btn .knob {
            transform: translateX(24px);
        }

        .page-badge {
            background: #E8F0FA;
            border-radius: 10px;
            padding: 2px 10px;
            font-size: clamp(6px, 0.73vw, 13px);
            color: #333333;
            white-space: nowrap;
        }

        /* Page containers */
        .page {
            width: 100%;
            height: 100vh;
            background: #002C58;
            position: relative;
            overflow: hidden;
            padding-top: 34px;
            padding-bottom: 40px;
            scroll-snap-align: start;
            scroll-snap-stop: always;
        }

        /* Title */
        .title {
            padding: 12px 30px;
            font-size: clamp(18px, 2.29vw, 42px);
            font-weight: bold;
            color: #ffffff;
            height: 72px;
            display: flex;
            align-items: center;
        }

        /* Dividers in the agenda card are invisible — they exist purely as
           spacing anchors. The .title + .divider rule below preserves the
           32px gap between the title and the columns/col-groups. */
        .divider {
            height: 0;
        }

        /* Gap between the title and the content grid (matches original) */
        .title + .divider {
            margin-top: 32px;
        }

        /* ===== Present view (card 1) ===== */
        .view-presentation .content-area {
            display: flex;
            width: calc(100% - 70px);
            margin: 0 auto;
            flex: 1;
            gap: 10px;
        }

        .view-presentation .column {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            cursor: pointer;
            border-radius: 18px;
            border: 1px solid rgba(255, 255, 255, 0.18);
            overflow: hidden;
        }

        .view-presentation .column .bg {
            position: absolute;
            inset: 0;
            background: rgba(255, 255, 255, 0.06);
        }

        .view-presentation .column:hover .bg {
            background: #E6E6ED;
        }

        .view-presentation .column .label {
            position: relative;
            z-index: 1;
            font-size: clamp(10px, 1.30vw, 24px);
            font-weight: bold;
            text-align: center;
            padding: 0 10px;
            color: #ffffff;
        }

        .view-presentation .column:hover .label {
            color: #333333;
        }

        /* ===== Read view (card 2) ===== */
        .view-reading .content-grid {
            width: calc(100% - 70px);
            margin: 0 auto;
            display: flex;
            flex: 1;
            gap: 10px;
        }

        .view-reading .col-group {
            flex: 1;
            display: flex;
            flex-direction: column;
            cursor: pointer;
            border-radius: 18px;
            border: 1px solid rgba(255, 255, 255, 0.18);
            overflow: hidden;
        }

        .view-reading .header-cell {
            background: #002C58;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 6px;
            height: 117px;
        }

        .view-reading .header-cell .cell-icon {
            width: 28px;
            height: 28px;
            color: #ffffff;
        }

        .view-reading .header-cell .cell-label {
            font-size: clamp(10px, 1.30vw, 24px);
            font-weight: bold;
            color: #ffffff;
            text-align: center;
        }

        .view-reading .summary-cell {
            background: #E8F0FA;
            padding: 10px 12px;
            flex: 1;
        }

        .view-reading .summary-cell ul {
            list-style: disc;
            padding-left: 14px;
            margin: 0;
        }

        .view-reading .summary-cell li {
            font-size: clamp(8px, 0.99vw, 18px);
            color: #333333;
            line-height: 1.5;
        }

        .view-reading .col-group:hover .header-cell {
            background: #E6E6ED;
        }

        .view-reading .col-group:hover .header-cell .cell-icon {
            color: #333333;
        }

        .view-reading .col-group:hover .header-cell .cell-label {
            color: #333333;
        }

        .view-reading .col-group:hover .summary-cell {
            background: #E6E6ED;
        }

        /* View toggling */
        /* Any .page can host two versions: add `dual` to the .page and give it
           a .view-presentation + a .view-reading child. The global toggle
           switches every dual card deck-wide in sync. #agenda is the built-in
           dual card; `.page.dual` makes the same mechanism reusable on any
           card type (it just establishes the flex-column context the views
           need to fill the card). Single-view cards (no .view-*) are
           unaffected. */
        #agenda,
        .page.dual { display: flex; flex-direction: column; }
        .view-presentation { display: flex; flex-direction: column; flex: 1; }
        .view-reading { display: none; flex-direction: column; flex: 1; }

        .deck.reading-mode .view-presentation { display: none; }
        .deck.reading-mode .view-reading { display: flex; }

        /* ===== Section page (card 3) ===== */
        .page.section-bg {
            background: #002C58;
        }

        .section-page {
            display: flex;
            padding: 60px 35px 28px;
            gap: 20px;
            height: 100%;
        }

        .section-page .section-title-area {
            width: 280px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
        }

        .section-page .section-title-text {
            font-size: clamp(18px, 2.29vw, 42px);
            font-weight: bold;
            color: #ffffff;
        }

        .section-page .takeaways {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .section-page .takeaway-row {
            flex: 1;
            display: flex;
            align-items: center;
            padding: 0 20px;
            font-size: clamp(10px, 1.35vw, 25px);
            font-weight: bold;
            cursor: default;
            min-height: 70px;
        }

        .section-page .takeaway-row {
            background: #334F6D;
            color: #ffffff;
            cursor: pointer;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.10);
        }

        .section-page .takeaway-row:hover {
            background: #ffffff;
            color: #333333;
        }

        /* ===== Subsection page (card 4) ===== */
        .page.subsection-bg {
            background: #334E6D;
        }

        .subsection-page {
            display: flex;
            padding: 60px 35px 28px;
            gap: 20px;
            height: 100%;
        }

        .subsection-page .subsection-title-area {
            width: 280px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
        }

        .subsection-page .subsection-title-text {
            font-size: clamp(18px, 2.29vw, 42px);
            font-weight: bold;
            color: #ffffff;
        }

        .subsection-page .takeaways {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .subsection-page .takeaway-row {
            flex: 1;
            display: flex;
            align-items: center;
            padding: 0 20px;
            font-size: clamp(10px, 1.35vw, 25px);
            font-weight: bold;
            min-height: 70px;
            background: #667585;
            color: #ffffff;
            cursor: default;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.10);
        }

        .subsection-page .takeaway-row:hover {
            background: #ffffff;
            color: #333333;
        }

        /* ===== Content page (card 5) ===== */
        .page.content-bg {
            background: #ffffff;
        }

        .content-page {
            padding: 20px 35px;
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .content-page .content-title {
            font-size: clamp(18px, 2.29vw, 42px);
            font-weight: bold;
            color: #333333;
        }

        .content-page .subtitle-row {
            display: flex;
            gap: 8px;
            margin-top: 6px;
        }

        .content-page .subtitle-placeholder {
            flex: 1;
            padding: 8px 12px;
            border: 1.5px dashed #C0C0C0;
            font-size: clamp(10px, 1.35vw, 25px);
            color: #333333;
        }

        .content-page .sticker-placeholder {
            width: 100px;
            padding: 8px 12px;
            border: 1.5px dashed #C0C0C0;
            font-size: clamp(10px, 1.35vw, 25px);
            font-weight: bold;
            color: #333333;
            text-decoration: underline;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .content-page .content-body {
            font-size: clamp(11px, 1.46vw, 27px);
            color: #333333;
            margin-top: 8px;
        }

        .content-page .content-area {
            flex: 1;
        }

        .content-page .source-placeholder {
            padding: 8px 12px;
            border: 1.5px dashed #C0C0C0;
            font-size: clamp(9px, 1.15vw, 21px);
            color: #333333;
            margin-top: auto;
        }

        /* Top bar changes on section pages */
        .deck:not(.on-backup) .top-bar {
            background: #E6E6ED;
        }

        .deck:not(.on-backup) .top-bar .section-link {
            color: #333333;
        }

        .deck:not(.on-backup) .top-bar .section-link.active {
            border-bottom-color: #362FEC;
        }

        .deck:not(.on-backup) .top-bar .mode-label {
            color: #333333;
        }

        .deck:not(.on-backup) .top-bar .toggle-btn {
            border-color: #999;
            background: rgba(153, 153, 153, 0.2);
        }

        .deck:not(.on-backup) .top-bar .toggle-btn .knob {
            background: #666;
        }

        .deck:not(.on-backup) .page-badge {
            background: #D0D0DD;
        }

        .deck.on-section .top-bar .home-icon path {
            stroke: #000000;
            fill: #000000;
        }


        [contenteditable] {
            outline: none;
        }

        [contenteditable]:focus {
            box-shadow: inset 0 0 0 1.5px rgba(54, 47, 236, 0.4);
        }

        /* ===== Info card popup (reusable) ===== */
        .info-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 200;
            justify-content: center;
            align-items: center;
        }

        .info-overlay.open {
            display: flex;
        }

        .info-overlay .overlay-bg {
            position: absolute;
            inset: 0;
            background: rgba(0, 0, 0, 0.2);
        }

        .info-overlay .info-card {
            position: relative;
            width: 90%;
            max-width: 860px;
            min-height: 380px;
            background: #002C58;
            border: 1px solid #7B75FF;
            border-radius: 2px;
            box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
            padding: 32px 40px;
            display: flex;
            flex-direction: column;
        }

        .info-overlay .info-close {
            position: absolute;
            top: 16px;
            right: 16px;
            width: 28px;
            height: 28px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            transition: background 0.15s;
        }

        .info-overlay .info-close:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .info-overlay .info-close svg {
            width: 18px;
            height: 18px;
        }

        .info-overlay .info-title {
            font-size: clamp(16px, 2.08vw, 38px);
            font-weight: bold;
            color: #ffffff;
            margin-bottom: 8px;
        }

        .info-overlay .info-description {
            font-size: clamp(11px, 1.46vw, 27px);
            color: rgba(255, 255, 255, 0.85);
            line-height: 1.6;
        }

        .info-overlay .info-body {
            flex: 1;
            margin-top: 20px;
        }

        /* Info trigger button (magnifying glass) */
        .info-trigger {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: #002C58;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
            transition: background 0.15s;
        }

        .info-trigger:hover {
            background: #1a4a7a;
        }

        .info-trigger svg {
            width: 16px;
            height: 16px;
        }

        /* ===== Backup page ===== */
        .page.backup-bg {
            background: #E6E6ED;
        }

        /* Backup trigger button (bottom-right circle on content pages) */
        .backup-trigger {
            position: absolute;
            bottom: 16px;
            right: 16px;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: #362FEC;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
            transition: background 0.15s, transform 0.15s;
        }

        .backup-trigger:hover {
            background: #2a24c9;
            transform: scale(1.05);
        }

        .backup-trigger svg {
            width: 20px;
            height: 20px;
        }

        /* Backup nav elements in top bar (hidden by default) */
        .top-bar .backup-nav {
            display: none;
            align-items: center;
            gap: 10px;
            margin-left: 4px;
        }

        .top-bar .backup-back {
            width: 20px;
            height: 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0.9;
            transition: opacity 0.15s;
        }

        .top-bar .backup-back:hover {
            opacity: 1;
        }

        .top-bar .backup-label {
            font-size: clamp(7px, 0.89vw, 16px);
            color: #ffffff;
            white-space: nowrap;
        }

        .top-bar .backup-badge {
            background: rgba(255, 255, 255, 0.15);
            border-radius: 10px;
            padding: 2px 10px;
            font-size: clamp(6px, 0.73vw, 13px);
            color: #ffffff;
            white-space: nowrap;
        }

        /* Top bar in backup mode */
        .deck.on-backup .top-bar {
            background: #002C58;
        }

        .deck.on-backup .top-bar .sections {
            display: none;
        }

        .deck.on-backup .top-bar .home-icon-wrapper {
            display: none;
        }

        .deck.on-backup .top-bar .backup-nav {
            display: flex;
        }

        .deck.on-backup .top-bar .mode-label {
            color: #ffffff;
        }

        .deck.on-backup .top-bar .toggle-btn {
            border-color: rgba(255, 255, 255, 0.5);
            background: rgba(255, 255, 255, 0.12);
        }

        .deck.on-backup .top-bar .toggle-btn .knob {
            background: rgba(255, 255, 255, 0.95);
        }

        .deck.on-backup .page-badge {
            display: none;
        }

        .deck.on-backup .top-bar .home-icon path {
            stroke: #ffffff;
            fill: #ffffff;
        }

        /* Backup page layout */
        .backup-page {
            padding: 20px 35px;
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .backup-page .backup-title {
            font-size: clamp(18px, 2.29vw, 42px);
            font-weight: bold;
            color: #333333;
        }

        .backup-page .backup-content {
            flex: 1;
            margin-top: 12px;
            border: 1.5px dashed #C0C0C0;
            border-radius: 2px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #999;
            font-size: clamp(11px, 1.46vw, 27px);
        }
