.card {
  --chat-resource-card-width: 348px;
  --chat-resource-card-min-height: 56px;
  box-sizing: border-box;
  width: var(--chat-resource-card-width);
  max-width: 100%;
  flex-shrink: 0;
  margin: var(--space-sm) 0;
  overflow: hidden;
  border: var(--panel-card-border);
  border-radius: var(--radius-chat-card);
  background: var(--panel-card-bg);
  box-shadow: var(--panel-card-shadow);
  color: var(--text);
  font-size: 0.82rem;
  animation: hana-chat-soft-up-in 130ms var(--ease-out) both;
  transition:
    background var(--duration-fast) var(--ease-out),
    border-color var(--duration-fast) var(--ease-out);
}

.interactive:hover {
  background: rgba(0, 0, 0, 0.01);
}

.disabled {
  border-style: dashed;
  background: var(--overlay-subtle, rgba(0, 0, 0, 0.03));
  box-shadow: none;
  opacity: 0.82;
}

.header {
  display: flex;
  min-width: 0;
  min-height: var(--chat-resource-card-min-height);
  align-items: stretch;
}

.main {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: var(--space-sm) 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}

button.main:focus-visible {
  outline: 1px solid rgba(0, 0, 0, 0.18);
  outline-offset: -1px;
}

.icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.titleRow {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 6px;
}

.title {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.titleMeta {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.titleTail {
  flex: 0 0 auto;
  margin-left: auto;
  padding-left: 14px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 400;
  white-space: nowrap;
}

.status {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 400;
  white-space: nowrap;
}

.status-neutral,
.status-muted {
  color: var(--text-muted);
}

.status-success {
  color: #7a9e7a;
}

.status-danger {
  color: #a67272;
}

.status-accent {
  color: var(--accent);
}

.subtitle {
  min-width: 0;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.actions {
  display: inline-flex;
  flex: 0 0 auto;
  max-width: 36%;
  align-items: center;
  justify-content: flex-end;
  padding-right: 12px;
}

.chevron {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  transform-origin: center;
  transition: transform var(--duration-fast) var(--ease-out);
}

.chevronExpanded {
  transform: rotate(90deg);
}

.details {
  border-top: 1px solid var(--overlay-light, rgba(0, 0, 0, 0.08));
}

@media (max-width: 720px) {
  .card {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card {
    animation: none;
  }
}
