:root {
  --ink: #151515;
  --muted: #64615d;
  --paper: #f7f4ee;
  --panel: #fffaf1;
  --line: #1f1f1f;
  --accent: #e2342d;
  --cyan: #20a7a2;
  --yellow: #f5c542;
  --shadow: 6px 6px 0 #151515;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(21, 21, 21, 0.04) 1px, transparent 1px),
    linear-gradient(rgba(21, 21, 21, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 28px 28px;
  font-family: "Trebuchet MS", "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  min-height: 44px;
  padding: 0 18px;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--line);
}

button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--line);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.topbar,
.control-panel,
.accounts-section {
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.95;
}

h2 {
  margin-bottom: 12px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

h3 {
  margin-bottom: 6px;
  font-size: 20px;
}

.status-pill {
  border: 2px solid var(--line);
  border-radius: 6px;
  background: var(--yellow);
  padding: 10px 14px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.ready {
  background: var(--cyan);
  color: #fff;
}

.control-panel {
  margin-top: 28px;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 28px;
  align-items: end;
}

.copy-block p:last-child {
  max-width: 44ch;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

input {
  width: 100%;
  min-height: 44px;
  border: 2px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 14px;
}

.result-box {
  grid-column: 1 / -1;
  border: 2px dashed var(--line);
  border-radius: 6px;
  padding: 16px;
  background: #fff;
}

.result-box p {
  margin-bottom: 10px;
}

.result-box a {
  color: var(--accent);
  font-weight: 800;
}

.accounts-section {
  margin-top: 28px;
  padding: 28px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.ghost {
  background: #fff;
  color: var(--ink);
}

.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.account-card {
  border: 2px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 18px;
}

.account-main {
  display: flex;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 54px;
  height: 54px;
  border: 2px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
  background: var(--cyan);
}

.meta,
dd {
  color: var(--muted);
}

dl {
  margin: 18px 0;
}

dt {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sync-btn {
  background: var(--cyan);
}

.empty {
  border: 2px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
}

@media (max-width: 760px) {
  .topbar,
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .control-panel {
    grid-template-columns: 1fr;
  }

  .input-row {
    grid-template-columns: 1fr;
  }

  button {
    width: 100%;
  }
}
