:root {
  color-scheme: light;
  --ink: #17211b;
  --muted: #667069;
  --line: #d9ded8;
  --paper: #fbfaf4;
  --panel: #ffffff;
  --mint: #2f8f78;
  --coral: #e05d44;
  --sun: #f2b84b;
  --ocean: #2778a5;
  --shadow: 0 18px 48px rgba(23, 33, 27, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: var(--paper);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #fff8ec;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

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

.top-nav a {
  border-radius: 999px;
  color: var(--muted);
  padding: 10px 13px;
}

.top-nav a:hover {
  background: #edf1ec;
  color: var(--ink);
}

main {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 44px) 56px;
}

.search-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(18px, 3vw, 26px);
  padding: clamp(42px, 7vw, 82px) 0 clamp(26px, 5vw, 46px);
  text-align: center;
}

.search-copy {
  display: grid;
  justify-items: center;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 16px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin-bottom: 0;
  color: #526058;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.75;
}

.finder {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: min(860px, 100%);
}

.search-box {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 38px rgba(23, 33, 27, 0.08);
}

.search-box svg {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-left: 18px;
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-width: 2;
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 18px 0 12px;
  font-size: 17px;
}

.primary-action,
.secondary-action,
.chip,
.segment,
.icon-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  color: var(--ink);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.primary-action {
  border-color: var(--ink);
  background: var(--ink);
  color: #fffdf8;
  font-weight: 800;
}

.secondary-action {
  font-weight: 750;
}

.primary-action:hover,
.secondary-action:hover,
.chip:hover,
.segment:hover,
.icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(23, 33, 27, 0.1);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 0;
}

.chip {
  min-height: 34px;
  border-color: rgba(47, 143, 120, 0.32);
  color: #286b5c;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 750;
}

.tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 18px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.segmented {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.segment {
  white-space: nowrap;
  color: #4d5a52;
  font-size: 14px;
  font-weight: 800;
}

.segment.is-active {
  border-color: var(--mint);
  background: #eaf5ef;
  color: #14604d;
}

.view-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.select-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 0 32px 0 12px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-button[aria-pressed="true"] {
  border-color: var(--coral);
  background: #fff0ec;
  color: #b33f2c;
}

.result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.result-meta p {
  margin-bottom: 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}

.asset-card {
  grid-column: span 4;
  border: 1px solid rgba(23, 33, 27, 0.11);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(23, 33, 27, 0.07);
}

.asset-card.is-wide {
  grid-column: span 6;
}

.asset-preview {
  position: relative;
  aspect-ratio: 1.45;
  background: #e7ebe5;
  overflow: hidden;
}

.asset-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-overlay {
  position: absolute;
  inset: auto 10px 10px 10px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.asset-card:hover .asset-overlay,
.asset-card:focus-within .asset-overlay {
  opacity: 1;
  transform: translateY(0);
}

.mini-action {
  display: inline-grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(23, 33, 27, 0.86);
  color: #fff;
}

.mini-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.asset-info {
  padding: 14px 14px 15px;
}

.asset-topline,
.asset-bottomline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.asset-category {
  color: var(--ocean);
  font-size: 12px;
  font-weight: 900;
}

.asset-title {
  margin: 8px 0 10px;
  font-size: 18px;
  line-height: 1.32;
  letter-spacing: 0;
}

.asset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 26px;
}

.asset-tags span,
.dialog-tags span {
  border-radius: 999px;
  background: #f1f2ee;
  color: #59645d;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 750;
}

.asset-bottomline {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.text-button {
  border: 0;
  background: transparent;
  color: #15624e;
  font-weight: 900;
  padding: 0;
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 44px;
  text-align: center;
}

.download-board,
.license-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 44px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.favorite-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  min-width: min(520px, 100%);
}

.favorite-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 12px 6px 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.favorite-pill img {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
}

.license-band p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.asset-dialog {
  width: min(1040px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #fff;
  box-shadow: var(--shadow);
}

.asset-dialog::backdrop {
  background: rgba(23, 33, 27, 0.48);
  backdrop-filter: blur(8px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 8px;
  background: rgba(23, 33, 27, 0.72);
  color: #fff;
}

.dialog-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

.dialog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.dialog-preview {
  min-height: 520px;
  background: #e8ece6;
}

.dialog-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.dialog-info {
  padding: 38px 34px;
}

.dialog-info p {
  color: var(--muted);
  line-height: 1.78;
}

.dialog-info dl {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}

.dialog-info dl div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.dialog-info dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.dialog-info dd {
  margin: 0;
  font-weight: 850;
}

.dialog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

@media (max-width: 1080px) {
  .asset-card,
  .asset-card.is-wide {
    grid-column: span 6;
  }
}

@media (max-width: 760px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
  }

  .finder {
    grid-template-columns: 1fr;
  }

  .tool-row,
  .result-meta,
  .download-board,
  .license-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .view-tools {
    width: 100%;
    justify-content: space-between;
  }

  .asset-card,
  .asset-card.is-wide {
    grid-column: 1 / -1;
  }

  .asset-overlay {
    opacity: 1;
    transform: none;
  }

  .dialog-grid {
    grid-template-columns: 1fr;
  }

  .dialog-preview,
  .dialog-preview img {
    min-height: 320px;
  }

  .dialog-info {
    padding: 28px 20px;
  }
}
