:root {
  color-scheme: light;
  --font-ui: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  --bg: oklch(97.5% 0.004 25);
  --surface: oklch(100% 0 0);
  --surface-hover: oklch(94.5% 0.012 25);
  --line: oklch(87% 0.012 25);
  --line-strong: oklch(76% 0.02 25);
  --text: oklch(24% 0.016 25);
  --muted: oklch(43% 0.018 25);
  --accent: oklch(50% 0.185 25);
  --accent-hover: oklch(44% 0.175 25);
  --focus: oklch(57% 0.18 25);
}

* { box-sizing: border-box; }

html,
body { min-width: 320px; min-height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 400;
}

main {
  width: min(760px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 56px;
}

header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.system-mark,
.project-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--accent);
  color: white;
  font-size: .875rem;
  font-weight: 700;
}

.system-mark { width: 44px; height: 44px; border-radius: 10px; }

h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.02em;
  text-wrap: balance;
}

header p {
  max-width: 65ch;
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.65;
  text-wrap: pretty;
}

.project-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.hidden { display: none !important; }

.account-bar {
  min-height: 44px;
  margin-bottom: 12px;
  padding: 8px 10px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: .875rem;
}

.account-bar button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.login-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.login-card h2 { margin: 0; font-size: 1.25rem; }
.login-card > p { margin: 8px 0 20px; color: var(--muted); line-height: 1.6; }
.login-card form { display: grid; gap: 9px; }
.login-card label { font-size: .875rem; font-weight: 600; }
.login-card input {
  width: 100%;
  height: 44px;
  margin-bottom: 5px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  color: var(--text);
  font: inherit;
}
.login-card input:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.login-button {
  min-height: 44px;
  margin-top: 6px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.login-button:hover { background: var(--accent-hover); }
.login-button:disabled { cursor: wait; opacity: .66; }
.login-error { margin: 0; color: var(--accent); font-size: .875rem; line-height: 1.5; }
.loading-state { margin: 28px 0 0; color: var(--muted); text-align: center; }

.project-row {
  min-height: 92px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  text-decoration: none;
  transition: background-color 180ms cubic-bezier(.22, 1, .36, 1);
}

.project-row + .project-row { border-top: 1px solid var(--line); }
.project-row:hover { background: var(--surface-hover); }
.project-row:focus { outline: none; }
.project-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -3px; }

.project-mark { width: 42px; height: 42px; border-radius: 9px; }
.project-copy { min-width: 0; display: grid; gap: 5px; flex: 1; }
.project-copy strong { font-size: 1.25rem; line-height: 1.25; font-weight: 700; }
.project-copy span { color: var(--muted); font-size: .875rem; line-height: 1.5; }

.project-action {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--accent-hover);
  font-size: .875rem;
  font-weight: 600;
}

@media (max-width: 620px) {
  main { width: min(100% - 24px, 760px); padding: 36px 0 40px; }
  header { gap: 12px; margin-bottom: 24px; }
  h1 { font-size: 1.25rem; }
  header p { font-size: .875rem; }
  .project-row { min-height: 104px; padding: 16px; align-items: flex-start; }
  .project-action { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .project-row { transition: none; }
}
