/* Public artwork page (/art-board/:id, api/art-board-share/[id].js).
 * The page every social link lands on. Logged-out, server-rendered, no app
 * JS. Tokens only — design guide §1/§7; both themes via data-theme set by
 * /theme.js. */

.pa-body {
  margin: 0;
  background: var(--yeja-canvas);
  color: var(--yeja-text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  font-size: 15.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.pa-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--yeja-border);
}

.pa-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--yeja-text-primary);
  text-decoration: none;
  font-weight: 700;
}

.pa-brand .yeja-brand-logo {
  width: 20px;
  height: 20px;
}

.pa-main {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.pa-media {
  margin: 0;
  /* Hug the artwork: in a stretched grid row the frame grew to the form's
     height and floated the piece between two empty bars. Sticky keeps it in
     view while a buyer fills the form. */
  align-self: start;
  position: sticky;
  top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yeja-canvas-paper, var(--yeja-canvas));
  border-radius: 8px;
  overflow: hidden;
}

.pa-media img,
.pa-media video {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  height: auto;
  object-fit: contain;
}

.pa-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.pa-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.pa-artist {
  margin: 0;
  color: var(--yeja-text-muted);
}

.pa-artist a,
.pa-notice a {
  color: var(--yeja-text-primary);
  font-weight: 500;
}

/* Pill-shaped links are buttons visually; no link underline inside them. */
.pa-body a.yeja-pill-btn {
  text-decoration: none;
}

.pa-meta {
  margin: 0;
  font-family: var(--font-family-mono);
  font-size: 12.5px;
  color: var(--yeja-text-muted);
}

.pa-price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pa-price {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pa-description {
  margin: 0;
  color: var(--yeja-text-primary);
  white-space: pre-line;
}

.pa-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--yeja-border);
  border-radius: 16px;
}

.pa-panel h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.pa-panel p {
  margin: 0;
}

.pa-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pa-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  min-width: 0;
}

.pa-field--wide {
  grid-column: 1 / -1;
}

.pa-field input,
.pa-field select {
  font: inherit;
  color: var(--yeja-text-primary);
  background: var(--yeja-canvas);
  border: 1px solid var(--yeja-text-muted);
  border-radius: 8px;
  padding: 10px 12px;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.pa-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.pa-submit {
  grid-column: 1 / -1;
  justify-content: center;
  padding: 10px 24px;
  font-size: 15.5px;
}

.pa-fine {
  font-size: 14px;
  color: var(--yeja-text-muted);
}

.pa-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pa-actions a {
  text-decoration: none;
  padding: 10px 24px;
}

.pa-notice {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}

.pa-notice--success { background: var(--yeja-success-bg); }
.pa-notice--info    { background: var(--yeja-info-bg); }
.pa-notice--error   { background: var(--yeja-error-bg); }

.pa-body a:focus-visible,
.pa-body button:focus-visible,
.pa-body input:focus-visible,
.pa-body select:focus-visible,
.pa-body video:focus-visible {
  outline: 2px solid var(--yeja-focus);
  outline-offset: 2px;
}

@media (max-width: 800px) {
  .pa-media {
    position: static;
  }
  .pa-main {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px 16px 48px;
    gap: 24px;
  }
  .pa-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pa-body * {
    transition: none !important;
    animation: none !important;
  }
}

/* Link in bio (/links/:handle, api/_lib/profile/link-in-bio.js) */
.lib-main {
  max-width: 560px;
  margin: 0 auto;
  padding: 32px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.lib-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.lib-head a { text-decoration: none; }
.lib-bio {
  margin: 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.lib-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.lib-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--yeja-text-primary);
  text-decoration: none;
}
.lib-card img,
.lib-card__ph {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain; /* design guide §3: never crop artwork */
  border-radius: 8px;
  background: var(--yeja-canvas-paper, var(--yeja-canvas));
  display: block;
}
.lib-card__text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.lib-card__text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-card__price {
  font-family: var(--font-family-mono);
  font-size: 12.5px;
  color: var(--yeja-text-muted);
  font-variant-numeric: tabular-nums;
}
.lib-card:focus-visible { outline: 2px solid var(--yeja-focus); outline-offset: 2px; border-radius: 8px; }
.lib-foot { display: flex; justify-content: center; }
.lib-foot a { text-decoration: none; }
.pa-promo summary { cursor: pointer; font-size: 14px; }
.pa-promo[open] input { margin-top: 8px; }
.pa-form a,
.pa-panel .pa-fine a { color: inherit; text-decoration: underline; }
