.access-modal-scrim {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 10, 10, 0.48);
  backdrop-filter: blur(4px);
}

.access-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--bg);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
}

.access-modal-head,
.access-modal-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.access-modal-foot {
  justify-content: space-between;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.access-modal-body {
  overflow: auto;
  padding: 18px 22px 24px;
}

.access-help {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--fg-3);
  font-size: 12.5px;
  line-height: 1.45;
  background: var(--surface-2);
}

.access-group + .access-group { margin-top: 18px; }
.access-group-title {
  margin-bottom: 7px;
  color: var(--fg-4);
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.access-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.access-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 120px 120px;
  align-items: center;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
}

.access-row:last-child { border-bottom: 0; }
.access-row.is-protected { background: var(--surface-2); color: var(--fg-4); }
.access-row-name { font-size: 13px; font-weight: 600; }
.access-row-note { margin-top: 2px; color: var(--fg-4); font-size: 10.5px; font-weight: 450; }
.access-check { display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; }
.access-check input { width: 16px; height: 16px; accent-color: var(--fg); }
.custom-access-pill { margin-left: 7px; color: var(--fg-3); font-size: 10.5px; font-weight: 650; }

.core-readonly-note {
  position: absolute;
  z-index: 3;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 24px);
  padding: 7px 12px;
  border: 1px solid #f1c65b;
  border-radius: 999px;
  background: #fff8dc;
  color: #6b4e00;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .12);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.section-readonly-note {
  margin: 0 0 14px;
  padding: 9px 12px;
  border: 1px solid #f1c65b;
  border-radius: var(--radius-sm);
  background: #fff8dc;
  color: #6b4e00;
  font-size: 12px;
  font-weight: 650;
  text-align: center;
}

@media (max-width: 640px) {
  .access-modal-scrim { padding: 8px; }
  .access-modal { width: 100%; max-height: calc(100vh - 16px); border-radius: 16px; }
  .access-modal-head, .access-modal-foot { padding: 14px; }
  .access-modal-body { padding: 14px; }
  .access-row { grid-template-columns: 1fr 72px 72px; padding: 0 10px; }
  .access-check span { display: none; }
  .core-readonly-note { white-space: normal; text-align: center; }
}
