:root {
  color-scheme: light;
  --page: #f6f7f2;
  --surface: #fffefa;
  --ink: #18251e;
  --muted: #5e6c60;
  --green: #22513b;
  --green-dark: #163c2b;
  --sage: #e8eee2;
  --line: #dee4d9;
  --alert: #9e332c;
  --shadow: 0 15px 42px #1836220b;
  font: 15px/1.6 "Inter", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
img { max-width: 100%; }
p, h1, h2, h3 { margin: 0; }
::selection { background: #d4e6c0; }
:focus-visible { outline: 3px solid #537f41; outline-offset: 3px; }

.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.site-header { background: #fafbf6; border-bottom: 1px solid var(--line); }
.masthead { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 11px; min-width: 0; font-size: 20px; line-height: 1.1; font-weight: 760; letter-spacing: .035em; }
.brand img { flex: none; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.1; font-weight: 550; letter-spacing: .08em; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 8px 16px; border-radius: 9px; border: 1px solid transparent; font-weight: 640; font-size: 14px; line-height: 1.35; white-space: nowrap; }
.button.small { min-height: 36px; padding: 7px 12px; font-size: 13px; }
.button.primary { background: var(--green); color: #fffefa; }
.button.primary:hover { background: var(--green-dark); }
.button.outline { background: var(--surface); border-color: #d6e0d3; color: var(--green); }
.button.outline:hover, .button.quiet:hover { background: var(--sage); }
.button.quiet { background: transparent; color: var(--green); }
.button.danger { background: #a23d34; color: white; }
.button.danger:hover { background: #85312a; }
.text-link { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.muted { color: var(--muted); }

.homepage { padding-block: 36px 60px; min-height: calc(100dvh - 146px); }
.notice { padding: 12px 16px; margin-bottom: 20px; border: 1px solid #ddca9c; border-radius: 10px; background: #f7efdb; color: #624b21; }
.entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.entry { isolation: isolate; position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: end; gap: 4px; min-width: 0; min-height: 164px; overflow: hidden; padding: 22px 24px; border: 1px solid transparent; border-radius: 18px; text-align: left; }
.entry:hover .entry-arrow { transform: translate(2px, -2px); }
.entry-business { color: #f5faec; background: linear-gradient(115deg, #163e2c, #26583e); }
.entry-report { color: #214332; background: #e5eddf; border-color: #dce7d7; }
.entry::before, .entry::after { content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; }
.entry::before { width: 232px; height: 232px; border: 1px solid currentColor; right: 4%; top: -91px; opacity: .18; box-shadow: 0 0 0 25px #abc6912b, 0 0 0 53px #abc69114; }
.entry::after { width: 134px; height: 134px; border: 1px solid currentColor; right: 13%; top: -40px; opacity: .15; }
.entry-icon { width: 38px; height: 38px; border: 1px solid #ffffff37; background: #ffffff12; border-radius: 11px; display: grid; place-items: center; margin-bottom: 9px; }
.entry-report .entry-icon { background: #f4f7ee; border-color: #ccddc8; }
.entry-icon svg { width: 21px; height: 21px; }
.entry-title { font-weight: 760; font-size: 24px; letter-spacing: .025em; }
.entry-copy { font-size: 13px; color: #dbe8d8; }
.entry-report .entry-copy { color: #4e6655; }
.entry-arrow { position: absolute; display: grid; place-items: center; right: 22px; bottom: 22px; border: 1px solid #ffffff44; width: 35px; height: 35px; border-radius: 50%; font-size: 17px; transition: transform .18s ease; }
.entry-report .entry-arrow { border-color: #bbcdb7; background: #f3f7ee; }

.directory { margin-top: 40px; }
.directory-top { display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: #51705b; font-weight: 700; letter-spacing: .13em; font-size: 12px; }
.eyebrow span { width: 7px; height: 7px; background: #79985f; border-radius: 50%; }
.directory h1, .stats-card h1 { font-size: clamp(29px, 3vw, 41px); margin-top: 4px; letter-spacing: .015em; line-height: 1.25; font-weight: 780; }
.directory-top p { margin-top: 6px; font-size: 14px; color: var(--muted); }
.search { display: flex; align-items: center; gap: 9px; padding: 0 12px; height: 43px; width: min(310px, 100%); background: #fffffc; border: 1px solid #d7e1d5; border-radius: 9px; }
.search:focus-within { outline: 2px solid #759466; outline-offset: 1px; }
.search svg { flex: none; color: #586e5e; width: 20px; height: 20px; }
.search input { width: 100%; background: transparent; border: 0; outline: 0; font-size: 14px; }
.search input::placeholder { color: #647166; }
.filter-row { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-block: 19px 17px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 33px; padding: 4px 12px; border: 1px solid #dae3d7; border-radius: 100px; background: #fbfcf7; color: #3e5245; font-size: 13px; font-weight: 600; }
.chip[aria-pressed="true"] { background: #224e3b; border-color: #224e3b; color: #fffefa; }
.chip:hover:not([aria-pressed="true"]) { background: #e8eee3; }
.result-count { color: var(--muted); font-size: 13px; white-space: nowrap; font-variant-numeric: tabular-nums; }

.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.project-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); }
.project-cover { position: relative; aspect-ratio: 2.16; background: #e3ecdf; overflow: hidden; }
.project-cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-placeholder { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(ellipse at 70% 26%, #e8f1dc, #b8d0b9); }
.cover-placeholder img { width: 49px; height: 49px; opacity: .8; }
.demo-label { position: absolute; top: 12px; right: 12px; padding: 3px 8px; border-radius: 5px; background: #fffdf1; color: #324437; font-size: 11px; font-weight: 650; }
.project-body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; padding: 17px 17px 15px; }
.tag { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; color: #3a5b45; background: #eaf0e5; border-radius: 5px; font-weight: 640; font-size: 12px; line-height: 1.3; white-space: nowrap; }
.tag.amber { color: #76501d; background: #f5ead2; }
.tag.gray { color: #5a655e; background: #ecefea; }
.project-body h2 { font-size: 18px; margin: 7px 0 5px; line-height: 1.42; overflow-wrap: anywhere; }
.project-body p { color: var(--muted); margin-bottom: 14px; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.project-tail { margin-top: auto; padding-top: 11px; border-top: 1px solid #e8ece5; align-self: stretch; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.project-tail span { color: var(--muted); font-size: 12px; }
.project-tail .button { padding-inline: 9px; }
.empty { grid-column: 1 / -1; padding: 33px 20px; background: var(--surface); border: 1px dashed #cdd8ca; border-radius: 13px; text-align: center; color: var(--muted); }
.empty .button { margin-top: 12px; }

.site-footer { background: #eef2e9; border-top: 1px solid var(--line); color: #4f6354; }
.footer-inner { min-height: 70px; padding-block: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.footer-inner p { font-size: 12px; }
.footer-brand { display: flex; align-items: center; gap: 8px; color: var(--green); font-weight: 720; white-space: nowrap; }

.dialog { width: min(560px, calc(100vw - 28px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #d1dcce; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 90px #0c261b38; overflow: auto; }
.dialog.wide { width: min(740px, calc(100vw - 28px)); }
.dialog::backdrop { background: #12291f7a; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
.icon-button { flex: none; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 8px; background: #f1f4ed; color: #30523c; font-size: 25px; line-height: 1; }
.icon-button:hover { background: var(--sage); }
.dialog-content { padding: 19px 20px 23px; }
.detail-cover { width: 100%; aspect-ratio: 2.1; object-fit: cover; border-radius: 10px; margin-bottom: 15px; }
.detail-meta { display: flex; gap: 7px; align-items: center; margin-bottom: 10px; }
.detail-summary { font-weight: 620; margin-bottom: 9px; }
.paragraph { white-space: pre-wrap; overflow-wrap: anywhere; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.dialog-actions .button { min-height: 41px; }
.contact-panel { margin-top: 17px; padding: 16px; border-radius: 10px; border: 1px solid #d9e3d4; background: #f5f8ef; }
.contact-panel h3 { font-size: 16px; margin-bottom: 10px; }
.contact-panel .qr-image { width: min(190px, 100%); height: auto; margin-inline: auto; object-fit: contain; }
.qr-caption { display: block; text-align: center; color: var(--muted); margin: 5px 0 9px; font-size: 13px; }
.contact-line { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; padding: 8px 0; overflow-wrap: anywhere; }
.contact-line span { min-width: 0; }
.contact-line strong { margin-left: 6px; }
.form-grid { display: grid; gap: 13px; }
.form-grid.columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.field { display: grid; gap: 5px; min-width: 0; }
.field > span { color: #31473a; font-weight: 640; font-size: 13px; }
.field input:not([type="checkbox"]), .field select, .field textarea, .select { background: #fff; color: var(--ink); border: 1px solid #d5dfd1; border-radius: 8px; padding: 9px 10px; width: 100%; min-height: 42px; }
.field textarea { min-height: 83px; resize: vertical; }
.field input[type="file"] { padding: 7px; font-size: 13px; }
.field input[type="file"]::file-selector-button { border: 0; padding: 5px 9px; background: #e8eee2; border-radius: 5px; font: inherit; color: var(--green); margin-right: 8px; cursor: pointer; }
.form-error { color: var(--alert); margin-top: 10px; font-size: 13px; }
.form-hint { color: var(--muted); font-size: 13px; }
.report-fields { margin-top: 13px; }
.site-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
.application-block, .personal-records { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 13px; }
.application-block h3, .personal-records h3 { margin: 0 0 9px; font-size: 16px; }
.application-block .form-hint { margin-top: 7px; }
.records-intro { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.personal-record { padding: 10px 0; overflow-wrap: anywhere; }
.personal-record + .personal-record { border-top: 1px solid var(--line); }
.personal-record small { display: block; color: var(--muted); margin: 3px 0 6px; }
.qr-note { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 5px; font-size: 13px; }
.copy-helper { position: fixed; left: -10000px; top: 0; }
.toast { position: fixed; z-index: 5; bottom: max(22px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100vw - 30px); padding: 10px 15px; border: 1px solid #ffffff38; border-radius: 9px; background: #173f2c; color: white; box-shadow: 0 9px 27px #19372242; }

.stats-page { max-width: 600px; padding-block: 45px; }
.stats-card { border: 1px solid var(--line); background: var(--surface); border-radius: 17px; box-shadow: var(--shadow); padding: clamp(21px, 5vw, 34px); }
.stat-display { display: grid; gap: 3px; margin: 23px 0 16px; padding: 18px; border-radius: 13px; background: #ecf2e6; color: var(--green); }
.stat-display strong { font-size: clamp(38px, 9vw, 65px); line-height: 1.06; font-variant-numeric: tabular-nums; }
.stat-display small { font-size: 13px; }

@media (max-width: 900px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .masthead { min-height: 65px; }
  .brand { font-size: 18px; }
  .brand img { width: 34px; height: 34px; }
  .homepage { padding-block: 18px 37px; }
  .entry-grid { gap: 9px; }
  .entry { min-height: 144px; padding: 13px 11px; border-radius: 12px; gap: 2px; }
  .entry-title { font-size: 19px; }
  .entry-icon { width: 33px; height: 33px; margin-bottom: 7px; border-radius: 9px; }
  .entry-icon svg { width: 18px; height: 18px; }
  .entry-copy { font-size: 11px; max-width: 135px; line-height: 1.45; }
  .entry-arrow { right: 10px; top: 15px; bottom: auto; width: 26px; height: 26px; font-size: 13px; }
  .entry::before { right: -60px; top: -93px; }
  .directory { margin-top: 29px; }
  .directory-top { display: grid; grid-template-columns: 1fr; gap: 12px; }
  .search { width: 100%; }
  .search input, .field input, .field select, .field textarea { font-size: 16px; }
  .filter-row { gap: 8px; align-items: start; margin-block: 12px; }
  .chips { gap: 5px; }
  .chip { padding: 4px 9px; font-size: 12px; }
  .result-count { padding-top: 6px; font-size: 12px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .project-body { padding: 13px 14px; }
  .project-body h2 { font-size: 18px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .dialog-head { padding-inline: 14px; }
  .dialog-content { padding-inline: 14px; }
  .form-grid.columns { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
