
:root {
  color-scheme: dark;
  --back: #10121a; --panel: #191c28; --surface: #1e2231; --line: #323749;
  --text: #f2f1fa; --muted: #b2b6c9; --accent: #c9baff; --purple: #251b43;
  --accent-strong: #bbabff; --green: #a1edce; --red: #ffbac4; --yellow: #f7d6a3; --radius: 20px;
  font: 16px/1.55 system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--back); color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; display: flex; min-height: 100vh; flex-direction: column; }
a { color: inherit; }
a, button, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button, input, select, textarea { font: inherit; }
.skip { position: absolute; top: -100px; left: 12px; z-index: 5; }
.skip:focus { top: 8px; padding: 8px 12px; background: var(--panel); }
.top { border-bottom: 1px solid var(--line); background: #131621; }
.top-inner, .workspace, footer { width: min(1200px, 100% - 48px); margin-inline: auto; }
.top-inner { display: flex; align-items: center; gap: 32px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 750; text-decoration: none; font-size: 1.18rem; line-height: 1.12; margin-right: auto; }
.brand small { display: block; margin-top: 5px; font-weight: 500; color: var(--muted); font-size: .7rem; letter-spacing: .1em; }
.mark { width: 38px; height: 38px; display: grid; place-content: center; grid-template-columns: repeat(2, 7px); gap: 3px; border-radius: 12px; background: var(--accent-strong); }
.mark i { display: block; width: 7px; height: 7px; border-radius: 2px; background: #252044; }
.mark i:last-child { transform: scale(.66); }
nav { display: flex; gap: 24px; }
nav a, .external { color: var(--accent); text-decoration: none; font-weight: 650; }
nav a { padding: 8px 0; }
nav a:hover, .external:hover { text-decoration: underline; }
footer { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: auto; padding: 22px 0 25px; color: var(--muted); font-size: .83rem; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2.3rem, 5vw, 4rem); font-weight: 780; letter-spacing: -.045em; line-height: 1.15; }
h2 { font-size: 1.28rem; line-height: 1.35; }
h3 { font-size: 1.04rem; overflow-wrap: anywhere; }
.eyebrow { color: var(--accent); font-size: .75rem; letter-spacing: .19em; font-weight: 700; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .82rem; }
.gate { width: min(950px, 100% - 48px); margin: auto; padding: clamp(42px, 9vw, 130px) 0; }
.login { display: grid; grid-template-columns: 1.12fr 1fr; align-items: center; gap: clamp(25px, 6vw, 80px); }
.login-intro h1, .hero h1 { margin: 11px 0 13px; }
.login-intro > p:last-child, .hero > div > p:last-child { color: var(--muted); max-width: 32em; }
.login-fields, .problem { padding: clamp(22px, 4vw, 34px); }
.login-fields .muted, .problem p { margin-top: 8px; }
.login-fields form, .login-fields .flash, .problem .button { margin-top: 22px; }
.login-fields form, .notice form { display: grid; gap: 13px; }
.login-fields .button { justify-content: space-between; margin-top: 6px; }
.panel, .site-card, .stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
label { display: grid; gap: 6px; min-width: 0; font-size: .88rem; font-weight: 650; }
input, textarea, select { color: var(--text); background: var(--back); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; min-height: 45px; width: 100%; font-weight: 400; font-size: 1rem; }
textarea { resize: vertical; min-height: 108px; overflow-wrap: anywhere; }
input::placeholder, textarea::placeholder { color: #979bb0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 8px 13px; font-size: .87rem; font-weight: 700; border: 1px solid transparent; border-radius: 10px; text-decoration: none; cursor: pointer; }
.solid { background: var(--accent-strong); color: #1d1635; }
.solid:hover { background: #d4c9ff; }
.quiet { background: var(--surface); border-color: var(--line); color: var(--text); }
.quiet:hover { background: #2a3044; }
.danger { color: var(--red); border-color: #793f4e; background: #361e2e; }
.danger:hover { background: #4c2537; }
.tag { display: inline-flex; align-items: center; width: fit-content; padding: 3px 9px; font-size: .74rem; border-radius: 999px; font-weight: 690; }
.tag.private { color: var(--accent); background: var(--purple); }
.tag.planned { color: var(--muted); background: #282e3c; }
.tag.good { color: var(--green); background: #173c35; }
.tag.warn { color: var(--yellow); background: #3a2e21; }
.tag.bad { color: var(--red); background: #482733; }
.workspace { padding: 36px 0 50px; }
.hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: clamp(20px, 5vw, 44px); background: #201d33; border: 1px solid #3c3655; border-radius: 24px; margin-bottom: 17px; }
.hero .tag { margin-top: 5px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 16px 0 31px; }
.stats > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 15px 21px; }
.stats span { color: var(--muted); font-size: .9rem; }
.stats strong { font: 720 1.52rem/1 system-ui, sans-serif; }
.deck { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(250px, 1fr); align-items: start; gap: 24px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.site-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.site-card { min-width: 0; padding: 15px; }
.site-title { display: flex; align-items: center; min-width: 0; gap: 10px; }
.tile { flex: 0 0 37px; height: 37px; border-radius: 10px; display: grid; place-content: center; color: var(--accent); background: var(--purple); font-size: .76rem; font-weight: 800; }
.tile.private { color: #9adaef; background: #183240; }
.tile.manual { color: var(--green); background: #193631; }
.domain { color: var(--muted); font: .78rem/1.6 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.site-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 14px; font-size: .84rem; color: var(--muted); }
.site-note, .detection { color: var(--muted); font-size: .83rem; margin-top: 8px; overflow-wrap: anywhere; }
.detection { color: var(--green); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.actions .button { padding-inline: 9px; }
details summary { cursor: pointer; font-weight: 690; color: var(--accent); padding: 10px 0; min-height: 42px; }
.add-site { margin-bottom: 12px; padding: 0 15px; }
.edit-site { margin-top: 7px; }
.edit-site[open] { border-top: 1px solid var(--line); }
.site-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 3px 0 12px; }
.site-card .site-form { grid-template-columns: minmax(0, 1fr); }
.form-action { grid-column: 1 / -1; }
.delete { border-top: 1px solid var(--line); font-size: .86rem; padding: 0 0 5px; }
.delete summary { color: var(--red); }
.delete form { margin-top: 8px; }
.notice, .account, .empty { padding: 17px; }
.notice form, .notice .external, .account { margin-top: 14px; }
.account .external { margin-top: 9px; }
.external { display: inline-block; }
.account .muted, .notice > .muted, .login-fields .muted { font-size: .9rem; }
.account h3 { margin-bottom: 4px; }
.notice form .button { justify-self: start; }
.flash { border-radius: 12px; padding: 10px 14px; background: #193631; color: var(--green); overflow-wrap: anywhere; }
.flash.error { background: #482733; color: var(--red); }
@media (max-width: 900px) { .site-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) {
  .top-inner, .workspace, footer, .gate { width: calc(100% - 28px); }
  .top-inner { min-height: 64px; gap: 14px; }
  nav { gap: 12px; font-size: .88rem; }
  .login, .deck { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .gate { padding: 38px 0; }
  .workspace { padding-top: 18px; }
  .hero { flex-direction: column-reverse; }
  .hero .tag { margin: 0; }
  .stats { gap: 7px; margin-bottom: 22px; }
  .stats > div { flex-direction: column; align-items: flex-start; padding: 10px; }
  .stats span { font-size: .75rem; }
  .site-form { grid-template-columns: minmax(0, 1fr); }
  .button, details summary { min-height: 44px; }
}
@media (prefers-contrast: more) {
  :root { --text: #fff; --muted: #ddd; --line: #8388a3; }
}
