  :root{
    --bg:#110f1a; --surface:#1c1828; --surface-2:#241f30; --border:#383049;
    --text:#f2eef9; --text-dim:#a89bc2;
    --accent:#d6478f; --accent-rgb:214,71,143; --accent-ink:#ffffff; --teal:#45c7be; --teal-rgb:69,199,190; --gold:#e3b34e;
    --success:#5cb87d; --success-rgb:92,184,125; --warning:#d99a3e; --danger:#e2596b; --danger-rgb:226,89,107;
    --shadow: 0 12px 32px -12px rgba(0,0,0,.55); --radius: 10px;
  }
  @media (prefers-color-scheme: light){
    :root:not([data-theme="light"]){
      --bg:#faf7f3; --surface:#ffffff; --surface-2:#f2ecf5; --border:#e2d9ea;
      --text:#221c2c; --text-dim:#6b5f7c;
      --accent:#b8236f; --accent-rgb:184,35,111; --accent-ink:#ffffff; --teal:#1f8a82; --teal-rgb:31,138,130; --gold:#a8781f;
      --success:#2f8a54; --success-rgb:47,138,84; --warning:#a8701f; --danger:#c23a4f; --danger-rgb:194,58,79;
      --shadow: 0 10px 28px -14px rgba(60,40,70,.25);
    }
  }
  :root[data-theme="light"]{
    --bg:#faf7f3; --surface:#ffffff; --surface-2:#f2ecf5; --border:#e2d9ea;
    --text:#221c2c; --text-dim:#6b5f7c;
    --accent:#b8236f; --accent-rgb:184,35,111; --accent-ink:#ffffff; --teal:#1f8a82; --teal-rgb:31,138,130; --gold:#a8781f;
    --success:#2f8a54; --success-rgb:47,138,84; --warning:#a8701f; --danger:#c23a4f; --danger-rgb:194,58,79;
    --shadow: 0 10px 28px -14px rgba(60,40,70,.25);
  }
  :root[data-theme="dark"]{
    --bg:#110f1a; --surface:#1c1828; --surface-2:#241f30; --border:#383049;
    --text:#f2eef9; --text-dim:#a89bc2;
    --accent:#d6478f; --accent-rgb:214,71,143; --teal:#45c7be; --teal-rgb:69,199,190; --gold:#e3b34e;
    --success:#5cb87d; --success-rgb:92,184,125; --warning:#d99a3e; --danger:#e2596b; --danger-rgb:226,89,107;
    --shadow: 0 12px 32px -12px rgba(0,0,0,.55);
  }

  *{box-sizing:border-box;}
  body{ margin:0; background:var(--bg); color:var(--text); font-family:"Work Sans", system-ui, sans-serif; font-size:14px; line-height:1.5; }
  h1,h2,h3,.display{ font-family:"Bricolage Grotesque","Work Sans",sans-serif; text-wrap:balance; }
  .mono{ font-family:"IBM Plex Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
  button, input, select, textarea{ font-family:inherit; font-size:inherit; color:inherit; }
  button{ cursor:pointer; }
  ::selection{ background:var(--accent); color:#fff; }

  .app{ max-width:1440px; margin:0 auto; padding:20px 20px 56px; }

  .topbar{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding-bottom:16px; margin-bottom:16px; border-bottom:1px solid var(--border); }
  .brand{ display:flex; align-items:center; gap:10px; margin-right:auto; }
  .brand-mark{ width:34px; height:34px; border-radius:9px; background:linear-gradient(140deg, var(--accent), var(--teal)); display:flex; align-items:center; justify-content:center; font-family:"Bricolage Grotesque"; font-weight:800; color:#fff; font-size:16px; box-shadow: var(--shadow); flex:none; }
  .brand-text h1{ font-size:19px; margin:0; font-weight:700; letter-spacing:-.01em; }
  .brand-text span{ font-size:11.5px; color:var(--text-dim); text-transform:uppercase; letter-spacing:.08em; }

  .week-nav{ display:flex; align-items:center; gap:10px; }
  .week-nav button{ width:32px; height:32px; border-radius:8px; border:1px solid var(--border); background:var(--surface); color:var(--text); font-size:15px; display:flex; align-items:center; justify-content:center; transition:border-color .15s, transform .1s; }
  .week-nav button:hover{ border-color:var(--accent); }
  .week-nav button:active{ transform:scale(.94); }
  .week-label{ font-family:"Bricolage Grotesque"; font-weight:600; font-size:14.5px; min-width:150px; text-align:center; }
  .week-label small{ display:block; font-family:"Work Sans"; font-weight:500; color:var(--text-dim); font-size:11px; text-transform:uppercase; letter-spacing:.06em; margin-top:1px;}
  .btn-today, .btn-export{ border:1px solid var(--border); background:var(--surface); border-radius:8px; padding:7px 12px; font-size:12.5px; font-weight:600; color:var(--text-dim); display:flex; align-items:center; gap:6px; }
  .btn-today:hover, .btn-export:hover{ color:var(--text); border-color:var(--accent); }
  .btn-export{ background:var(--surface-2); }

  .conflict-pill{ display:flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px; background:rgba(var(--danger-rgb),.16); border:1px solid rgba(var(--danger-rgb),.45); color:var(--danger); font-size:12.5px; font-weight:600; white-space:nowrap; }
  .conflict-pill .dot{ width:6px; height:6px; border-radius:50%; background:var(--danger); }
  .conflict-pill.none{ background:rgba(var(--success-rgb),.14); border-color:rgba(var(--success-rgb),.40); color:var(--success); }
  .conflict-pill.none .dot{ background:var(--success); }

  .layout{ display:grid; grid-template-columns: 268px 1fr; gap:20px; align-items:stretch; }
  @media (max-width: 980px){ .layout{ grid-template-columns:1fr; } }
  /* Chỉ trong app Android: không để lưới lịch làm rộng cả trang */
  .android-app .layout{ grid-template-columns:minmax(0,1fr); }
  .android-app .layout > *{ min-width:0; }
  .android-app body{ overflow-x:hidden; }
  .android-app .cal-scroll{ overflow-x:hidden; }
  .sidebar{ display:flex; flex-direction:column; gap:16px; min-height:100%; }
  .sidebar .panel{ margin-top:0; }
  .sidebar .panel:last-child{ flex:1; display:flex; flex-direction:column; min-height:0; }
  .sidebar .panel:last-child .dj-list{ flex:1; max-height:440px; }

  .panel{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:16px; box-shadow:var(--shadow); }
  .panel + .panel{ margin-top:16px; }
  .panel-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; gap:8px; }
  .panel-head h2{ font-size:13px; margin:0; text-transform:uppercase; letter-spacing:.07em; color:var(--text-dim); font-weight:600; }
  .add-btn{ width:24px; height:24px; border-radius:7px; border:1px dashed var(--border); background:transparent; color:var(--text-dim); font-size:15px; line-height:1; display:flex; align-items:center; justify-content:center; flex:none; }
  .add-btn-text{ width:auto; height:auto; padding:5px 10px; font-size:11.5px; font-weight:700; }
  .add-btn:hover{ border-color:var(--accent); border-style:solid; color:var(--accent); }

  .club-list{ display:flex; flex-direction:column; gap:4px; }
  .club-row{ display:flex; align-items:center; gap:8px; padding:8px 9px; border-radius:8px; border:1px solid transparent; background:transparent; text-align:left; width:100%; }
  .club-row:hover{ background:var(--surface-2); }
  .club-row.active{ background:var(--surface-2); border-color:var(--border); }
  .swatch{ width:9px; height:9px; border-radius:50%; flex:none; }
  .club-row .name{ font-weight:600; font-size:13.5px; flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .row-icon{ opacity:0; color:var(--text-dim); font-size:12.5px; padding:2px 4px; border-radius:5px; flex:none; }
  .club-row:hover .row-icon, .dj-card:hover .row-icon{ opacity:1; }
  .row-icon:hover{ color:var(--accent); }
  .row-icon.danger:hover{ color:var(--danger); }

  .dj-list{ display:flex; flex-direction:column; gap:8px; min-height:0; overflow-y:auto; }
  .dj-card{ padding:9px 64px 9px 10px; border-radius:9px; border:1px solid var(--border); background:var(--surface-2); position:relative; }
  .dj-top{ display:flex; align-items:center; gap:8px; }
  .dj-top .name{ font-weight:600; font-size:13.5px; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .dj-genres{ display:flex; gap:5px; flex-wrap:wrap; margin-top:6px; }
  .tag{ font-size:10.5px; padding:2px 7px; border-radius:999px; background:var(--bg); border:1px solid var(--border); color:var(--text-dim); font-weight:500; }
  .dj-meta{ display:flex; justify-content:space-between; align-items:center; margin-top:6px; gap:6px; }
  .dj-contact{ font-size:11px; color:var(--text-dim); }
  .dj-count{ font-size:11px; }
  .dj-count.warn{ color:var(--danger); font-weight:600; }
  .dj-del{ position:absolute; top:8px; right:8px; }
  .dj-fee{ font-size:11px; color:var(--text-dim); margin-top:4px; }
  .empty-note{ font-size:12px; color:var(--text-dim); padding:6px 2px; line-height:1.5; }
  .seed-note{ font-size:11.5px; color:var(--text-dim); background:var(--surface-2); border:1px dashed var(--border); border-radius:8px; padding:8px 10px; margin-bottom:14px; line-height:1.45; }

  /* -------- grid / schedule -------- */
  .cal-panel{ padding:16px; overflow:visible; }
  .gear-btn{ border:1px solid var(--border); background:var(--surface-2); border-radius:8px; padding:6px 11px; font-size:12px; font-weight:600; color:var(--text-dim); white-space:nowrap; }
  .gear-btn:hover{ color:var(--text); border-color:var(--accent); }

  .club-banner{ display:flex; align-items:center; gap:14px; padding:16px 18px; border-radius:12px; margin-bottom:16px; color:#fff; position:relative; overflow:hidden; background:var(--surface-2); }
  .club-banner::before{ content:""; position:absolute; inset:0; background:linear-gradient(120deg, rgba(0,0,0,.05), rgba(0,0,0,.35)); }
  .club-banner > *{ position:relative; z-index:1; }
  .club-banner-logo{ width:60px; height:60px; border-radius:10px; object-fit:contain; background:rgba(255,255,255,.15); flex:none; box-shadow:0 4px 14px rgba(0,0,0,.35); padding:3px; }
  .club-banner-text{ flex:1; min-width:0; }
  .club-banner-text h3{ margin:0; font-size:28px; line-height:1.15; text-shadow:0 1px 3px rgba(0,0,0,.35); }
  .club-banner-text .club-title-sub{ color:rgba(255,255,255,.9); font-size:17px; font-weight:600; margin-top:4px; }
  .club-banner-actions{ display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
  .club-banner-actions .gear-btn{ background:rgba(255,255,255,.18); border-color:rgba(255,255,255,.35); color:#fff; backdrop-filter:blur(2px); }
  .club-banner-actions .gear-btn:hover{ background:rgba(255,255,255,.3); border-color:#fff; }

  .drag-handle{ position:absolute; left:3px; bottom:2px; z-index:4; width:18px; height:18px; line-height:18px; text-align:center; font-size:12px; border-radius:5px; background:rgba(0,0,0,.45); color:#fff; cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; opacity:0; transition:opacity .12s; }
  .cell:hover .drag-handle{ opacity:.85; }
  @media (hover:none){ .drag-handle{ opacity:.7; } }
  .drag-ghost{ position:fixed; z-index:99999; pointer-events:none; padding:6px 12px; border-radius:8px; background:var(--accent); color:var(--accent-ink); font-size:13px; font-weight:700; box-shadow:0 8px 24px rgba(0,0,0,.35); transform:translate(-50%,-130%); white-space:nowrap; }
  .cell.drag-src{ opacity:.45; }
  .cell.drag-over{ outline:3px dashed var(--accent); outline-offset:-3px; border-radius:7px; }
  body.dragging-dj, body.dragging-dj *{ cursor:grabbing !important; user-select:none; }
  .search-dim{ opacity:.22; }
  .search-hit{ outline:2px solid var(--accent); outline-offset:-2px; border-radius:7px; }
  .week-dj-list{ display:flex; flex-wrap:wrap; gap:8px; margin-top:4px; }
  .week-dj-chip{ display:flex; align-items:center; gap:8px; padding:7px 11px; border:1px solid var(--border); border-radius:999px; background:var(--surface-2); font-size:13px; font-weight:600; }
  .week-dj-chip .dot{ width:10px; height:10px; border-radius:50%; flex:none; }
  .week-dj-chip .n{ font-family:"IBM Plex Mono",monospace; font-weight:700; color:var(--text-dim); }
  .week-dj-chip.zero{ border-color:var(--danger); background:rgba(var(--danger-rgb),.10); }
  .week-dj-chip.zero .n{ color:var(--danger); }
  .cal-scroll{ overflow-x:auto; padding-bottom:4px; }
  .grid-flex-row{ display:flex; align-items:flex-start; border-top:1px solid var(--border); border-left:1px solid var(--border); }
  .seg-block{ flex:none; }
  .seg-block + .seg-block{ border-left:2px solid var(--border); }
  .grid-flex-row.compact{ flex-wrap:wrap; }
  .grid-flex-row.compact .seg-block + .seg-block{ border-left:none; border-top:2px solid var(--border); }
  .grid-flex-row.compact{ flex-direction:column; }
  .grid-flex-row.compact .seg-block{ width:100%; }
  .grid-flex-row.compact .time-cell{ padding:4px 1px; justify-content:center; text-align:center; font-size:10px; line-height:1.25; white-space:normal; }
  .grid-flex-row.compact .time-cell.extra, .grid-flex-row.compact .time-cell.note-label{ font-size:7.5px; letter-spacing:0; }
  .grid-flex-row.compact .seg-corner{ padding:2px; }
  .grid-flex-row.compact .seg-corner .grp-label{ font-size:7px; letter-spacing:0; }
  .grid-flex-row.compact .day-head{ padding:6px 1px; }
  .grid-flex-row.compact .day-head .dow{ font-size:10px; letter-spacing:.02em; }
  .grid-flex-row.compact .day-head .dom{ font-size:14px; }
  .grid-flex-row.compact .cell{ padding:2px; }
  .grid-flex-row.compact .cell-select{ padding:6px 1px; font-size:calc(11px*var(--fs,1)); text-align:center; text-align-last:center; text-overflow:ellipsis; background-image:none; border-radius:5px; }
  .grid-flex-row.compact .cell-label{ flex:1; min-width:0; border:1px solid var(--border); border-radius:7px; padding:7px 2px; background:var(--bg); font-size:calc(11.5px*var(--fs,1)); font-weight:600; text-align:center; overflow-wrap:anywhere; word-break:break-word; hyphens:none; line-height:1.15; display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:36px; }
  .grid-flex-row.compact .flag-badges + .cell-label{ padding-top:12px; }
  .grid-flex-row.compact .cell-overlay{ position:absolute; inset:0; width:100%; height:100%; opacity:0; padding:0; z-index:1; }
  .grid-flex-row.compact .cell-edit{ z-index:3; }
  .grid-flex-row.compact .extra-edit-btn{ position:relative; z-index:3; }
  .grid-flex-row.compact .cell.is-test .cell-label, .grid-flex-row.compact .extra-entry.is-test .cell-label{ border-color:#000 !important; box-shadow:0 0 0 1px #000; }
  .grid-flex-row.compact .cell.is-show .cell-label, .grid-flex-row.compact .extra-entry.is-show .cell-label{ border-color:#FF0000 !important; box-shadow:0 0 0 1px #FF0000; }
  .grid-flex-row.compact .extra-entry.conflict .cell-label, .grid-flex-row.compact .cell.conflict .cell-label{ box-shadow: inset 0 0 0 2px var(--danger); }
  .grid-flex-row.compact .extra-entry.dropped .cell-label{ text-decoration:line-through; opacity:.55; }
  .grid-flex-row.compact .note-input{ font-size:9px; padding:3px; min-height:36px; }
  .grid-flex-row.compact .flag-badge{ font-size:6.5px; padding:0 3px; }
  .grid-flex-row.compact .extra-edit-btn{ width:14px; height:22px; font-size:9px; }
  /* Banner câu lạc bộ gọn trên điện thoại (chỉ trong app Android) */
  .android-app .club-banner{ flex-wrap:wrap; gap:10px 12px; padding:14px; }
  .android-app .club-banner-logo{ width:52px; height:52px; }
  .android-app .club-banner-text{ flex:1 1 0; min-width:0; }
  .android-app .club-banner-text h3{ font-size:24px; overflow-wrap:anywhere; }
  .android-app .club-banner-text .club-title-sub{ font-size:14px; }
  .android-app .club-banner-actions{ flex:1 1 100%; justify-content:flex-start; }
  .android-app .club-banner-actions .gear-btn{ padding:6px 10px; font-size:12px; }
  .seg-head, .seg-row{ display:grid; }
  .seg-head{ border-bottom:2px solid var(--border); }
  .seg-corner{ display:flex; align-items:center; justify-content:center; padding:4px 6px; border-right:1px solid var(--border); text-align:center; }
  .seg-corner .grp-label{ font-size:calc(10px*var(--fs,1)); text-transform:uppercase; letter-spacing:.05em; color:var(--teal); font-weight:800; line-height:1.3; }
  .day-head{ padding:9px 6px; text-align:center; border-right:1px solid var(--border); }
  .day-head.weekend{ background:rgba(217,154,62,.18); }
  .day-head.today{ background:rgba(var(--accent-rgb),.08); }
  .day-head .dow{ font-size:calc(10.5px*var(--fs,1)); text-transform:uppercase; letter-spacing:.06em; color:var(--text-dim); font-weight:600; }
  .day-head .dom{ font-family:"Bricolage Grotesque"; font-weight:700; font-size:calc(15.5px*var(--fs,1)); }
  .day-head.today .dow, .day-head.today .dom{ color:var(--accent); }
  .day-star{ font-size:calc(10px*var(--fs,1)); color:var(--gold); }
  .time-cell{ font-size:calc(11px*var(--fs,1)); font-weight:700; color:var(--text-dim); padding:8px 6px 8px 8px; display:flex; align-items:center; white-space:nowrap; border-right:1px solid var(--border); border-top:1px solid var(--border); }
  .time-cell.extra{ color:var(--gold); font-weight:700; letter-spacing:.04em; font-size:calc(10px*var(--fs,1)); text-transform:uppercase; }
  .cell{ position:relative; border-right:1px solid var(--border); border-top:1px solid var(--border); padding:4px; display:flex; align-items:stretch; }
  .cell-select{ align-self:center; }
  .cell-select{ width:100%; border:1px solid var(--border); border-radius:7px; padding:6px 22px 6px 8px; background:var(--bg); font-size:calc(12px*var(--fs,1)); font-weight:600; appearance:none; -webkit-appearance:none; background-image:linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%); background-position:calc(100% - 13px) center, calc(100% - 8px) center; background-size:5px 5px,5px 5px; background-repeat:no-repeat; }
  .cell-select:focus{ outline:2px solid var(--accent); outline-offset:1px; }
  .cell-edit{ position:absolute; top:2px; right:2px; width:16px; height:16px; border-radius:5px; background:rgba(0,0,0,.35); color:#fff; font-size:10px; line-height:1; display:flex; align-items:center; justify-content:center; opacity:0; border:none; }
  .cell:hover .cell-edit{ opacity:1; }
  .cell.conflict{ box-shadow: inset 0 0 0 2px var(--danger); border-radius:6px; }
  .cell.conflict::after{ content:"⚠"; position:absolute; bottom:2px; right:2px; font-size:calc(9px*var(--fs,1)); color:var(--danger); }
  .no-template{ text-align:center; padding:40px 20px; color:var(--text-dim); }
  .no-template button{ margin-top:10px; }
  .flag-badges{ position:absolute; top:2px; left:2px; display:flex; gap:2px; z-index:2; flex-wrap:wrap; max-width:calc(100% - 4px); }
  .flag-badge{ font-size:calc(7.5px*var(--fs,1)); font-weight:800; padding:0 4px; border-radius:4px; line-height:1.5; letter-spacing:.02em; white-space:nowrap; }
  .flag-badge.drop{ background:var(--danger); color:#fff; }
  .flag-badge.x2{ background:var(--gold); color:#1a1420; }
  .flag-badge.show{ background:#FF0000; color:#fff; }
  .cell.is-test .cell-select, .extra-entry.is-test .cell-select{ border-color:#000 !important; box-shadow:0 0 0 1px #000; }
  .cell.is-show .cell-select, .extra-entry.is-show .cell-select{ border-color:#FF0000 !important; box-shadow:0 0 0 1px #FF0000; }
  .flag-badge.test{ background:#000; color:#fff; }
  .flag-badge.guest{ background:#8b6bd6; color:#fff; }
  .flag-badge.half{ background:var(--warning); color:#1a1420; }
  .dj-tag-guest{ font-size:calc(9.5px*var(--fs,1)); padding:1px 6px; border-radius:999px; background:#8b6bd622; border:1px solid #8b6bd688; color:#8b6bd6; font-weight:700; margin-left:6px; flex:none; white-space:nowrap; }

  /* -------- extra row (multiple entries) -------- */
  .cell-extra{ flex-direction:column; gap:4px; align-items:stretch; padding:6px 4px; }
  .extra-entry{ display:flex; align-items:center; gap:4px; position:relative; }
  .extra-entry .cell-select{ flex:1; }
  .extra-entry.conflict .cell-select{ box-shadow: inset 0 0 0 2px var(--danger); }
  .extra-entry.dropped .cell-select{ text-decoration:line-through; opacity:.55; }
  .extra-edit-btn{ flex:none; width:20px; height:26px; border-radius:6px; background:var(--surface-2); border:1px solid var(--border); color:var(--text-dim); font-size:11px; }
  .extra-edit-btn:hover{ color:var(--accent); border-color:var(--accent); }
  .add-extra-select{ opacity:.65; font-style:italic; }
  .add-extra-select:hover, .add-extra-select:focus{ opacity:1; }

  /* -------- note row -------- */
  .time-cell.note-label{ color:var(--text-dim); font-weight:700; font-size:calc(9px*var(--fs,1)); text-transform:uppercase; letter-spacing:.05em; align-items:flex-start; padding-top:10px; }
  .note-cell{ padding:4px; }
  .note-input{ width:100%; min-height:44px; resize:vertical; border:1px solid var(--border); border-radius:6px; background:var(--bg); padding:5px 7px; font-size:calc(11px*var(--fs,1)); color:var(--text); font-family:inherit; }
  .note-input:focus{ outline:2px solid var(--accent); outline-offset:1px; }

  .flag-toggle{ display:flex; flex-direction:column; gap:6px; }
  .field .flag-toggle label{ display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:500; text-transform:none; letter-spacing:0; color:var(--text); margin-bottom:0; }
  .field .flag-toggle input{ width:16px; height:16px; accent-color:var(--accent); flex:none; }
  .check-row{ display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:500; margin:-2px 0 14px; }
  .check-row input{ width:16px; height:16px; accent-color:var(--accent); flex:none; }

  /* -------- events panel -------- */
  .events-list{ display:flex; flex-direction:column; gap:8px; }
  .event-card{ display:flex; gap:12px; align-items:flex-start; padding:11px 12px; border-radius:10px; border:1px solid var(--border); background:var(--surface-2); }
  .event-date{ font-family:"Bricolage Grotesque"; font-weight:700; font-size:13px; background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:6px 9px; text-align:center; flex:none; min-width:52px; }
  .event-date small{ display:block; font-family:"Work Sans"; font-size:9.5px; color:var(--text-dim); text-transform:uppercase; font-weight:600; }
  .event-body{ flex:1; min-width:0; }
  .event-title-row{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
  .event-title{ font-weight:700; font-size:14px; }
  .event-club{ font-size:11px; color:var(--text-dim); }
  .event-time{ font-size:11.5px; color:var(--text-dim); margin-top:2px; }
  .event-tags{ display:flex; gap:5px; flex-wrap:wrap; margin-top:6px; }
  .event-fee{ font-size:11.5px; margin-top:5px; color:var(--gold); font-weight:600; }
  .event-note{ font-size:11.5px; color:var(--text-dim); margin-top:4px; }
  .event-actions{ display:flex; flex-direction:column; gap:4px; flex:none; }
  .event-actions button{ background:transparent; border:none; color:var(--text-dim); font-size:12px; padding:3px; }
  .event-actions button:hover{ color:var(--accent); }
  .event-actions button.danger:hover{ color:var(--danger); }

  /* -------- modals -------- */
  .overlay{ position:fixed; inset:0; background:rgba(10,8,15,.55); backdrop-filter:blur(2px); display:flex; align-items:center; justify-content:center; z-index:50; padding:16px; }
  .overlay[hidden]{ display:none; }
  .modal{ background:var(--surface); border:1px solid var(--border); border-radius:14px; width:100%; max-width:440px; padding:20px; box-shadow:0 24px 60px -20px rgba(0,0,0,.6); max-height:88vh; overflow-y:auto; }
  .modal.wide{ max-width:640px; }
  .modal h3{ margin:0 0 3px; font-size:17px; }
  .modal .sub{ font-size:12px; color:var(--text-dim); margin-bottom:16px; }
  .field{ margin-bottom:12px; }
  .field label{ display:block; font-size:11.5px; font-weight:600; color:var(--text-dim); text-transform:uppercase; letter-spacing:.05em; margin-bottom:5px; }
  .field input, .field select, .field textarea{ width:100%; background:var(--bg); border:1px solid var(--border); border-radius:8px; padding:8px 10px; color:var(--text); }
  .field input:focus, .field select:focus, .field textarea:focus{ outline:2px solid var(--accent); outline-offset:1px; }
  .row2{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .row3{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
  .logo-drop{ position:relative; border:2px dashed var(--border); border-radius:10px; min-height:84px; display:flex; align-items:center; justify-content:center; cursor:pointer; background:var(--bg); overflow:hidden; padding:8px; }
  .logo-drop:hover{ border-color:var(--accent); }
  .logo-drop.dragover{ border-color:var(--accent); background:rgba(var(--accent-rgb),.08); }
  .logo-drop-hint{ font-size:11.5px; color:var(--text-dim); text-align:center; padding:0 10px; line-height:1.5; }
  .logo-drop img{ max-width:100%; max-height:76px; object-fit:contain; border-radius:6px; }
  .logo-remove-btn{ position:absolute; top:6px; right:6px; width:22px; height:22px; border-radius:50%; background:rgba(0,0,0,.55); color:#fff; border:none; font-size:11px; line-height:1; }
  .logo-remove-btn:hover{ background:var(--danger); }
  .swatch-picker{ display:flex; gap:6px; flex-wrap:wrap; }
  .swatch-opt{ width:22px; height:22px; border-radius:50%; border:2px solid transparent; }
  .swatch-opt.sel{ border-color:var(--text); }
  .modal-actions{ display:flex; gap:8px; margin-top:16px; }
  .btn{ border-radius:8px; padding:9px 14px; font-weight:600; font-size:13px; border:1px solid var(--border); background:var(--surface-2); }
  .btn-primary{ background:var(--accent); border-color:var(--accent); color:#fff; flex:1; }
  .btn-primary:hover{ filter:brightness(1.06); }
  .btn-ghost{ background:transparent; color:var(--text-dim); }
  .btn-ghost:hover{ color:var(--text); }
  .btn-danger-text{ background:transparent; border:none; color:var(--danger); font-weight:600; font-size:12.5px; padding:9px 4px; width:100%; text-align:center; margin-top:6px; }
  .hint{ font-size:11px; color:var(--text-dim); line-height:1.5; margin:-2px 0 12px; }

  .group-card{ border:1px solid var(--border); border-radius:10px; padding:11px; margin-bottom:10px; background:var(--surface-2); }
  .group-card-head{ display:flex; gap:8px; align-items:center; margin-bottom:8px; }
  .group-label{ flex:1; background:var(--bg); border:1px solid var(--border); border-radius:7px; padding:6px 9px; font-size:12.5px; font-weight:600; }
  .group-del{ background:transparent; border:none; color:var(--danger); font-size:11.5px; font-weight:600; flex:none; }
  .day-chips{ display:flex; gap:5px; flex-wrap:wrap; }
  .day-chip{ width:34px; height:28px; border-radius:7px; border:1px solid var(--border); background:var(--bg); font-size:11px; font-weight:700; color:var(--text-dim); }
  .pref-grid{ border-collapse:separate; border-spacing:3px; }
  .pref-grid th{ font-size:10.5px; font-weight:700; color:var(--text-dim); cursor:pointer; padding:2px 4px; white-space:nowrap; user-select:none; }
  .pref-cell{ width:42px; height:28px; border-radius:7px; border:1px solid var(--border); background:var(--bg); font-size:13px; font-weight:800; color:#fff; }
  .pref-cell.p1{ background:var(--success); border-color:var(--success); }
  .pref-cell.pm{ background:var(--danger); border-color:var(--danger); }
  .day-chip.on.off{ background:var(--danger); border-color:var(--danger); }
  .day-chip.on{ background:var(--accent); border-color:var(--accent); color:#fff; }
  .add-group-btn{ width:100%; border:1px dashed var(--border); background:transparent; border-radius:9px; padding:9px; font-size:12.5px; font-weight:600; color:var(--text-dim); }
  .add-group-btn:hover{ color:var(--accent); border-color:var(--accent); }

  .view-tabs{ display:flex; gap:6px; margin-bottom:16px; }
  .view-tab{ border:1px solid var(--border); background:var(--surface); border-radius:8px; padding:8px 18px; font-size:13px; font-weight:700; color:var(--text-dim); }
  .view-tab:hover{ color:var(--text); border-color:var(--accent); }
  .view-tab.active{ background:var(--accent); border-color:var(--accent); color:#fff; }
  .report-block{ margin-top:22px; }
  .report-block-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
  .report-block-head h3{ margin:0; font-size:15px; }
  .report-img-wrap{ overflow-x:auto; border:1px solid var(--border); border-radius:10px; background:var(--surface-2); padding:8px; }
  .report-img-wrap img{ display:block; width:100%; height:auto; border-radius:6px; }
  .settings-block{ border:1px solid var(--border); border-radius:10px; padding:16px; background:var(--surface-2); }
  .settings-block + .settings-block{ margin-top:16px; }
  .settings-block h3{ margin:0 0 4px; font-size:14.5px; }
  .settings-path-row{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
  .settings-path{ flex:1; min-width:220px; font-size:12.5px; font-family:"IBM Plex Mono",monospace; background:var(--bg); border:1px solid var(--border); border-radius:7px; padding:9px 11px; color:var(--text-dim); overflow-wrap:anywhere; }
  .mode-toggle{ display:flex; gap:8px; margin-bottom:12px; }
  .mode-toggle label{ flex:1; text-align:center; border:1px solid var(--border); border-radius:8px; padding:8px; font-size:12.5px; font-weight:600; color:var(--text-dim); }
  .mode-toggle input{ display:none; }
  .mode-toggle label:has(input:checked){ border-color:var(--accent); background:rgba(var(--accent-rgb),.12); color:var(--text); }

  .toast{ position:fixed; bottom:20px; left:50%; transform:translateX(-50%); background:var(--surface); border:1px solid var(--border); color:var(--text); padding:9px 16px; border-radius:999px; font-size:12.5px; box-shadow:var(--shadow); z-index:60; opacity:0; transition:opacity .2s; max-width:90vw; text-align:center; }
  .toast.show{ opacity:1; }

  ::-webkit-scrollbar{ height:9px; width:9px; }
  ::-webkit-scrollbar-thumb{ background:var(--border); border-radius:6px; }

  /* -------- export render surface (off-screen) -------- */
  #exportHost{ position:fixed; left:-99999px; top:0; }
  .export-page{ display:inline-block; min-width:640px; background:var(--bg); color:var(--text); font-family:"Work Sans",sans-serif; padding:28px; box-sizing:border-box; }
  .export-page.tight{ min-width:0; padding:10px; }
  .export-page .club-banner{ width:100%; box-sizing:border-box; margin-bottom:20px; }
  .rpt-table{ width:100%; border-collapse:collapse; margin-top:14px; }
  .rpt-table th{ text-align:left; font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--text-dim); padding:9px 10px; border-bottom:1px solid var(--border); }
  .rpt-table td{ padding:10px; border-bottom:1px solid var(--border); font-size:13px; color:var(--text); text-align:left; }
  .rpt-table th.num, .rpt-table td.num{ text-align:center; }
  .rpt-table tbody tr:last-child td{ border-bottom:none; }
  .rpt-table tfoot td{ font-weight:700; border-top:2px solid var(--border); border-bottom:none; }
  .rpt-dj-cell{ display:flex; align-items:center; gap:8px; font-weight:600; }
  .rpt-swatch{ width:9px; height:9px; border-radius:50%; flex:none; }
  .rpt-week-title{ font-family:"Bricolage Grotesque"; font-weight:700; font-size:14px; margin:22px 0 8px; }
  .rpt-week-title:first-of-type{ margin-top:6px; }

  .cell-select.static{ display:flex; align-items:center; justify-content:center; text-align:center; background-image:none !important; pointer-events:none; padding:6px 8px; }
  .cell-select.static.empty{ color:var(--text-dim); background:transparent; border-style:dashed; }
  .day-off{ align-items:center; justify-content:center; color:var(--text-dim); font-weight:700; font-size:calc(11px*var(--fs,1)); text-transform:uppercase; letter-spacing:.08em; background:repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 7px, transparent 7px, transparent 14px); }
  .note-static{ font-size:calc(11px*var(--fs,1)); color:var(--text-dim); padding:4px 2px; white-space:pre-wrap; word-break:break-word; line-height:1.4; }
  .seg-grid{ display:grid; }
