/* Icon Toolbox — extends shared monochrome language */

.icon-hero {
  min-height: calc(100dvh - var(--nav-h) - 8rem);
  display: grid;
  align-content: center;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  padding-top: clamp(1rem, 3vw, 2rem);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.icon-hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  font-weight: 560;
  letter-spacing: -0.035em;
  line-height: 1.05;
  max-width: 14ch;
  animation: rise 0.85s var(--ease-out) 0.12s both;
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0;
  width: 100%;
  max-width: min(640px, 100%);
  min-width: 0;
  animation: rise 0.9s var(--ease-out) 0.28s both;
  box-shadow: inset 0 -1px 0 var(--line);
}

.search-bar input[type="search"],
.search-bar input[type="text"] {
  appearance: none;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 56px;
  padding: 0 0.25rem 0 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--fg);
  font: inherit;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.search-bar input::placeholder {
  color: var(--muted);
  opacity: 0.85;
}

.search-bar .btn {
  min-height: 56px;
  padding: 0 1.25rem;
  flex-shrink: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  animation: rise 0.9s var(--ease-out) 0.34s both;
}

.filter-label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.25rem;
}

.chip {
  min-height: 36px;
  padding: 0 0.9rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: color 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.chip:hover {
  color: var(--fg);
  background: var(--glow);
}

.chip.is-active {
  color: var(--bg);
  background: var(--fg);
  box-shadow: none;
}

.status-line {
  min-height: 1.4em;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 100%;
  overflow-wrap: anywhere;
  animation: rise 0.7s var(--ease-out) both;
}

.status-line.is-error {
  color: var(--fg);
}

/* Results grid — borderless rows, not cards */
.results {
  display: grid;
  gap: 0;
  margin-top: 1.5rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.result-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 1.15rem;
  align-items: center;
  padding: 1.35rem 0;
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  cursor: pointer;
  transition: background 0.35s var(--ease), transform 0.35s var(--ease);
  animation: rise 0.6s var(--ease-out) both;
}

.result-item + .result-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.result-item:hover {
  background: var(--glow);
}

.result-item:focus-visible {
  outline: 1px solid var(--fg);
  outline-offset: 4px;
}

.result-icon {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 16px;
  background: var(--dim);
  display: block;
  flex-shrink: 0;
}

.result-meta {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.result-meta h3 {
  font-size: 1.05rem;
  font-weight: 550;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-meta p {
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-meta .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.45rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
  max-width: 100%;
}

.result-chevron {
  width: 20px;
  height: 20px;
  color: var(--muted);
  flex-shrink: 0;
  transition: color 0.3s var(--ease), transform 0.35s var(--ease);
}

.result-item:hover .result-chevron {
  color: var(--fg);
  transform: translateX(3px);
}

/* Detail view */
.detail {
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  padding-top: clamp(1rem, 4vw, 2.5rem);
  min-width: 0;
  overflow-x: clip;
}

.detail-head {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2.5rem;
  min-width: 0;
}

.detail-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  object-fit: cover;
  background: var(--dim);
  animation: rise 0.7s var(--ease-out) both;
}

.detail-head > div {
  min-width: 0;
  max-width: 100%;
}

.detail-head h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-head .artist {
  color: var(--muted);
  margin-top: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-head .sub {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.size-grid {
  display: grid;
  gap: 0;
  width: 100%;
  min-width: 0;
}

.size-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 1.15rem;
  align-items: center;
  padding: 1.35rem 0;
  position: relative;
  min-width: 0;
  max-width: 100%;
}

.size-row + .size-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.size-preview {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  object-fit: cover;
  background: var(--dim);
}

.size-info {
  min-width: 0;
}

.size-info .label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.size-info .title {
  font-size: 1.05rem;
  font-weight: 550;
  letter-spacing: -0.015em;
}

.size-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  min-width: 0;
}

.size-actions .btn {
  max-width: 100%;
}

.mono-id {
  font-family: var(--mono);
  font-size: 0.85rem;
  word-break: break-all;
  overflow-wrap: anywhere;
  min-width: 0;
}

.detail .field-value {
  min-width: 0;
}

.detail .field-value a {
  display: block;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.empty-state {
  padding: 3rem 0;
  color: var(--muted);
  text-align: left;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.loading-orbit {
  width: 56px;
  height: 56px;
  margin: 2rem 0;
  position: relative;
}

.loading-orbit .orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line);
  animation: spin 6s linear infinite;
}

.loading-orbit .orbit-ring::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--fg);
}

.loading-orbit .orbit-core {
  position: absolute;
  inset: 30%;
  border-radius: 50%;
  background: var(--fg);
  animation: corePulse 1.8s var(--ease) infinite;
}

@media (max-width: 640px) {
  .icon-hero h1 {
    max-width: none;
  }

  .detail-head {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 1rem;
  }

  .detail-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }

  .result-item {
    grid-template-columns: 60px minmax(0, 1fr) auto;
    gap: 0.9rem;
  }

  .result-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }

  .size-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.9rem;
  }

  .size-preview {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }

  .size-actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .size-actions .btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .search-bar {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    box-shadow: none;
  }

  .search-bar input {
    box-shadow: inset 0 -1px 0 var(--line);
  }

  .result-actions {
    width: 100%;
  }

  .result-actions .btn {
    max-width: 100%;
  }
}
