    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body { font-family: 'Inter', sans-serif; color: var(--text); min-height: 100vh; }

    /* TOP BAR */
    .topbar { background: var(--navy); color: #fff; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
    .topbar-left { flex: 1; min-width: 0; }
    .topbar h1 { font-family: 'Archivo', sans-serif; font-size: 15px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .topbar .meta { font-size: 11px; opacity: 0.65; margin-top: 2px; }
    .topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
    .auth-btn {
      background: rgba(255,255,255,0.12); color: #fff; border: none; border-radius: 99px;
      padding: 5px 12px; font-size: 11px; font-weight: 600; font-family: 'Inter', sans-serif;
      cursor: pointer; white-space: nowrap; transition: background 0.15s;
    }
    .auth-btn:hover { background: rgba(255,255,255,0.22); }
    .admin-pill {
      display: flex; align-items: center; gap: 5px; background: var(--gold); color: var(--navy);
      padding: 4px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; white-space: nowrap;
    }

    .vv-container { max-width: 1200px; margin: 0 auto; padding: 36px 24px 90px; }

    /* CONTROLS BAR */
    .controls {
      display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
      background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
      padding: 12px 14px; margin-bottom: 16px;
    }
    .control-group { display: flex; align-items: center; gap: 6px; }
    .control-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
    select, input[type="text"], input[type="date"], input[type="time"], input[type="url"] {
      font-family: 'Inter', sans-serif; font-size: 13px; padding: 6px 10px;
      border: 1px solid var(--border); border-radius: 7px; background: var(--white); color: var(--text);
    }
    .seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
    .seg button {
      border: none; background: var(--white); padding: 6px 12px; font-size: 12px; font-weight: 600;
      font-family: 'Inter', sans-serif; cursor: pointer; color: var(--text2);
    }
    .seg button.active { background: var(--navy); color: #fff; }

    /* DATE GROUP — each day is a clearly bounded block */
    .day-group { margin-bottom: 22px; }
    .day-header {
      display: flex; align-items: baseline; gap: 10px;
      background: var(--navy); color: #fff;
      padding: 9px 14px; border-radius: 10px 10px 0 0;
      position: sticky; top: 0; z-index: 5;
    }
    .day-header .daynum {
      font-size: 18px; font-weight: 700; line-height: 1;
    }
    .day-header .dow {
      font-size: 12px; font-weight: 600; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.05em;
    }
    .day-header .monthyear {
      font-size: 12px; font-weight: 500; opacity: 0.7; margin-left: auto;
    }
    .day-header .count {
      font-size: 11px; font-weight: 600; opacity: 0.85;
      background: rgba(255,255,255,0.15); padding: 2px 8px; border-radius: 99px;
    }
    .day-body {
      border: 1px solid var(--border); border-top: none;
      border-radius: 0 0 10px 10px; padding: 10px; background: #FBFCFE;
    }
    .day-body > *:last-child { margin-bottom: 0; }

    /* AVAILABILITY WINDOW CARD */
    .window-card {
      background: var(--white); border: 1px solid var(--border); border-radius: var(--radius);
      overflow: hidden; margin-bottom: 10px;
    }
    .window-head {
      display: flex; align-items: center; justify-content: space-between; gap: 8px;
      padding: 10px 14px; background: var(--blue-lt); border-bottom: 1px solid var(--border);
    }
    .window-loc { font-size: 13px; font-weight: 700; color: var(--navy); display: flex; align-items: center; gap: 7px; }
    .window-loc .label-chip {
      font-size: 10px; font-weight: 600; background: var(--white); color: var(--blue);
      padding: 1px 7px; border-radius: 99px; border: 1px solid #C7DBF5;
    }
    .window-time { font-size: 12px; font-weight: 600; color: var(--blue); }

    /* USAGE BAR */
    .usage-track {
      position: relative; height: 8px; background: #EEF2F7; border-radius: 99px; margin: 10px 14px 6px;
      overflow: hidden;
    }
    .usage-fill { position: absolute; top: 0; height: 100%; background: var(--gold); opacity: 0.85; }
    .usage-legend { font-size: 10px; color: var(--muted); margin: 0 14px 10px; display: flex; gap: 12px; }
    .usage-legend .dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }

    /* ASSIGNMENT ROW */
    .assignment {
      display: flex; align-items: center; gap: 10px; padding: 8px 14px;
      border-top: 1px solid var(--border);
    }
    .assignment:first-of-type { border-top: none; }
    .a-time { font-size: 12px; font-weight: 600; color: var(--text2); min-width: 108px; }
    .a-type {
      font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
      padding: 2px 8px; border-radius: 99px; white-space: nowrap;
    }
    .type-practice { background: var(--blue-lt); color: var(--blue); }
    .type-party { background: var(--gold-lt); color: var(--gold); }
    .type-reserved { background: #F1F5F9; color: var(--muted); }
    .type-scrimmage { background: #F3E8FF; color: #7E22CE; }
    .type-tournament { background: var(--green-lt); color: var(--green); }
    .a-title { font-size: 13px; font-weight: 500; flex: 1; }
    .free-row {
      display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-top: 1px dashed var(--border);
      font-size: 12px; color: var(--muted); font-style: italic;
    }
    .oob-badge {
      display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 700;
      color: var(--red); background: var(--red-lt); border: 1px solid #F3C9C9;
      padding: 1px 7px; border-radius: 99px; white-space: nowrap;
    }

    /* EVENT CARD (standalone) */
    .event-card {
      display: flex; align-items: center; gap: 12px; background: var(--white);
      border: 1px solid var(--border); border-left: 3px solid var(--green); border-radius: var(--radius);
      padding: 10px 14px; margin-bottom: 8px;
    }
    .event-card.scrimmage { border-left-color: #7E22CE; }
    .event-time { font-size: 12px; font-weight: 600; color: var(--text2); min-width: 108px; }
    .event-body { flex: 1; min-width: 0; }
    .event-title { font-size: 13px; font-weight: 600; }
    .event-loc { font-size: 11px; color: var(--muted); margin-top: 2px; }
    .event-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
    .event-links a {
      font-size: 10px; font-weight: 600; text-decoration: none; padding: 2px 8px; border-radius: 99px;
      background: var(--blue-lt); color: var(--blue);
    }
    .rank-chip {
      font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
      background: var(--gold-lt); color: var(--gold);
    }

    .section-label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin: 22px 0 10px; display: flex; align-items: center; gap: 8px; }
    .section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

    .state-msg { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 14px; }

    /* VIEW NAV (prev / title / next) */
    .view-nav {
      display: flex; align-items: center; justify-content: space-between; gap: 10px;
      margin-bottom: 14px;
    }
    .view-nav .nav-title { font-size: 16px; font-weight: 700; color: var(--navy); }
    .nav-btn {
      background: var(--white); border: 1px solid var(--border); border-radius: 8px;
      width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
      cursor: pointer; color: var(--text2); font-size: 18px;
    }
    .nav-btn:hover { background: var(--bg); }
    .today-btn {
      background: var(--white); border: 1px solid var(--border); border-radius: 8px;
      padding: 7px 12px; font-size: 12px; font-weight: 600; font-family: 'Inter', sans-serif;
      cursor: pointer; color: var(--text2);
    }
    .today-btn:hover { background: var(--bg); }

    /* MONTH GRID */
    .month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
    .month-dow {
      text-align: center; font-size: 10px; font-weight: 700; color: var(--muted);
      text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 0;
    }
    .month-cell {
      min-height: 78px; background: var(--white); border: 1px solid var(--border); border-radius: 8px;
      padding: 4px 5px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; overflow: hidden;
      transition: border-color 0.12s, box-shadow 0.12s;
    }
    .month-cell:hover { border-color: var(--blue); box-shadow: 0 1px 4px rgba(46,95,163,0.12); }
    .month-cell.other-month { background: #FAFBFD; opacity: 0.55; }
    .month-cell.today { border-color: var(--gold); border-width: 2px; }
    .mc-daynum { font-size: 12px; font-weight: 700; color: var(--text2); align-self: flex-start; }
    .month-cell.today .mc-daynum { color: var(--gold); }
    .mc-chip {
      font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 4px; line-height: 1.4;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .mc-more { font-size: 9px; color: var(--muted); font-weight: 600; padding-left: 2px; }

    /* WEEK VIEW — stacked full-width day sections */
    .wk-day { margin-bottom: 14px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
    .wk-day-head {
      display: flex; align-items: center; gap: 8px; padding: 10px 14px;
      background: var(--blue-lt); color: var(--navy); cursor: pointer;
      border-bottom: 1px solid var(--border);
    }
    .wk-day-head:hover { background: #DEE9F9; }
    .wk-day-head.today { background: var(--gold-lt); border-bottom-color: var(--gold); }
    .wk-day-head .wk-dnum { font-size: 17px; font-weight: 700; }
    .wk-day-head .wk-dow { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--blue); }
    .wk-day-head.today .wk-dow { color: #92600A; }
    .wk-day-head .wk-cnt {
      margin-left: auto; font-size: 11px; font-weight: 600; color: var(--blue);
      background: var(--white); border: 1px solid #C7DBF5; padding: 2px 8px; border-radius: 99px;
    }
    .wk-day-head.today .wk-cnt { color: #92600A; border-color: var(--gold); }
    .wk-day-body { padding: 8px; background: var(--white); display: flex; flex-direction: column; gap: 6px; }
    .wk-item {
      display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px;
      background: var(--white); border: 1px solid var(--border); border-left: 3px solid var(--border);
      border-radius: 8px;
    }
    .wk-item.t-practice { border-left-color: var(--blue); }
    .wk-item.t-party { border-left-color: var(--gold); }
    .wk-item.t-scrimmage { border-left-color: #7E22CE; }
    .wk-item.t-tournament { border-left-color: var(--green); }
    .wk-item.t-reserved { border-left-color: var(--muted); }
    .wk-item-time { font-size: 11px; font-weight: 700; color: var(--text2); min-width: 76px; line-height: 1.5; }
    .wk-item-main { flex: 1; min-width: 0; }
    .wk-item-title { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
    .wk-item-meta { font-size: 11px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
    .wk-item-meta .mi { display: inline-flex; align-items: center; gap: 3px; }
    .teams-badge { font-size: 10px; font-weight: 700; background: var(--blue-lt); color: var(--blue); padding: 1px 7px; border-radius: 99px; }
    .wk-empty { font-size: 11px; color: var(--muted); text-align: center; padding: 10px 0; font-style: italic; }
    .type-tag {
      font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
      padding: 1px 6px; border-radius: 99px;
    }

    /* DAY VIEW — Google-style time grid */
    .daygrid-wrap { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--white); }
    .daygrid-allday {
      display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 10px 8px 62px;
      border-bottom: 1px solid var(--border); background: var(--bg); min-height: 40px; align-items: center;
    }
    .daygrid-allday:empty { display: none; }
    .allday-chip {
      font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 6px;
      display: inline-flex; align-items: center; gap: 5px;
    }
    .daygrid-scroll { position: relative; overflow-y: auto; max-height: 68vh; }
    .daygrid { position: relative; }
    .dg-hour { display: flex; height: 48px; border-top: 1px solid var(--border); }
    .dg-hour:first-child { border-top: none; }
    .dg-hourlabel {
      width: 54px; flex-shrink: 0; font-size: 10px; color: var(--muted); font-weight: 600;
      text-align: right; padding: 2px 8px 0 0; box-sizing: border-box; border-right: 1px solid var(--border);
    }
    .dg-hourcell { flex: 1; position: relative; }
    .dg-layer { position: absolute; top: 0; left: 54px; right: 6px; bottom: 0; pointer-events: none; }
    .dg-window {
      position: absolute; background: rgba(201,153,42,0.10); border: 1px dashed rgba(201,153,42,0.5);
      border-radius: 6px; left: 0; right: 0; pointer-events: none;
    }
    .dg-window-label { font-size: 9px; color: var(--gold); font-weight: 700; padding: 2px 5px; }
    .dg-event {
      position: absolute; border-radius: 6px; padding: 3px 7px; overflow: hidden;
      font-size: 11px; box-sizing: border-box; pointer-events: auto; cursor: default;
      border-left: 3px solid; box-shadow: 0 1px 2px rgba(27,42,74,0.08);
    }
    .dg-event .dg-ev-title { font-weight: 700; line-height: 1.25; }
    .dg-event .dg-ev-sub { font-size: 10px; opacity: 0.85; line-height: 1.3; }
    .dg-ev-practice { background: var(--blue-lt); border-left-color: var(--blue); color: var(--blue); }
    .dg-ev-party { background: var(--gold-lt); border-left-color: var(--gold); color: #8a6a1c; }
    .dg-ev-scrimmage { background: #F3E8FF; border-left-color: #7E22CE; color: #6b21a8; }
    .dg-ev-tournament { background: var(--green-lt); border-left-color: var(--green); color: #14663c; }
    .dg-ev-reserved { background: #F1F5F9; border-left-color: var(--muted); color: var(--text2); }
    .dg-now { position: absolute; left: 54px; right: 0; height: 2px; background: var(--red); z-index: 6; pointer-events: none; }
    .dg-now::before { content:''; position:absolute; left:-4px; top:-3px; width:8px; height:8px; border-radius:50%; background:var(--red); }

    @media (max-width: 640px) {
      .wk-item-time { min-width: 64px; font-size: 10px; }
      .dg-hourlabel { width: 44px; font-size: 9px; }
      .dg-layer { left: 44px; }
      .daygrid-allday { padding-left: 50px; }
      .vv-container { padding: 24px 14px 60px; }
    }

    /* chip colors shared by month + week */
    .chip-practice { background: var(--blue-lt); color: var(--blue); }
    .chip-party { background: var(--gold-lt); color: var(--gold); }
    .chip-reserved { background: #F1F5F9; color: var(--muted); }
    .chip-scrimmage { background: #F3E8FF; color: #7E22CE; }
    .chip-tournament { background: var(--green-lt); color: var(--green); }

    @media (max-width: 640px) {
      .month-cell { min-height: 52px; }
      .mc-chip { font-size: 8px; }
      .week-grid { grid-template-columns: repeat(7, 1fr); gap: 3px; }
      .week-col { min-height: 80px; }
      .vv-container { padding: 24px 14px 60px; }
    }
    .admin-banner {
      background: var(--gold-lt); border: 1px solid #E8CC8A; border-radius: 10px; padding: 10px 14px;
      margin-bottom: 16px; font-size: 13px; color: var(--gold); display: flex; align-items: center; gap: 8px;
    }
    .footer { text-align: center; font-size: 11px; color: var(--muted); padding: 16px; border-top: 1px solid var(--border); margin-top: 8px; }

    /* EDIT CONTROLS */
    .add-btn {
      background: var(--navy); color: #fff; border: none; border-radius: 8px;
      padding: 7px 14px; font-size: 12px; font-weight: 600; font-family: 'Inter', sans-serif;
      cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    }
    .add-btn:hover { background: var(--blue); }
    .icon-btn {
      background: transparent; border: 1px solid var(--border); border-radius: 6px;
      width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
      cursor: pointer; color: var(--text2); font-size: 14px; flex-shrink: 0;
    }
    .icon-btn:hover { background: var(--bg); color: var(--navy); }
    .icon-btn.danger:hover { background: var(--red-lt); color: var(--red); border-color: #F3C9C9; }
    .row-actions { display: inline-flex; gap: 4px; margin-left: auto; }

    .day-add-bar { display: flex; justify-content: flex-end; gap: 6px; margin-bottom: 10px; }

    /* MODAL */
    .vv-modal-overlay {
      position: fixed; inset: 0; background: rgba(27,42,74,0.45); z-index: 100;
      display: flex; align-items: flex-start; justify-content: center; padding: 24px 14px; overflow-y: auto;
    }
    .vv-modal {
      background: #fff; border-radius: 14px; width: 100%; max-width: 460px;
      box-shadow: 0 12px 40px rgba(27,42,74,0.25); overflow: hidden; margin: 0 auto auto;
      flex: 0 0 auto; align-self: flex-start;
    }
    .vv-modal-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--navy); color: #fff;
    }
    .vv-modal-head h3 { font-size: 15px; font-weight: 600; }
    .vv-modal-close { background: transparent; border: none; color: #fff; font-size: 20px; cursor: pointer; opacity: 0.8; line-height: 1; }
    .vv-modal-close:hover { opacity: 1; }
    .vv-modal-body { padding: 18px; max-height: 70vh; overflow-y: auto; }
    .vv-modal-foot {
      display: flex; gap: 8px; justify-content: flex-end; padding: 14px 18px; border-top: 1px solid var(--border);
    }
    .field { margin-bottom: 14px; }
    .field label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 5px; }
    .field label .req { color: var(--red); }
    .field input, .field select, .field textarea {
      width: 100%; box-sizing: border-box; font-family: 'Inter', sans-serif; font-size: 13px;
      padding: 8px 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--white);
    }
    .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
    .team-checks { display: flex; flex-wrap: wrap; gap: 6px; }
    .team-check {
      display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 99px;
      border: 1px solid var(--border); font-size: 12px; font-weight: 600; cursor: pointer; color: var(--text2);
      user-select: none;
    }
    .team-check input { width: auto; margin: 0; }
    .team-check.checked { background: var(--blue-lt); border-color: var(--blue); color: var(--blue); }
    .team-check-divider {
      flex-basis: 100%; font-size: 10.5px; font-weight: 700; text-transform: uppercase;
      letter-spacing: .05em; color: var(--text2); margin: 4px 0 -2px;
    }
    .vv-btn-primary {
      background: var(--navy); color: #fff; border: none; border-radius: 8px; padding: 9px 18px;
      font-size: 13px; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer;
    }
    .vv-btn-primary:hover { background: var(--blue); }
    .vv-btn-secondary {
      background: var(--white); color: var(--text2); border: 1px solid var(--border); border-radius: 8px;
      padding: 9px 18px; font-size: 13px; font-weight: 600; font-family: 'Inter', sans-serif; cursor: pointer;
    }
    .vv-btn-secondary:hover { background: var(--bg); }
    .form-error { color: var(--red); font-size: 12px; margin-top: 8px; min-height: 16px; }
    .form-warn { color: var(--gold); font-size: 12px; margin-top: 6px; }
    .conditional { display: none; }
    .conditional.show { display: block; }

/* Scheduler meta line (under the shared nav) */
/* Auth area sits inside the shared nav */
#auth-area { display: inline-flex; align-items: center; gap: 8px; }
#auth-area .auth-btn {
  background: var(--black); color: #fff; border: none; border-radius: 8px;
  padding: 9px 16px; font-size: 13px; font-weight: 700; font-family: 'Inter', sans-serif;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
}
#auth-area .auth-btn:hover { background: var(--gold); color: var(--black); }
#auth-area .admin-pill {
  display: inline-flex; align-items: center; gap: 5px; background: var(--gold-lt); color: var(--black);
  padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap;
  border: 1px solid var(--gold);
}

/* Archive season modal */
.arch-preview:empty { display: none; }
.arch-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 12px; }
.arch-stat { background: var(--cream); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.arch-stat b { font-family: 'Archivo'; font-size: 24px; font-weight: 800; display: block; line-height: 1; }
.arch-stat span { font-size: 11px; color: var(--muted); font-weight: 600; }
.arch-warn { font-size: 12.5px; color: #b45309; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 10px 12px; line-height: 1.5; }
.field-note { font-size: 11px; color: var(--muted); margin-top: 5px; }
.loc-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.loc-row:last-child { border-bottom: none; }
.loc-row.editing { background: var(--gold-lt); }
.loc-row-main { min-width: 0; }
.loc-row-name { font-size: 13px; font-weight: 700; color: var(--navy); }
.loc-row-addr { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.loc-row-note { font-size: 11.5px; font-style: italic; color: var(--muted); margin-top: 4px; white-space: pre-wrap; }
.loc-door { font-size: 10.5px; font-weight: 700; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 99px; padding: 1px 7px; margin-left: 4px; }
.loc-row-actions { display: flex; gap: 4px; flex-shrink: 0; }
.loc-icon-btn { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 1px solid var(--border); background: var(--white); border-radius: 6px; cursor: pointer; color: var(--muted); font-size: 13px; transition: all .12s; }
.loc-icon-btn:hover { border-color: var(--navy); color: var(--navy); background: var(--bg); }
