:root {
  --color-text-primary: #0e0f0c;
  --color-text-secondary: #454745;
  --color-bg-main: #f7f8f3;
  --color-surface: #ffffff;
  --color-brand: #9fe870;
  --color-brand-ink: #163300;
  --color-border: rgba(14, 15, 12, 0.12);
  --radius-pill: 9999px;
  --radius-card: 30px;
  --ring-shadow: rgba(14, 15, 12, 0.12) 0 0 0 1px;
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-width: 1280px;
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--color-text-primary);
  background:
    radial-gradient(circle at 10% -15%, #e7f9d9 0, transparent 45%),
    radial-gradient(circle at 90% 120%, #e7fff1 0, transparent 40%),
    var(--color-bg-main);
}

.container {
  width: 1240px;
  margin: 0 auto;
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(247, 248, 243, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.topbar {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  text-decoration: none;
  color: var(--color-text-primary);
  font-family: 'Wise Sans', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 38px;
  font-weight: 900;
  line-height: 0.9;
  letter-spacing: -0.4px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav a {
  text-decoration: none;
  color: var(--color-text-primary);
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 600;
}

.nav a:hover {
  background: rgba(211, 242, 192, 0.4);
}

.nav .cta-link {
  background: var(--color-brand);
  color: var(--color-brand-ink);
  box-shadow: var(--ring-shadow);
  transition: transform 0.2s ease;
}

.nav .cta-link:hover {
  background: var(--color-brand);
  transform: scale(1.05);
}

main {
  padding: 12px 0 46px;
}

.hero {
  padding-top: 8px;
}

.hero h1 {
  margin: 0;
  font-family: 'Wise Sans', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 64px;
  line-height: 0.85;
  font-weight: 900;
}

.hero p {
  margin: 10px 0 0;
  color: var(--color-text-secondary);
}

.zone-switcher {
  margin-top: 8px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
}

.zone-search {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 8px;
}

.zone-tabs {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 2;
  justify-self: center;
}

.zone-btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(22, 51, 0, 0.08);
  color: var(--color-text-primary);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.zone-btn:hover {
  transform: scale(1.05);
}

.zone-btn.active {
  background: var(--color-brand);
  color: var(--color-brand-ink);
  box-shadow: var(--ring-shadow);
}

.zone-sort-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-column: 3;
  justify-self: end;
}

.zone-search-toggle,
.zone-search-submit,
.zone-search-clear {
  appearance: none;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(22, 51, 0, 0.08);
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: var(--ring-shadow);
  transition: transform 0.2s ease;
}

.zone-search-toggle:hover,
.zone-search-submit:hover,
.zone-search-clear:hover {
  transform: translateY(-1px);
}

.zone-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.zone-search-form[hidden] {
  display: none;
}

.zone-search-input {
  width: 260px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: #fdfffb;
  color: var(--color-text-primary);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
}

.zone-search-submit {
  background: var(--color-brand);
  color: var(--color-brand-ink);
}

.zone-search-clear {
  background: rgba(22, 51, 0, 0.08);
  color: var(--color-text-primary);
}

.zone-sort-btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(22, 51, 0, 0.08);
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 14px;
  min-width: 90px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.zone-sort-btn:hover {
  transform: scale(1.04);
}

.zone-sort-btn.active {
  background: var(--color-brand);
  color: var(--color-brand-ink);
  box-shadow: var(--ring-shadow);
}

.zone-sort-indicator {
  font-size: 13px;
  font-weight: 900;
  min-width: 10px;
  text-align: center;
  line-height: 1;
}

.zone-panel {
  margin-top: 8px;
  background: var(--color-surface);
  border-radius: var(--radius-card);
  box-shadow: var(--ring-shadow);
  padding: 18px;
  min-height: 640px;
}

#zone-title {
  margin: 0;
  font-family: 'Wise Sans', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 38px;
  line-height: 0.9;
  font-weight: 900;
}

.zone-list {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.zone-search-status {
  margin: 0 0 10px;
  color: #294229;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.pagination {
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pagination[hidden] {
  display: none;
}

.pagination-btn,
.pagination-page,
.pagination-current {
  min-width: 36px;
  padding: 7px 10px;
  border-radius: var(--radius-pill);
  box-shadow: var(--ring-shadow);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.pagination-btn,
.pagination-page {
  appearance: none;
  border: none;
  background: rgba(22, 51, 0, 0.08);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.pagination-btn:hover,
.pagination-page:hover {
  transform: translateY(-1px);
}

.pagination-btn:disabled,
.pagination-page:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.pagination-current {
  background: var(--color-brand);
  color: var(--color-brand-ink);
}

.project-card {
  background: #fbfdf8;
  border-radius: 16px;
  box-shadow: var(--ring-shadow);
  padding: 12px;
}

.project-card-inner {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.project-cover {
  border-radius: 12px;
  overflow: hidden;
  background: #eef4e8;
  box-shadow: inset 0 0 0 1px rgba(14, 15, 12, 0.08);
  min-height: 109px;
}

.project-cover-img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  object-fit: cover;
}

.project-cover-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 109px;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.project-main {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-content: center;
}

.meta {
  margin: 6px 0 0;
  color: var(--color-text-secondary);
  font-size: 10px;
}

.summary {
  margin: 0;
  font-family:
    'PingFang SC',
    'SF Pro Text',
    'Microsoft YaHei',
    'Noto Sans SC',
    'Hiragino Sans',
    'Hiragino Sans GB',
    'Noto Sans CJK SC',
    'Segoe UI',
    'Inter',
    'Helvetica Neue',
    Helvetica,
    Arial,
    sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.72;
  letter-spacing: 0.01em;
  color: #284040;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  text-wrap: pretty;
}

.project-title {
  margin: 0;
  font-family:
    'PingFang SC',
    'SF Pro Display',
    'Microsoft YaHei',
    'Noto Sans SC',
    'Hiragino Sans',
    'Hiragino Sans GB',
    'Noto Sans CJK SC',
    'Segoe UI',
    'Inter',
    'Helvetica Neue',
    Helvetica,
    Arial,
    sans-serif;
  font-size: 19px;
  line-height: 1.24;
  letter-spacing: 0.01em;
  font-weight: 700;
  color: #112827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  text-wrap: balance;
}

.project-side-actions {
  justify-self: end;
  align-self: stretch;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 96px;
}

.project-view-btn,
.project-rate-btn,
.project-report-btn {
  appearance: none;
  border: none;
  border-radius: var(--radius-pill);
  box-shadow: var(--ring-shadow);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 8px;
  width: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.project-view-btn {
  background: var(--color-brand);
  color: var(--color-brand-ink);
  box-shadow:
    inset 0 0 0 1px rgba(22, 51, 0, 0.14),
    0 5px 10px rgba(126, 217, 87, 0.28);
}

.project-view-btn:hover,
.project-rate-btn:hover,
.project-report-btn:hover {
  transform: translateY(-1px);
}

.project-view-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: var(--ring-shadow);
  transform: none;
}

.project-rate-btn {
  background: rgba(22, 51, 0, 0.08);
  color: var(--color-text-primary);
}

.project-report-btn {
  background: #f9edef;
  color: #8b2a30;
  box-shadow: inset 0 0 0 1px rgba(139, 42, 48, 0.2);
}

.project-side-actions .meta {
  margin: 0;
  text-align: center;
  font-size: 14px;
}

.project-side-score {
  width: 96px;
  margin-bottom: 0;
  margin-left: 0;
  line-height: 1.2;
}

.project-side-score strong,
.project-side-score em {
  display: block;
}

.project-side-score strong {
  margin-top: 4px;
  color: #2b3b27;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-align: center;
}

.project-side-score em {
  margin-top: 2px;
  font-style: normal;
  font-size: 10px;
  color: #5b6658;
  text-align: center;
}

.project-side-buttons {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 96px;
  margin-left: 0;
  gap: 4px;
  margin-top: 6px;
}

.empty {
  border-radius: 14px;
  box-shadow: var(--ring-shadow);
  padding: 12px;
  background: #fbfdf8;
  color: var(--color-text-secondary);
  font-size: 13px;
}

.pdf-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 15, 12, 0.55);
  backdrop-filter: blur(2px);
  padding: 24px;
}

.pdf-preview-overlay[hidden] {
  display: none;
}

.pdf-preview-modal {
  width: min(1120px, calc(100vw - 48px));
  height: min(86vh, 920px);
  background: var(--color-surface);
  border-radius: 20px;
  box-shadow: var(--ring-shadow);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.pdf-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

.pdf-preview-head h2 {
  margin: 0;
  font-size: 22px;
  font-family: 'Wise Sans', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1;
}

.pdf-preview-close {
  appearance: none;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(22, 51, 0, 0.08);
  color: var(--color-text-primary);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--ring-shadow);
}

.pdf-preview-frame {
  position: relative;
  width: 100%;
  height: 100%;
  background: #eef3e8;
  overflow: hidden;
}

.pdf-preview-loading {
  position: absolute;
  inset: 0;
  display: none !important;
  place-items: center;
  font-size: 14px;
  color: var(--color-text-secondary);
  z-index: 2;
  pointer-events: none;
}

.pdf-preview-error {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  border-radius: 9999px;
  background: #feeceb;
  color: #8b2a30;
  box-shadow: var(--ring-shadow);
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.25;
  z-index: 3;
}

.pdf-preview-scroll {
  height: 100%;
  overflow: auto;
  padding: 14px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.pdf-page-shell {
  border-radius: 12px;
  background: #ffffff;
  box-shadow: rgba(14, 15, 12, 0.12) 0 8px 20px -16px, var(--ring-shadow);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.pdf-page-loading {
  color: var(--color-text-secondary);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.pdf-page-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.pdf-preview-fallback-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: #f8fbf4;
}

.rate-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 15, 12, 0.55);
  backdrop-filter: blur(2px);
  padding: 18px;
}

.rate-modal-overlay[hidden] {
  display: none;
}

.rate-modal {
  width: min(500px, calc(100vw - 36px));
  border-radius: 18px;
  background: #ffffff;
  box-shadow: rgba(14, 15, 12, 0.12) 0 8px 24px -16px, var(--ring-shadow);
  padding: 16px;
}

.rate-modal-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 0.95;
  font-family: 'Wise Sans', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.rate-form {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.rate-form label {
  font-size: 14px;
  font-weight: 700;
}

.rate-form input[type='number'] {
  font: inherit;
  border: 1px solid rgba(14, 15, 12, 0.12);
  border-radius: var(--radius-pill);
  padding: 10px 12px;
  background: #fdfffb;
  width: 100%;
  text-align: center;
  font-weight: 700;
  color: #475146;
}

.rate-form input[type='number']::-webkit-outer-spin-button,
.rate-form input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.rate-form input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.rate-modal-actions {
  margin-top: 2px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.rate-modal-actions button {
  appearance: none;
  border: none;
  border-radius: var(--radius-pill);
  box-shadow: var(--ring-shadow);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 14px;
  background: var(--color-brand);
  color: var(--color-brand-ink);
}

.rate-modal-actions .subtle-btn {
  background: rgba(22, 51, 0, 0.08);
  color: var(--color-text-primary);
}

.report-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 15, 12, 0.55);
  backdrop-filter: blur(2px);
  padding: 18px;
}

.report-modal-overlay[hidden] {
  display: none;
}

.report-modal {
  width: min(560px, calc(100vw - 36px));
  border-radius: 18px;
  background: #ffffff;
  box-shadow: rgba(14, 15, 12, 0.12) 0 8px 24px -16px, var(--ring-shadow);
  padding: 16px;
}

.report-modal-head h2 {
  margin: 0;
  font-size: 30px;
  line-height: 0.95;
  font-family: 'Wise Sans', 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.report-form {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.report-form label {
  font-size: 14px;
  font-weight: 700;
}

.report-form textarea {
  font: inherit;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fdfffb;
  resize: vertical;
}

.report-modal-actions {
  margin-top: 2px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.report-modal-actions button {
  appearance: none;
  border: none;
  border-radius: var(--radius-pill);
  box-shadow: var(--ring-shadow);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 10px 14px;
  background: var(--color-brand);
  color: var(--color-brand-ink);
}

.report-modal-actions .subtle-btn {
  background: rgba(22, 51, 0, 0.08);
  color: var(--color-text-primary);
}
