:root {
  color-scheme: light;
  font-family: "Segoe UI", "Trebuchet MS", "Verdana", sans-serif;
}

* {
  box-sizing: border-box;
}

body.page {
  margin: 0;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf3 45%, #f8fafc 100%);
  color: #1f2937;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border-bottom: 1px solid #e5e7eb;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 72px;
  height: 72px;
}

.brand-title {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  color: #16a34a;
}

.home .brand-title {
  font-size: 40px;
}

.brand-tagline {
  margin: 4px 0 0;
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
}

.divider {
  width: 1px;
  height: 32px;
  background: #e5e7eb;
}

.search-wrap input,
.admin-row input {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 260px;
  font-size: 14px;
  font-weight: 600;
}

.admin-row textarea {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 260px;
  width: min(100%, 720px);
  min-height: 140px;
  font-size: 14px;
  font-weight: 600;
  font-family: monospace;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #16a34a;
  background: #16a34a;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.btn-outline {
  background: transparent;
  color: #16a34a;
  border-color: #d1d5db;
}

.btn:hover {
  background: #15803d;
  border-color: #15803d;
}

.btn.btn-outline:hover {
  background: #f0fdf4;
  border-color: #16a34a;
}

.hero {
  padding: 42px 0 24px;
}

.hero h2 {
  font-size: 36px;
  margin: 0 0 12px;
}

.hero h2 span {
  color: #16a34a;
}

.hero p {
  max-width: 760px;
  color: #4b5563;
  line-height: 1.7;
}

.categories {
  padding: 8px 0 24px;
}

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

.category-list button {
  border: none;
  background: #ffffff;
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
  font-weight: 600;
  color: #374151;
}

.category-list button.active {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
}

.dreams {
  padding-bottom: 48px;
}

.dreams-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.card {
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.card h4 {
  margin: 10px 0 6px;
  font-size: 18px;
}

.card p {
  margin: 0 0 12px;
  color: #4b5563;
  font-size: 14px;
}

.card a {
  color: #16a34a;
  text-decoration: none;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid #e5e7eb;
  padding: 26px 0 32px;
  background: #ffffff;
}

.muted {
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
}

.detail {
  padding: 32px 0 48px;
}

.detail-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 22px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.pill {
  background: #dcfce7;
  color: #15803d;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.code {
  font-family: "Consolas", "Courier New", monospace;
  font-size: 12px;
  color: #6b7280;
}

.detail-body {
  white-space: pre-wrap;
  color: #374151;
}

.hidden {
  display: none;
}

.admin {
  padding: 32px 0 48px;
}

.admin-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  margin-bottom: 18px;
}

.admin-card h2 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.admin-card p {
  font-size: 14px;
  font-weight: 600;
}

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

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
}

.stat-label {
  font-size: 14px;
  font-weight: 700;
  color: #6b7280;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  margin-top: 6px;
}

.table-wrap {
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-wrap th {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 6px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
}

.table-wrap td {
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 6px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

.error {
  color: #b91c1c;
  margin: 8px 0 0;
}

@media (max-width: 840px) {
  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .divider {
    display: none;
  }
}
