/* Reusable surface primitives. Will grow as journal/gallery/projects land. */

.card {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  padding: var(--space-6);
}

.card--soft {
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-surface);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background var(--duration-fast) var(--ease-soft);
}

.btn:hover {
  background: var(--color-primary-soft);
  color: var(--color-surface);
}

.btn--ghost {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

/* ── Attachment tiles (shared: task view + masterpiece view) ─────────────
   Rendered by /js/components/attachments.js. The grid/section wrappers stay
   page-specific (.task-view__attachments*, .mp-view__attachments*); these tile
   rules are shared here so both pages render identical attachment cards. */
.task-attach {
  display: flex;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow var(--duration-fast) var(--ease-soft),
              transform var(--duration-fast) var(--ease-soft);
}

.task-attach:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: inherit;
}

/* Photo tile: image fills the card, caption overlays on the bottom edge. */
.task-attach--photo {
  position: relative;
  aspect-ratio: 1 / 1;
  display: block;
  background: var(--color-bg-soft);
}

.task-attach--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.task-attach__caption {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-2) var(--space-3);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
  color: #fff;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Document tile: icon + filename + actions row. */
.task-attach--doc {
  align-items: stretch;
  padding: var(--space-3);
  gap: var(--space-3);
}

.task-attach__icon {
  font-size: 2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  flex-shrink: 0;
}

.task-attach__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.task-attach__filename {
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-attach__filename code {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--color-bg-soft);
  padding: 1px var(--space-1);
  border-radius: var(--radius-sm);
}

.task-attach__meta {
  font-size: 0.75rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.task-attach__actions {
  font-size: 0.85rem;
  margin-top: auto;
  padding-top: var(--space-1);
}

.task-attach__actions a {
  color: var(--color-primary);
  text-decoration: none;
}

.task-attach__actions a:hover {
  text-decoration: underline;
}

.task-attach__sep {
  color: var(--color-muted);
  margin: 0 var(--space-1);
}

/* 🛋️ 客厅编排 marker (TASK_062 M1 S2, CRSO ch63 #763 (b)) — shared so a
 * room-runner-produced message is flagged as orchestration on EVERY surface it
 * appears on (the lounge is a normal topic channel, also viewable in /channels).
 * Self-contained amber tint (page-scope-agnostic) so it renders regardless of
 * which page loads it. The lounge page adds only bubble-layout tweaks. */
.lounge-orch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #9a6f28;
  background: rgba(185, 138, 62, 0.12);
  border: 1px solid rgba(185, 138, 62, 0.34);
  border-radius: 999px;
  padding: 1px 8px;
  cursor: help;
  white-space: nowrap;
  vertical-align: baseline;
}
