#bhsBriefingModal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.45);
    padding: 16px;
}
.bhs-bf-inner {
    background: #fff;
    border-radius: 12px;
    max-width: 720px;
    width: 100%;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    overflow: hidden;
    animation: bhs-bf-in .2s ease;
}
@keyframes bhs-bf-in {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: scale(1); }
}
.bhs-bf-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 14px;
    border-bottom: 1px solid #e5e7eb;
    background: #1e3a5f;
    border-radius: 12px 12px 0 0;
}
.bhs-bf-title { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 2px; }
.bhs-bf-date  { font-size: 12px; color: rgba(255,255,255,.7); margin: 0; }
.bhs-bf-close {
    background: rgba(255,255,255,.15);
    border: none;
    border-radius: 6px;
    color: rgba(255,255,255,.8);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 4px 8px;
    flex-shrink: 0;
    margin-top: -2px;
}
.bhs-bf-close:hover { background: rgba(255,255,255,.28); color: #fff; }
.bhs-bf-body { padding: 16px 20px 4px; overflow-y: auto; max-height: 55vh; }
.bhs-bf-section { margin-bottom: 16px; }
.bhs-bf-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    margin: 0 0 8px;
}
.bhs-bf-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

/* ── Class rows ─────────────────────────────────────────────────── */
.bhs-bf-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    padding: 8px 12px;
    flex-wrap: wrap;
}
.bhs-bf-period { font-size: 11px; font-weight: 700; color: #6b7280; white-space: nowrap; min-width: 52px; }
.bhs-bf-class  { font-size: 13px; font-weight: 600; color: #1e3a5f; flex: 1; }
.bhs-bf-topic  { font-size: 12px; color: #374151; flex-basis: 100%; padding-left: 60px; margin-top: 2px; }
.bhs-bf-notes  { font-size: 12px; color: #6b7280; flex-basis: 100%; padding-left: 60px; margin-top: 3px; font-style: italic; white-space: pre-wrap; }
.bhs-bf-room   { font-size: 12px; color: #9ca3af; white-space: nowrap; }
.bhs-bf-hw-badge {
    font-size: 11px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}
.bhs-bf-cover-badge {
    font-size: 11px;
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #86efac;
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Event rows ─────────────────────────────────────────────────── */
.bhs-bf-event {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    padding: 8px 12px;
    flex-wrap: nowrap;
}
.bhs-bf-event-dot   { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.bhs-bf-event-time  {
    font-size: 11px;
    font-weight: 700;
    color: #1e3a5f;
    background: #e0e7ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
    flex-shrink: 0;
}
.bhs-bf-event-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e3a5f;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Footer ─────────────────────────────────────────────────────── */
.bhs-bf-footer {
    border-top: 1px solid #e5e7eb;
    padding: 12px 20px;
    display: flex;
    justify-content: flex-end;
}
.bhs-bf-btn {
    background: #1e3a5f;
    color: #fff;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    padding: 8px 20px;
}
.bhs-bf-btn:hover { background: #1e40af; }

/* ── Dark mode ──────────────────────────────────────────────────── */
html.dark .bhs-bf-inner         { background: #1e293b; }
html.dark .bhs-bf-header        { background: #0f2748; border-color: #1e3a5f; }
html.dark .bhs-bf-section-title { color: #9ca3af; }
html.dark .bhs-bf-item          { background: #1e293b; border-color: #334155; }
html.dark .bhs-bf-period        { color: #94a3b8; }
html.dark .bhs-bf-class         { color: #93c5fd; }
html.dark .bhs-bf-topic         { color: #cbd5e1; }
html.dark .bhs-bf-notes         { color: #94a3b8; }
html.dark .bhs-bf-footer        { border-color: #334155; background: #1e293b; }
html.dark .bhs-bf-event         { background: #1e293b; border-color: #334155; }
html.dark .bhs-bf-event-title   { color: #93c5fd; }
html.dark .bhs-bf-event-time    { background: #1e3a5f; border-color: #3b82f6; color: #bfdbfe; }
html.dark .bhs-bf-hw-badge      { background: #241a00; border-color: #78450c; color: #fbbf24; }
html.dark .bhs-bf-cover-badge   { background: #0d2b1e; border-color: #166534; color: #6ee7b7; }
html.dark .bhs-bf-room          { color: #64748b; }
html.dark .bhs-bf-btn           { background: #1e40af; }
