:root {
  --bg: #f5f6f4;
  --paper: #ffffff;
  --ink: #11191d;
  --muted: #687780;
  --line: #d8e1e3;
  --green: #08705f;
  --green-dark: #054e43;
  --red: #c8422e;
  --blue: #255f91;
  --amber: #a66a16;
  --violet: #6a4bb2;
  --shadow: 0 18px 46px rgba(22, 32, 36, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.stock-app {
  width: 100%;
  margin: 0 auto;
  padding: 14px clamp(14px, 1.6vw, 30px) 56px;
}

.home-hero {
  position: relative;
  overflow: hidden;
  min-height: 470px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(10, 17, 16, 0.82) 0%, rgba(10, 17, 16, 0.66) 47%, rgba(10, 17, 16, 0.2) 100%),
    url("images/ajimeguri-fv-concept.png") center 48% / cover;
  margin-top: 18px;
}

.hero-content {
  width: 100%;
  padding: 74px clamp(18px, 3.4vw, 54px) 56px;
  color: #fff;
}

.eyebrow,
.toolbar-kicker {
  margin: 0 0 8px;
  color: #73d2bd;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 48px;
  line-height: 1.08;
}

.hero-lead {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
  line-height: 1.75;
}

.hero-search {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 104px;
  gap: 10px;
  align-items: end;
  width: 100%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  margin-top: 28px;
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
}

label,
.color-palette {
  display: grid;
  gap: 7px;
}

label span,
.color-palette > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  color: var(--ink);
  padding: 9px 12px;
}

.main-search input {
  min-height: 56px;
  border-color: #c4d1d4;
  font-size: 17px;
}

.primary-search {
  min-height: 56px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  padding: 10px 14px;
  font-weight: 800;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(8, 112, 95, 0.24);
  outline-offset: 2px;
}

.trend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.trend-row span {
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 800;
}

.trend-button {
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.trend-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.reset-trend {
  margin-left: 4px;
  border-color: rgba(115, 210, 189, 0.62);
  background: rgba(115, 210, 189, 0.16);
}

.asset-mode-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.beta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 18px;
  align-items: center;
  border: 1px solid rgba(8, 112, 95, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 112, 95, 0.09), rgba(255, 255, 255, 0) 48%),
    var(--paper);
  margin: 16px 0;
  padding: 18px;
}

.beta-panel h2 {
  margin: 6px 0 0;
  font-size: 22px;
  line-height: 1.35;
}

.beta-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.beta-panel ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.beta-panel li {
  border: 1px solid #d8e9e5;
  border-radius: 8px;
  background: #f5fbf9;
  color: #28443d;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 900;
}

.beta-panel li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
}

.blueprint-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.blueprint-strip article,
.operations-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(22, 32, 36, 0.05);
}

.blueprint-strip article {
  position: relative;
  overflow: hidden;
  min-height: 154px;
  padding: 18px;
}

.blueprint-strip article::after {
  content: "";
  position: absolute;
  inset: auto -34px -48px auto;
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background: rgba(8, 112, 95, 0.08);
}

.blueprint-strip span,
.section-kicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.blueprint-strip h2,
.operations-card h2 {
  margin: 9px 0 0;
  font-size: 20px;
  line-height: 1.35;
}

.blueprint-strip p,
.operations-card p,
.operations-card li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.blueprint-strip p {
  margin: 9px 0 0;
}

.mode-card,
.intent-card,
.view-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 800;
}

.mode-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px;
  text-align: left;
}

.mode-card span {
  color: var(--muted);
  font-size: 13px;
}

.mode-card strong {
  color: var(--green);
  font-size: 24px;
}

.mode-card.is-active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

.discover-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.intent-card {
  min-height: 106px;
  padding: 16px;
  text-align: left;
}

.intent-card span {
  display: block;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.intent-card strong {
  display: block;
  margin-top: 8px;
  font-size: 17px;
  line-height: 1.35;
}

.intent-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.intent-card:hover,
.view-button:hover {
  border-color: #b9c8cc;
  background: #f8fbfa;
}

.intent-card.is-active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green), 0 10px 24px rgba(8, 112, 95, 0.12);
}

.stock-layout {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  gap: 20px;
}

.filter-panel {
  position: sticky;
  top: 72px;
  align-self: start;
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 14px;
}

.panel-heading,
.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2,
.results-toolbar h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

.panel-heading span {
  border-radius: 999px;
  background: #edf5f2;
  color: var(--green);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

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

.swatches button {
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: 0 0 0 1px #cbd7d9;
}

.swatches button.is-active {
  box-shadow: 0 0 0 3px rgba(8, 112, 95, 0.24), 0 0 0 1px #cbd7d9;
}

.quality-note {
  border: 1px solid #d6dfed;
  border-radius: 8px;
  background: linear-gradient(135deg, #f0f6fb 0%, #ffffff 72%);
  padding: 13px;
}

.quality-note strong {
  display: block;
  color: var(--blue);
  font-size: 14px;
  line-height: 1.5;
}

.quality-note p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.results-area {
  min-width: 0;
}

.results-toolbar {
  margin-bottom: 12px;
}

.toolbar-kicker {
  margin-bottom: 4px;
  color: var(--green);
}

.view-tools {
  display: flex;
  gap: 8px;
}

.view-button {
  min-height: 38px;
  padding: 8px 12px;
}

.view-button.is-active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.license-band {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  border: 1px solid #eadcc4;
  border-radius: 8px;
  background: #fff8ec;
  color: #594025;
  margin-bottom: 12px;
  padding: 11px 13px;
  font-size: 13px;
}

.license-band strong {
  color: #342514;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 32px;
  margin-bottom: 12px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e8f0ed;
  color: #3d514b;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.asset-grid.is-compact {
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

.asset-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(22, 32, 36, 0.06);
}

.asset-card:hover {
  transform: translateY(-2px);
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: var(--shadow);
}

.asset-open {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.thumb-wrap {
  position: relative;
  display: block;
}

.thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #e8eef0;
}

.quick-overlay {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

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

.quick-overlay span {
  border-radius: 999px;
  background: rgba(17, 25, 29, 0.78);
  color: #fff;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}

.asset-body {
  padding: 12px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}

.badge.free {
  background: rgba(8, 112, 95, 0.12);
  color: var(--green);
}

.badge.sale {
  background: rgba(200, 66, 46, 0.12);
  color: var(--red);
}

.badge.review {
  background: rgba(37, 95, 145, 0.12);
  color: var(--blue);
}

.badge.rank {
  background: rgba(106, 75, 178, 0.12);
  color: var(--violet);
}

.badge.original {
  background: rgba(166, 106, 22, 0.14);
  color: var(--amber);
}

.asset-card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.asset-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.asset-id {
  display: block;
  margin-top: 8px;
  color: #829098;
  font-size: 11px;
  font-weight: 800;
}

.asset-details-button {
  margin-top: 11px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7faf9;
  color: var(--green);
  padding: 7px 10px;
  font-size: 13px;
  font-weight: 800;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.tag-list span {
  color: #52626b;
  font-size: 12px;
}

.empty-state {
  border: 1px dashed #b9c8cc;
  border-radius: 8px;
  background: var(--paper);
  margin: 0;
  padding: 30px;
  color: var(--muted);
  text-align: center;
}

.detail-dialog {
  width: min(1080px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.detail-dialog::backdrop {
  background: rgba(12, 19, 23, 0.58);
}

.icon-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(17, 25, 29, 0.72);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
}

.detail-image {
  width: 100%;
  height: 100%;
  min-height: 500px;
  max-height: min(76vh, 720px);
  object-fit: contain;
  background: #10171b;
}

.detail-info {
  padding: 28px;
}

.detail-info h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.35;
}

.detail-info p {
  color: var(--muted);
  line-height: 1.8;
}

.detail-table {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 9px 12px;
  margin: 18px 0;
  font-size: 14px;
}

.detail-table dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-table dd {
  margin: 0;
}

.operations-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 14px;
  margin-top: 24px;
}

.operations-card {
  padding: 22px;
}

.operations-card:first-child {
  grid-row: span 2;
}

.section-kicker {
  margin: 0;
}

.taxonomy-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.taxonomy-columns > div {
  border: 1px solid #e3eaec;
  border-radius: 8px;
  background: #fbfcfc;
  padding: 14px;
}

.taxonomy-columns h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.taxonomy-columns ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.taxonomy-columns li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 8px;
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 12px;
}

.workflow-rail span {
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px solid #d6e2e0;
  border-radius: 8px;
  background: #f1f8f6;
  color: var(--green-dark);
  padding: 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.contribute-card {
  background:
    linear-gradient(135deg, rgba(200, 66, 46, 0.08), rgba(255, 255, 255, 0) 48%),
    var(--paper);
}

.review-list {
  display: grid;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  margin: 16px 0 0;
  padding: 12px;
}

.review-list span {
  color: #40544e;
  font-size: 13px;
  font-weight: 800;
}

.download-rules {
  display: grid;
  gap: 7px;
  border: 1px solid #eadcc4;
  border-radius: 8px;
  background: #fff8ec;
  margin: 16px 0 0;
  padding: 12px;
}

.download-rules strong {
  color: #342514;
  font-size: 14px;
}

.download-rules span {
  color: #594025;
  font-size: 13px;
  line-height: 1.6;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 14px;
  text-decoration: none;
  font-weight: 800;
}

.primary-button {
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 14px;
}

@media (max-width: 1200px) {
  .home-hero {
    min-height: 420px;
  }
}

@media (max-width: 940px) {
  .stock-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-heading,
  .quality-note {
    grid-column: 1 / -1;
  }

  .asset-mode-strip,
  .beta-panel,
  .blueprint-strip,
  .discover-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operations-grid,
  .taxonomy-columns {
    grid-template-columns: 1fr;
  }

  .operations-card:first-child {
    grid-row: auto;
  }

  .asset-grid,
  .asset-grid.is-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .stock-app {
    width: 100%;
    padding-inline: 9px;
    padding-top: 8px;
  }

  .home-hero {
    min-height: 0;
  }

  .hero-content {
    padding: 42px 12px 36px;
  }

  h1 {
    font-size: 32px;
  }

  .hero-search {
    grid-template-columns: 1fr;
  }

  .asset-mode-strip,
  .beta-panel,
  .blueprint-strip,
  .discover-strip,
  .filter-panel,
  .asset-grid,
  .asset-grid.is-compact,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .operations-grid,
  .workflow-rail {
    grid-template-columns: 1fr;
  }

  .results-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .view-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .detail-image {
    min-height: 260px;
    max-height: 62vh;
  }

  .detail-info {
    padding: 20px;
  }
}
