/**
 * 认领页 · 清新白绿（与站子主页一致）
 */
:root {
  --bg: #f4fbf7;
  --bg-glow: rgba(209, 250, 229, 0.45);
  --bg-elev: #ecfdf5;
  --card: #ffffff;
  --border: #d1fae5;
  --border-strong: #bbf7d0;
  --text: #14532d;
  --muted: #5b6b63;
  --accent: #16a34a;
  --accent-hover: #15803d;
  --accent-soft: #dcfce7;
  --danger: #b91c1c;
  --radius: 12px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(22, 101, 52, 0.08);
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.55;
  background:
    radial-gradient(700px 320px at 90% -10%, var(--bg-glow), transparent 50%),
    var(--bg);
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  width: auto;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  z-index: 100;
}

.site-header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.site-header-nav {
  position: sticky;
  top: 0;
  z-index: 30;
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.site-logo {
  height: 40px;
  width: auto;
  display: block;
}

.site-logo-fallback {
  display: none;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--accent-hover);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 18px;
  color: var(--text);
}

.top-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #3f4f46;
  font-size: 0.9rem;
  font-weight: 600;
}

.top-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.top-nav a.is-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #fff;
}

.site-header__inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-title {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--accent-hover);
  text-decoration: none;
}

.site-title:hover {
  text-decoration: underline;
}

.site-tagline {
  font-size: 0.8125rem;
  color: var(--muted);
}

.site-main {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

.site-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 28px;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

.site-footer a {
  color: var(--muted);
  text-decoration: underline;
}

.site-footer a:hover {
  color: var(--accent-hover);
}

.site-footer-nav {
  margin: 0;
}

.site-footer-sep {
  margin: 0 8px;
  color: #d6d3cd;
}

.site-icp {
  margin: 12px 0 0;
  font-size: 0.8125rem;
}

.site-icp a {
  color: var(--muted);
  text-decoration: underline;
}

.site-icp a:hover {
  color: var(--accent-hover);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin-bottom: 14px;
}

.card__title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--text);
}

.card__lead {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.breadcrumbs {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.breadcrumbs .linkish {
  color: var(--accent-hover);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  font-weight: 600;
}

.breadcrumbs .linkish:hover {
  text-decoration: underline;
}

.bc-sep {
  margin: 0 6px;
  color: var(--border-strong);
}

.net-warning {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.project-grid {
  display: grid;
  gap: 10px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: linear-gradient(180deg, #fff 0%, var(--bg-elev) 100%);
}

.project-card__name {
  font-weight: 800;
  font-size: 0.95rem;
  margin: 0 0 4px;
  color: var(--text);
}

.project-card__name .unit-tag {
  font-weight: 600;
  color: #ea580c;
}

.project-card__target {
  margin: 0 0 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.project-card__actions {
  display: flex;
  justify-content: flex-end;
}

.btn-disabled {
  background: #fff;
  color: #94a3b8;
  border: 1px solid #e2e8f0;
  cursor: not-allowed;
  box-shadow: none;
}

fieldset.module {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 14px 16px;
  margin: 0 0 14px;
  background: #fff;
}

fieldset.module legend {
  padding: 0 8px;
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--accent-hover);
}

.form-row {
  margin-bottom: 12px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-row label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.req {
  color: var(--danger);
  margin-left: 2px;
}

input[type="text"],
input[type="url"],
input[type="number"],
textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(22, 163, 74, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.help {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}

ul.errorlist {
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
  color: var(--danger);
  font-size: 0.8125rem;
}

ul.errorlist.nonfield {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #fecdd3;
  background: #fff1f2;
  border-radius: 10px;
}

.qr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 520px) {
  .qr-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
  }

  .top-nav {
    display: none;
    position: absolute;
    left: 12px;
    right: 12px;
    top: 64px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    box-shadow: var(--shadow);
  }

  .top-nav.is-open {
    display: flex;
  }

  .top-nav a {
    border-radius: 10px;
  }
}

.qr-box {
  margin: 0;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.qr-box__label {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent-hover);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.qr-img {
  width: min(200px, 70vw);
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  display: block;
}

.qr-caption {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
}

.pay-note {
  font-size: 0.8125rem;
  margin: 0 0 8px;
  color: var(--text);
}

.amount-wrap {
  position: relative;
}

.amount-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 800;
  color: var(--text);
}

.amount-wrap input {
  padding-left: 30px;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 24px rgba(22, 163, 74, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.03);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.skel {
  height: 56px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(90deg, #e8f5ef, #f0fdf4, #e8f5ef);
  background-size: 200% 100%;
  animation: skel 1.1s ease-in-out infinite;
}

@keyframes skel {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: -200% 0%;
  }
}

.state-closed .card__title {
  color: var(--danger);
}

#view-list[hidden],
#view-detail[hidden],
#view-thanks[hidden],
#view-closed[hidden] {
  display: none !important;
}

.view-intro-wrap[hidden] {
  display: none !important;
}

.view-intro-wrap:not([hidden]) {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 120px);
}

.intro-scroll {
  flex: 1;
  padding-bottom: 88px;
}

.intro-poster {
  width: 100%;
  border-radius: var(--radius-sm);
  display: block;
}

.intro-content {
  margin: 0;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--text);
}

.intro-bar {
  position: sticky;
  bottom: 0;
  margin-top: 12px;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(22, 101, 52, 0.06);
}

.thanks-icon {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-hover);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 10px;
}

@media (prefers-reduced-motion: reduce) {
  .skel {
    animation: none;
  }
}
