:root {
  color-scheme: light;
  --ink: #18251e;
  --muted: #536258;
  --paper: #f7f7f1;
  --white: #fff;
  --line: #dbe0d7;
  --green: #244c37;
  --lime: #d7ee8b;
  font-family: "Inter", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #6a9734; outline-offset: 4px; }
.wrap { width: min(1184px, calc(100% - 88px)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: #fcfcf8; }
.nav { display: flex; align-items: center; min-height: 73px; gap: 32px; }
.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; font-size: 17px; font-weight: 750; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--lime); background: var(--green); font-size: 21px; }
.nav-library { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav-library:hover { color: var(--green); text-decoration: underline; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 42px; border: 1px solid transparent; border-radius: 9px; padding: 8px 17px; font-weight: 700; font-size: 14px; line-height: 1.25; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button:disabled { opacity: .6; cursor: wait; }
.outline { color: var(--green); background: transparent; border-color: #b6c3b7; }
.outline:hover { background: #e9efe5; }
.primary { color: var(--ink); background: var(--lime); border-color: #c4dd73; }
.primary:hover { background: #c8e674; }
.hero { display: grid; grid-template-columns: .86fr 1.14fr; margin-top: 36px; border-radius: 20px; overflow: hidden; background: #e9eee0; }
.hero-copy { align-self: center; padding: 40px 52px; }
.hero h1 { margin: 0; font-size: clamp(44px, 5.1vw, 76px); line-height: 1.12; letter-spacing: -.055em; font-weight: 850; }
.hero h1 span { color: #4d783e; }
.hero p { max-width: 330px; margin: 23px 0 24px; color: #425549; line-height: 1.85; font-size: 15px; }
.hero-image { display: block; width: 100%; height: 100%; min-height: 352px; max-height: 410px; object-fit: cover; object-position: 52% 55%; }
.hero.image-left { grid-template-columns: 1.14fr .86fr; }
.hero.image-left .hero-image { order: -1; }
.library { padding-top: 46px; scroll-margin-top: 24px; }
.library-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
h2 { margin: 0; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.035em; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.65; }
.library-head p { margin: 7px 0 0; }
.search { display: flex; align-items: center; gap: 10px; width: min(100%, 360px); min-height: 47px; padding-inline: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.search span { color: var(--green); font-size: 25px; line-height: 1; }
.search input { width: 100%; min-width: 0; padding-block: 11px; border: 0; background: transparent; color: var(--ink); font-size: 14px; }
.search:focus-within { outline: 2px solid #6a9734; }
.search input:focus-visible { outline: 0; }
.entries { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 18px; }
.card { display: flex; flex-direction: column; gap: 10px; min-height: 194px; padding: 21px; text-align: left; border-radius: 13px; border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; }
.card:hover { border-color: #789680; box-shadow: 0 4px 15px #233d2510; }
.card-top, .card-end { display: flex; align-items: center; gap: 9px; justify-content: space-between; }
.format { border-radius: 6px; padding: 5px 8px; color: #2b563c; background: #eaf1e5; font-size: 11px; font-weight: 800; letter-spacing: .035em; white-space: nowrap; }
.card .sample { color: var(--muted); font-size: 12px; }
.card strong { font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.card .summary { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.card-end { padding-top: 7px; margin-top: auto; color: var(--muted); font-size: 12px; }
.card-end .arrow { color: var(--green); font-size: 20px; }
.empty { grid-column: 1 / -1; padding: 25px; border: 1px dashed #bbc7b9; border-radius: 10px; }
.footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 44px; padding-block: 19px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 26px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #fcfcf8; box-shadow: 0 16px 75px #16241e36; }
dialog::backdrop { background: #18251e83; }
.dialog-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; overflow-wrap: anywhere; }
.close { flex: 0 0 35px; height: 35px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-size: 21px; cursor: pointer; }
.field { display: grid; gap: 6px; margin: 14px 0; font-size: 14px; font-weight: 700; }
.field input, .field textarea { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); font-weight: 400; }
.field textarea { resize: vertical; }
.attachment-picker .muted { font-weight: 400; }
.selected-files, .attachments { margin: 8px 0; padding: 0; list-style: none; }
.selected-files li { padding: 5px 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
progress { width: 100%; accent-color: var(--green); }
#submit-status { margin: 6px 0; font-size: 14px; }
.error { color: #9c2e22; }
.form-actions { display: flex; justify-content: end; gap: 10px; margin-top: 16px; }
.detail { width: min(900px, calc(100% - 24px)); }
.detail h3 { font-size: 16px; }
.description { white-space: pre-wrap; line-height: 1.7; overflow-wrap: anywhere; }
.preview { margin-top: 16px; overflow: hidden; border-radius: 9px; background: #edf0e9; }
.preview iframe, .preview video { display: block; width: 100%; border: 0; }
.preview iframe { height: min(57vh, 570px); }
.preview video { max-height: 57vh; background: #18251e; }
.preview p { padding: 10px 14px; }
.attachments li { display: flex; align-items: center; gap: 9px; padding: 11px 0; border-top: 1px solid var(--line); }
.attachments .name { min-width: 0; margin-right: auto; overflow-wrap: anywhere; }
.attachments .name small { display: block; margin-top: 4px; color: var(--muted); }
.attachments .button { min-height: 34px; padding: 6px 9px; }
@media (max-width: 850px) {
  .wrap { width: calc(100% - 40px); }
  .hero-copy { padding: 35px 29px; }
  .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 570px) {
  .wrap { width: calc(100% - 28px); }
  .nav { min-height: 63px; gap: 10px; }
  .brand { gap: 7px; font-size: 15px; }
  .brand-mark { width: 30px; height: 30px; font-size: 18px; }
  .nav-library { display: none; }
  .nav .button { padding: 7px 10px; }
  .hero { grid-template-columns: 1fr; margin-top: 19px; }
  .hero.image-left { grid-template-columns: 1fr; }
  .hero-copy { padding: 28px 24px; }
  .hero h1 { font-size: 48px; }
  .hero p { margin: 13px 0 16px; }
  .hero-image { min-height: 0; height: 195px; }
  .library { padding-top: 30px; }
  .library-head { align-items: stretch; flex-direction: column; }
  .search { width: 100%; }
  .entries { grid-template-columns: 1fr; }
  .card { min-height: 157px; }
  dialog { padding: 16px; }
}
