:root {
  --bg: #0e1116;
  --surface: #161b22;
  --surface-hover: #1f2630;
  --border: #2a313c;
  --text: #e6edf3;
  --text-dim: #8b949e;
  --accent: #4f9cf9;
  --up: #3fb950;
  --down: #f85149;
  --unknown: #8b949e;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
    "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.hero {
  text-align: center;
  padding: 56px 20px 32px;
  border-bottom: 1px solid var(--border);
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.95rem;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.section {
  margin-bottom: 44px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: 1.25rem;
}

.count {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

a.card:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card-thumb {
  position: relative;
  width: calc(100% + 32px);
  margin: -16px -16px 8px;
  aspect-ratio: 16 / 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.card-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.card-thumb.no-thumb::after {
  content: "미리보기 없음";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.card-desc {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.card-meta {
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 0.8rem;
  word-break: break-all;
}

.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-api {
  background: rgba(79, 156, 249, 0.15);
  color: var(--accent);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--unknown);
}

.dot.up {
  background: var(--up);
}

.dot.down {
  background: var(--down);
}

.empty {
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

footer {
  text-align: center;
  padding: 24px;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

/* ===== 의견 · 문의 ===== */
.feedback-cta {
  max-width: 1080px;
  margin: 0 auto 48px;
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

@media (max-width: 1120px) {
  .feedback-cta {
    margin-left: 20px;
    margin-right: 20px;
  }
}

.feedback-cta h2 {
  font-size: 1.1rem;
}

.feedback-cta p {
  margin-top: 4px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.btn {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-hover);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #3d8be8;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
}

#feedback-dialog {
  width: min(520px, calc(100% - 32px));
  margin: auto;
  padding: 24px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
}

#feedback-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

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

.dialog-head h2 {
  font-size: 1.2rem;
}

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-toggle {
  font: inherit;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
}

.lang-toggle:hover {
  color: var(--text);
  border-color: var(--accent);
}

.icon-btn {
  font-size: 1.5rem;
  line-height: 1;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 6px;
}

.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.dialog-note {
  margin: 6px 0 18px;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.field select,
.field textarea,
.field input {
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 11px;
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field select:focus,
.field textarea:focus,
.field input:focus {
  outline: none;
  border-color: var(--accent);
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.form-status {
  min-height: 1.4em;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.form-status.success {
  color: var(--up);
}

.form-status.error {
  color: var(--down);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
