:root {
  --indigo: #4f46e5;
  --indigo-dark: #3730a3;
  --bg: #eef2ff;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  width: 360px;
  max-height: 560px;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 12px;
  font: 13px/1.45 system-ui, sans-serif;
  color: #1e1b4b;
  background: #fff;
}

.head h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}
.page-url {
  color: #6d28d9;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  padding: 7px 10px;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: var(--bg);
  color: var(--indigo-dark);
  font-weight: 600;
  cursor: pointer;
}
.toggle.on {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}
.toggle:disabled { opacity: 0.5; cursor: default; }
.toggle kbd {
  font: 10px/1 ui-monospace, monospace;
  padding: 3px 5px;
  border: 1px solid #c7d2fe;
  border-radius: 4px;
  background: #fff;
  color: #6366f1;
}
.toggle.on kbd {
  border-color: rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #fff;
}

.list {
  flex: 1;
  overflow-y: auto;
  margin: 0 0 10px;
}

.item {
  border: 1px solid #e0e7ff;
  border-radius: 9px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: var(--bg);
}
.item textarea {
  width: 100%;
  min-height: 40px;
  resize: vertical;
  font: 13px/1.45 system-ui, sans-serif;
  color: #1e1b4b;
  border: 1px solid #c7d2fe;
  border-radius: 7px;
  padding: 6px 8px;
}
.item .targets {
  margin: 6px 0 4px;
  padding: 0;
  list-style: none;
}
.item .targets li {
  font: 11px/1.4 ui-monospace, monospace;
  color: var(--indigo-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.item .del {
  float: right;
  border: none;
  background: none;
  color: #b91c1c;
  cursor: pointer;
  font-size: 14px;
  padding: 0 2px;
}
.item .del:hover { color: #ef4444; }

.empty {
  color: #64748b;
  padding: 12px 4px;
}

.foot {
  display: flex;
  gap: 8px;
}
.foot button {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #c7d2fe;
  cursor: pointer;
  font-weight: 600;
}
.primary {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}
.primary:hover { background: #4338ca; }
.primary:disabled { opacity: 0.45; cursor: default; }
.danger {
  background: #fff;
  color: #b91c1c;
}
.danger:hover { background: #fef2f2; }
.danger.confirming {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}

.others {
  margin-top: 8px;
  font-size: 11px;
  color: #64748b;
}

.toast {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--indigo-dark);
  color: #fff;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
}