:root {
  color-scheme: light;
  --ink: #172c27;
  --muted: #556861;
  --line: #d7e0d9;
  --green: #244d40;
  --paper: #f9faf6;
  --white: #fff;
  --radius: .75rem;
  font-family: "DM Sans","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  font-size: 100%;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1.6;
}

button,input {
  font: inherit;
}

button {
  cursor: pointer;
}

button,a,input {
  touch-action: manipulation;
}

button:focus-visible,a:focus-visible,.prompt-text:focus-visible {
  outline: 3px solid #d57936;
  outline-offset: 4px;
}

button {
  color: inherit;
}

[hidden] {
  display: none!important;
}

.wrap {
  width: min(72rem,calc(100% - 4rem));
  margin-inline: auto;
}

.topbar {
  background: var(--paper);
  border-bottom: 1px solid #dfe5df;
}

.topbar-inner {
  min-height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-weight: 750;
  font-size: 1.38rem;
  letter-spacing: .08em;
  text-decoration: none;
  color: var(--ink);
}

.mark {
  position: relative;
  display: inline-block;
  width: 1.9rem;
  height: 1.95rem;
  background: #1c4739;
  border-radius: .45rem;
  overflow: hidden;
}

.mark i {
  position: absolute;
  left: .4rem;
  width: 1.1rem;
  height: .15rem;
  border-radius: .2rem;
  background: #e2edbe;
  transform: rotate(-21deg);
}

.mark i:nth-child(1) {
  top: .58rem;
}

.mark i:nth-child(2) {
  top: .89rem;
}

.mark i:nth-child(3) {
  top: 1.2rem;
  width: .68rem;
}

.nav-button,.read,.copy,.feature-button {
  background: none;
  border: 0;
}

.nav-button {
  color: #3a5047;
  font-size: .92rem;
  padding: .55rem .2rem;
}

.nav-button:hover,.read:hover,.feature-button:hover {
  text-decoration: underline;
  text-underline-offset: .24em;
}

.hero {
  background: #183a33;
  color: #fff;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(0,.76fr);
  gap: clamp(3rem,8vw,7rem);
  align-items: center;
  padding-block: 3.6rem 3.8rem;
}

.hero-copy h1 {
  font-family: "Songti SC","STSong","Noto Serif CJK SC",Georgia,serif;
  font-size: clamp(2.9rem,5.2vw,4.6rem);
  font-weight: 650;
  line-height: 1.14;
  letter-spacing: -.045em;
  margin: 0;
}

.hero-copy p {
  max-width: 33rem;
  margin: 1.1rem 0 1.5rem;
  color: #d2e0d6;
  line-height: 1.8;
}

.search-field {
  display: flex;
  align-items: center;
  gap: .9rem;
  width: min(100%,32rem);
  min-height: 3.2rem;
  padding-inline: 1.1rem .65rem;
  background: #fff;
  border: 1px solid #e9eee7;
  border-radius: .54rem;
  color: var(--green);
}

.search-field:focus-within {
  outline: 3px solid #d4e8a4;
  outline-offset: 3px;
}

.search-field input {
  width: 100%;
  min-width: 0;
  padding: .65rem 0;
  color: var(--ink);
  border: 0;
  outline: 0;
  background: transparent;
  line-height: 1.5;
}

.search-field input::placeholder {
  color: #62736a;
  opacity: 1;
}

.search-icon {
  width: .96rem;
  height: .96rem;
  border: 2px solid currentColor;
  border-radius: 100%;
  position: relative;
  flex: none;
}

.search-icon:after {
  content: "";
  position: absolute;
  width: .42rem;
  height: 2px;
  bottom: -.17rem;
  right: -.31rem;
  background: currentColor;
  transform: rotate(45deg);
}

.feature {
  position: relative;
  isolation: isolate;
  margin: 0 1rem .3rem 0;
}

.feature-stack,.feature-stack:after {
  position: absolute;
  inset: 0;
  border-radius: .25rem;
}

.feature-stack {
  background: #a4b996;
  transform: rotate(3deg) translate(.3rem,.26rem);
  z-index: -1;
}

.feature-stack:after {
  content: "";
  background: #668b74;
  transform: rotate(3.7deg) translate(.3rem,.22rem);
  z-index: -1;
}

.feature-paper {
  position: relative;
  padding: 1.25rem 1.5rem 1.1rem;
  background: #e7efcc;
  color: #223b2d;
  border-radius: .28rem;
  box-shadow: 0 .45rem 1.2rem #10251e35;
}

.paper-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #b9c5a0;
  padding-bottom: .53rem;
  font-size: .78rem;
  color: #405342;
  letter-spacing: .07em;
}

.feature h2 {
  font-size: clamp(1.15rem,2.1vw,1.65rem);
  line-height: 1.45;
  margin: .85rem 0 .35rem;
  font-family: "Songti SC","STSong",Georgia,serif;
}

.feature p {
  font-size: .92rem;
  line-height: 1.65;
  margin: 0 0 .7rem;
  color: #445748;
}

.feature-button {
  font-size: .87rem;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .25em;
  padding: .15rem 0;
  color: #254a36;
}

.catalog {
  padding-block: 2.4rem 4rem;
}

.catalog-heading,.card-top,.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
}

.catalog-heading h2 {
  font-size: 1.6rem;
  line-height: 1.4;
  letter-spacing: -.025em;
  margin: 0;
}

#result-count {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: 1rem 0 1.45rem;
}

.filters button {
  background: transparent;
  color: #43594d;
  border: 1px solid #cdd7cc;
  border-radius: 2rem;
  font-size: .91rem;
  padding: .35rem .94rem;
  min-height: 2.28rem;
}

.filters button:hover {
  background: #e7ede5;
}

.filters button[aria-pressed="true"] {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 1rem;
}

.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.28rem .85rem;
  border: 1px solid var(--line);
  background: white;
  border-radius: var(--radius);
  box-shadow: 0 2px 4px #203d2008;
}

.category {
  font-size: .80rem;
  font-weight: 650;
  letter-spacing: .05em;
  color: #43614e;
}

.card-top {
  margin-bottom: .8rem;
}

.category-mark {
  width: .94rem;
  height: .94rem;
  position: relative;
  color: var(--accent);
  border: 1.5px solid currentColor;
  border-radius: .12rem;
  transform: rotate(-9deg);
}

.category-mark:after {
  content: "";
  position: absolute;
  inset: .13rem -.22rem -.2rem .13rem;
  border: 1.5px solid currentColor;
  border-radius: inherit;
  background: #fff;
  z-index: -1;
}

.card[data-group="0"] {
  --accent: #749276;
}

.card[data-group="1"] {
  --accent: #738eaf;
}

.card[data-group="2"] {
  --accent: #aa8465;
}

.card[data-group="3"] {
  --accent: #9c80a0;
}

.card[data-group="1"] .category {
  color: #405978;
}

.card[data-group="2"] .category {
  color: #75553d;
}

.card[data-group="3"] .category {
  color: #745677;
}

.card h3 {
  font-size: 1.18rem;
  line-height: 1.48;
  margin: 0;
}

.card-description {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  margin: .45rem 0 1rem;
  flex: 1;
}

.card-actions {
  border-top: 1px solid #e5eae4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: .45rem;
}

.read,.copy {
  font-size: .88rem;
  color: var(--green);
  padding: .3rem 0;
  min-height: 2rem;
}

.read {
  font-weight: 650;
}

.copy {
  display: flex;
  gap: .45rem;
  align-items: center;
  color: #4f6559;
  padding-inline: .43rem;
  border-radius: .3rem;
}

.copy:hover {
  background: #ecf1ea;
}

.copy-icon {
  width: .56rem;
  height: .66rem;
  border: 1.2px solid currentColor;
  border-radius: .08rem;
  position: relative;
  display: inline-block;
  margin-right: .1rem;
}

.copy-icon:after {
  content: "";
  position: absolute;
  inset: -.23rem -.24rem .14rem .14rem;
  border: 1.2px solid currentColor;
  border-radius: inherit;
  background: var(--white);
}

.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 2rem 1rem;
  text-align: center;
}

.empty h3 {
  margin: 0;
}

.empty p {
  color: var(--muted);
}

.primary {
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
  border-radius: .4rem;
  padding: .55rem 1rem;
  font-weight: 600;
}

.primary:hover {
  background: #153c2e;
}

dialog {
  border: 1px solid #bfcfc0;
  color: var(--ink);
  width: min(36rem,calc(100% - 2rem));
  max-height: 85vh;
  max-height: 85dvh;
  background: #fff;
  border-radius: .8rem;
  padding: 0;
  box-shadow: 0 1.5rem 5rem #142d2640;
}

dialog::backdrop {
  background: #0f221db3;
}

.dialog-inner {
  padding: 1.5rem 1.6rem;
}

.dialog-inner h2 {
  font-size: 1.45rem;
  line-height: 1.45;
  margin: .55rem 0;
}

.dialog-top .close {
  margin-left: auto;
  line-height: 1;
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.55rem;
  color: #415448;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.dialog-description,.guide p {
  color: var(--muted);
  margin: .35rem 0 1rem;
}

.prompt-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.85;
  border: 1px solid #dce3d6;
  border-radius: .45rem;
  background: #f4f7ef;
  padding: 1rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.guide {
  padding-left: 1.5rem;
  margin: 1rem 0 0;
}

.guide li {
  padding-left: .2rem;
}

.toast {
  position: fixed;
  z-index: 5;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: #17382e;
  border-radius: .4rem;
  margin: 0;
  max-width: calc(100% - 1.5rem);
  width: max-content;
  text-align: center;
  box-shadow: 0 .2rem .8rem #1232;
  font-size: .9rem;
}

.toast:not(:empty) {
  padding: .55rem .9rem;
}

.toast:empty {
  visibility: hidden;
}

@media(max-width:57rem) {
  .cards {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
  .hero-inner {
    gap: 2rem;
    grid-template-columns: minmax(0,1.2fr) minmax(0,.9fr);
  }
  .feature-paper {
    padding: 1rem;
  }
}

@media(max-width:43rem) {
  .wrap {
    width: calc(100% - 2.3rem);
  }
  .topbar-inner {
    min-height: 3.65rem;
  }
  .hero-inner {
    display: block;
    padding-block: 2rem 2.2rem;
  }
  .hero-copy h1 {
    font-size: 2.9rem;
  }
  .hero-copy p {
    margin: .7rem 0 1.05rem;
  }
  .feature {
    display: none;
  }
  .catalog {
    padding-top: 1.55rem;
  }
  .cards {
    gap: .75rem;
  }
  .card {
    padding: 1rem .95rem .65rem;
  }
  .dialog-inner {
    padding: 1.1rem;
  }
  .filters {
    gap: .38rem;
  }
  .filters button {
    padding-inline: .8rem;
  }
}

@media(max-width:34rem) {
  .cards {
    grid-template-columns: 1fr;
  }
  .card-top {
    margin-bottom: .55rem;
  }
  .card-description {
    margin-bottom: .8rem;
  }
  .catalog-heading h2 {
    font-size: 1.4rem;
  }
}

.clipboard-buffer {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

