/* ClipCatch web — brand accents on portfolio tokens */
html.clipcatch-html {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

.clipcatch-page {
  --cc-red: #e63946;
  --cc-red-dim: rgba(230, 57, 70, 0.18);
  --cc-red-glow: rgba(230, 57, 70, 0.45);
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

.clipcatch-page .logo-dot {
  color: var(--cc-red);
}

.clipcatch-hero {
  max-width: 40rem;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.clipcatch-hero .detail-eyebrow {
  color: var(--cc-red);
}

.clipcatch-hero .detail-title {
  margin-bottom: 0.35rem;
}

.clipcatch-hero .detail-lead {
  margin: 0 auto;
}

.clipcatch-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.clipcatch-tool {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.clipcatch-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted);
}

.clipcatch-url-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.clipcatch-url-row input[type="url"] {
  flex: 1;
  min-width: 0;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.clipcatch-url-row input[type="url"]:focus {
  border-color: var(--cc-red);
  box-shadow: 0 0 0 3px var(--cc-red-dim);
}

.clipcatch-url-row input[type="url"]::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.clipcatch-url-row .btn-paste {
  flex-shrink: 0;
  align-self: stretch;
  padding: 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.clipcatch-url-row .btn-paste:hover:not(:disabled) {
  border-color: var(--cc-red);
  background: var(--cc-red-dim);
}

.clipcatch-url-row .btn-paste:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.clipcatch-url-row .btn-paste.is-done {
  border-color: rgba(110, 231, 197, 0.5);
  color: #a7f3d0;
}

.clipcatch-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.clipcatch-form .btn-primary {
  background: var(--cc-red);
  color: #fff;
  border-color: transparent;
}

.clipcatch-form .btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 0 24px var(--cc-red-glow);
}

.clipcatch-form .btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
  box-shadow: none;
}

.clipcatch-hint {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.5;
}

.clipcatch-status {
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
  line-height: 1.5;
}

.clipcatch-status[hidden] {
  display: none;
}

.clipcatch-status--error {
  color: #ffb4b4;
  background: rgba(230, 57, 70, 0.12);
  border: 1px solid rgba(230, 57, 70, 0.35);
}

.clipcatch-status--loading {
  color: var(--muted);
  background: var(--bg-elevated);
  border: 1px dashed var(--border);
}

.clipcatch-result {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.clipcatch-result[hidden] {
  display: none;
}

/* --- compact result card --- */
.cc-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  overflow: hidden;
}

.cc-head {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem;
}

.cc-cover {
  flex-shrink: 0;
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--surface);
}

.cc-cover--empty {
  background: var(--surface);
  border: 1px dashed var(--border);
}

.cc-head-text {
  min-width: 0;
  flex: 1;
}

.cc-title {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cc-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.cc-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface);
}

.cc-author-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.cc-author-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cc-author-handle {
  font-size: 0.75rem;
  color: var(--muted);
}

.cc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cc-chip {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.cc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-top: 1px solid var(--border);
}

@media (min-width: 400px) {
  .cc-stats {
    grid-template-columns: repeat(6, 1fr);
  }
}

.cc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.55rem 0.25rem;
  background: var(--surface);
  text-align: center;
}

.cc-stat-value {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.cc-stat-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.cc-more {
  border-top: 1px solid var(--border);
}

.cc-more-summary {
  padding: 0.55rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.cc-more-summary::-webkit-details-marker {
  display: none;
}

.cc-more-summary::before {
  content: "+ ";
  color: var(--cc-red);
  font-weight: 700;
}

.cc-more[open] .cc-more-summary::before {
  content: "\2212 ";
}

.cc-more-summary:hover {
  color: var(--text);
}

.cc-more-grid {
  display: grid;
  gap: 0.35rem 1rem;
  padding: 0 0.85rem 0.75rem;
  font-size: 0.75rem;
}

@media (min-width: 480px) {
  .cc-more-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.cc-more-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.cc-more-key {
  flex-shrink: 0;
  color: var(--muted);
  font-weight: 500;
}

.cc-more-val {
  color: var(--text);
  text-align: right;
  word-break: break-all;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}

.cc-more-row a {
  color: var(--cc-red);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.75rem;
}

.cc-more-row a:hover {
  text-decoration: underline;
}

.clipcatch-status--success {
  color: #a7f3d0;
  background: rgba(110, 231, 197, 0.1);
  border: 1px solid rgba(110, 231, 197, 0.35);
}

.clipcatch-download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.clipcatch-download-row .btn-music {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(230, 57, 70, 0.55);
}

.clipcatch-download-row .btn-music:hover:not(:disabled) {
  background: var(--cc-red-dim);
  border-color: var(--cc-red);
  color: var(--text);
}

.clipcatch-download-row .btn-music:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.clipcatch-back {
  margin-top: 2.5rem;
  text-align: center;
}
