*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #111;
  background: #fafafa;
  padding: 2rem 1rem;
}

.container {
  max-width: 680px;
  margin: 0 auto;
}

/* Header */
header { margin-bottom: 2.5rem; }
header a { text-decoration: none; color: inherit; }
.site-name { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.02em; }
.site-name span { color: #6b7280; font-weight: 400; }

/* Typography */
h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
h2 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75rem; margin-top: 1.75rem; }
p { color: #374151; margin-bottom: 1rem; }
small { color: #6b7280; font-size: 0.875rem; }
a { color: #2563eb; }
a:hover { text-decoration: underline; }
code { font-family: monospace; font-size: 0.875rem; background: #f3f4f6; padding: 0.1em 0.3em; border-radius: 3px; word-break: break-all; }

/* Cards (index page) */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-top: 2rem; }
.card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.card:hover { border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; text-decoration: none; }
.card-title { font-weight: 600; margin-bottom: 0.25rem; }
.card-desc { font-size: 0.875rem; color: #6b7280; }

/* Drop zone */
.drop-zone {
  border: 2px dashed #d1d5db;
  border-radius: 8px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #fff;
}
.drop-zone.over { border-color: #2563eb; background: #eff6ff; }
.drop-zone input[type="file"] { display: none; }
.drop-zone p { margin: 0; color: #6b7280; }
.drop-zone strong { color: #111; }

/* Result box */
.result {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-top: 1.25rem;
}
.result.hidden { display: none; }
.result-row { display: flex; flex-direction: column; gap: 0.1rem; margin-bottom: 0.75rem; }
.result-row:last-child { margin-bottom: 0; }
.result-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #9ca3af; }

/* Status indicator */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}
.status-dot.pending { background: #f59e0b; }
.status-dot.anchored { background: #10b981; }

/* Buttons */
button, .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #111;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
button:hover, .btn:hover { background: #374151; text-decoration: none; }
button:disabled { background: #d1d5db; color: #9ca3af; cursor: not-allowed; }
.btn-secondary {
  background: #fff;
  color: #111;
  border: 1px solid #d1d5db;
}
.btn-secondary:hover { background: #f9fafb; }

/* Input */
input[type="text"] {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  font-family: monospace;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:focus { border-color: #2563eb; box-shadow: 0 0 0 3px #dbeafe; }

/* Notice / error */
.notice {
  border-radius: 6px;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  margin-top: 1rem;
}
.notice.info { background: #eff6ff; color: #1d4ed8; }
.notice.error { background: #fef2f2; color: #b91c1c; }
.notice.success { background: #f0fdf4; color: #15803d; }
.notice.hidden { display: none; }

/* Utility */
.mt { margin-top: 1rem; }
.mt2 { margin-top: 1.5rem; }
.flex { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
hr { border: none; border-top: 1px solid #e5e7eb; margin: 2rem 0; }
