:root {
  --bg: #111111; --card: #222222; --fg: #f4f4f4; --muted: #ababab; --border: #383838; --accent: #f47764;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Gilroy", "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); overflow-x: hidden; }
html { scrollbar-width: none; }
body { box-sizing: border-box; width: 340px; margin: 0; padding: 14px; color: var(--fg); font: 400 14px/1.45 var(--sans); display: grid; grid-template-columns: minmax(0,1fr); gap: 10px; }
.mono { font: 400 11px/1.3 var(--mono); color: var(--muted); }
.head { display: flex; align-items: center; gap: 10px; padding: 2px 2px 4px; }
.head > div { flex: 1; }
h1 { margin: 0; font: 800 17px/1.1 var(--display); letter-spacing: -0.01em; }
.logo { width: 44px; height: 44px; display: grid; place-items: center; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 20px; padding: 14px; display: grid; gap: 12px; }
.site { grid-template-columns: 1fr auto; align-items: center; }
.label { display: block; margin-bottom: 2px; }
.host { font-weight: 600; font-size: 15px; word-break: break-all; }
.status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; margin-top: 2px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.status.on i { background: var(--accent); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.h4 { font-weight: 600; }
.btn { font: 600 13px var(--sans); color: var(--bg); background: var(--accent); border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: transform .12s, opacity .2s; white-space: nowrap; }
.btn:hover { opacity: .9; } .btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--border); }
.btn:disabled { opacity: .4; cursor: default; }
.switch { position: relative; width: 40px; height: 24px; flex: none; cursor: pointer; }
.switch.sm { width: 34px; height: 20px; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: calc(100% - 22px); aspect-ratio: 1; height: auto; border-radius: 50%; background: var(--fg); transition: transform .2s; }
.switch:not(.sm) span::after { width: 18px; } .switch.sm span::after { width: 14px; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch.sm input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.slider { display: grid; gap: 6px; }
input[type=range] { width: 100%; accent-color: var(--accent); margin: 0; }
.add { display: flex; gap: 8px; }
.add input { flex: 1; min-width: 0; background: var(--bg); color: var(--fg); border: 1px solid var(--border); border-radius: 999px; padding: 8px 12px; font: 400 13px var(--sans); outline: none; }
.add input:focus { border-color: var(--accent); }
ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 160px; overflow: auto; }
li { display: flex; align-items: center; justify-content: space-between; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 6px 6px 6px 12px; font-size: 13px; }
li button { width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--card); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
li button:hover { color: var(--accent); }
.empty { margin: 0; color: var(--muted); font-size: 12px; }
.disabled .site, .disabled .card:not(:last-child) { opacity: .55; }
.card { min-width: 0; grid-template-columns: minmax(0,1fr); } .add, ul, li { min-width: 0; } .add button { flex: none; }
.card.site { grid-template-columns: minmax(0,1fr) auto; }
