/* Shared project preview (/s/<token>): cream canvas, white bars, one blue. Same tokens as workspace.css. */
:root {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F1F2F4;
  --ink: #111111; --ink-2: #4B5563; --ink-3: #666666; --line: #E5E7EB;
  --accent: #2A6FE0; --accent-hover: #2460C4; --accent-text: #1F5FCC; --accent-ring: #3A83F7; --accent-soft: #DCEAFF;
  --font: Inter, ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.45 var(--font); letter-spacing: -0.006em; -webkit-font-smoothing: antialiased; }
button, a { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 2px; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.sh { display: flex; flex-direction: column; height: 100%; }
/* Top bar: brand and project on the left, preview size in the middle, actions on the right. */
.sh-top { position: relative; height: 60px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 16px 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.sh-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 500; font-size: 18px; letter-spacing: -0.4px; white-space: nowrap; }
.sh-mark { width: 28px; height: 21px; background: url(/mascot.png) center / contain no-repeat; flex: none; }
.sh-sep { color: var(--line); font-size: 20px; font-weight: 300; }
.sh-title { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sh-title-row { min-width: 0; display: flex; align-items: center; gap: 8px; }
.sh-title h1 { margin: 0; font-size: 15px; line-height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-meta { margin: 0; font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sh-badge { flex: none; height: 20px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 11px; font-weight: 500; }
.sh-badge.edit { background: var(--accent-soft); color: var(--accent-text); }
.sh-grow { flex: 1; }
#shChatBtn[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }
.sh-actions { display: flex; align-items: center; gap: 6px; }
.sh-btn { height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: background-color .15s, filter .15s; }
.sh-btn.quiet { border-color: transparent; background: transparent; color: var(--ink-2); padding: 0 12px; }
.sh-btn svg { width: 15px; height: 15px; }
/* Copy to Figma: solid ink with Figma's own logo, the page's main action when the owner allows it. */
.sh-btn.figma { background: var(--ink); border-color: var(--ink); color: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.sh-btn.figma .figma-logo { width: 10px; height: 15px; }
@media (prefers-reduced-motion: reduce) { .sh-btn { transition: none; } }
/* Edit: the editor's Copy to Figma pill (dark brushed metal with a light beam running around its ring). */
/* The beam turns on the compositor: a spinning conic square (::before) behind the fill (::after), seen through the border. */
.sh-btn.primary { color: #FFFFFF; border: 1px solid transparent; border-radius: 999px; padding: 0 14px;
  position: relative; isolation: isolate; overflow: hidden; background: none; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.sh-btn.primary::before { content: ""; position: absolute; z-index: -2; left: 50%; top: 50%; width: 200%; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none;
  background: conic-gradient(#6b6f77, #f2f3f5 8%, #44474d 14%, #6b6f77 22%, #6b6f77 50%, #e4e6ea 58%, #3a3d43 64%, #6b6f77 72%); animation: shBeam 3.5s linear infinite; }
.sh-btn.primary::after { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, #3a3a3f, #0a0a0a 55%, #1c1c20); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18); }
@keyframes shBeam { to { transform: translate(-50%, -50%) rotate(1turn); } }
@media (prefers-reduced-motion: reduce) { .sh-btn.primary::before { animation: none; } }
.sh-btn:disabled { opacity: .5; cursor: progress; }
@media (hover: hover) {
  .sh-btn:not(.primary):not(:disabled):hover, .sh-pages button:not([aria-current]):hover { background: var(--surface-2); }
  .sh-btn.primary:not(:disabled):hover, .sh-btn.figma:not(:disabled):hover { filter: brightness(1.25); }
  .sh-btn.quiet:not(:disabled):hover { color: var(--ink); }
  #shChatBtn:not([aria-pressed="true"]):hover { background: var(--surface-2); }
}

.sh-body { flex: 1; min-height: 0; display: flex; }
.sh-pages { width: 240px; flex: none; overflow-y: auto; padding: 20px 12px 16px; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--line); scrollbar-width: thin; }
.sh-pages p { margin: 0 10px 10px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 500; color: var(--ink-3); }
#shCount { min-width: 20px; height: 18px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--surface-2); font-size: 11px; color: var(--ink-2); }
.sh-pages ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sh-pages button { width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: none; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.sh-pages button[aria-current] { background: var(--surface-2); color: var(--ink); font-weight: 500; }
.sh-made { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; color: var(--ink-3); font-size: 12px; text-decoration: none; }
.sh-made .sh-mark { width: 18px; height: 14px; }
@media (hover: hover) { .sh-made:hover { background: var(--surface-2); color: var(--ink); } }
/* The canvas: the editor's light grid, so a shared link feels like the design's own workspace. */
.sh-stage { flex: 1; min-width: 0; overflow: auto; padding: 40px 32px 56px; display: flex; justify-content: center; align-items: flex-start; scrollbar-width: thin;
  background-color: #F6F6F7; background-size: 16px 16px; background-attachment: local;
  background-image: linear-gradient(rgba(17, 17, 17, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(17, 17, 17, 0.045) 1px, transparent 1px); }
.sh-frame { flex: none; position: relative; border-radius: 24px; overflow: hidden; background: #FFFFFF; box-shadow: 0 0 0 1px rgba(17, 17, 17, 0.06), 0 2px 4px rgba(17, 17, 17, 0.04), 0 16px 40px rgba(17, 17, 17, 0.10); }
.sh-frame.desktop { border-radius: 10px; }
.sh-frame iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #FFFFFF; }

/* Chat panel (only when the owner shows it): the editor's chat bubbles, read only. */
.sh-chat { width: 320px; flex: none; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface); border-right: 1px solid var(--line); scrollbar-width: thin; }
.sh-chat p { margin: 0; max-width: 92%; padding: 10px 12px; border-radius: 16px; white-space: pre-wrap; word-break: break-word; }
.sh-msg-user { align-self: flex-end; background: var(--surface-2); }
.sh-msg-bot { align-self: flex-start; color: var(--ink-2); }

/* All screens: side by side like the editor's canvas, scroll sideways */
.sh-stage.all { justify-content: flex-start; }
.sh-all { display: flex; gap: 48px; margin: 0 auto; }
.sh-scr { display: flex; flex-direction: column; gap: 12px; }
.sh-name { align-self: flex-start; max-width: 100%; height: 26px; padding: 0 10px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) { .sh-name:hover { background: var(--surface-2); color: var(--ink); } }

.sh-msg { flex: 1; display: grid; place-items: center; padding: 24px; }
.sh-card { width: 100%; max-width: 380px; padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: center; }
.sh-card h2 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.sh-card p { margin: 0 0 16px; color: var(--ink-2); }
.sh-card .sh-btn { justify-content: center; }
.sh-toast { position: fixed; left: 50%; bottom: 24px; translate: -50% 0; z-index: 10; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: #FFFFFF; font-weight: 500; max-width: min(90vw, 480px); }
.sh-toast.err { background: #C4314B; }

/* Phones: pages become a scrollable row under the bar; the bar wraps instead of clipping */
@media (max-width: 760px) {
  .sh-top { height: auto; min-height: 56px; flex-wrap: wrap; padding: 8px 12px; row-gap: 8px; }
  .sh-brand span:last-child, .sh-sep { display: none; }
  /* Row 1: mark + title; row 2: sizes left, actions right */
  .sh-title { flex: 1 1 0; min-width: 0; }
  .sh-mark { width: 26px; height: 20px; }
  .sh-grow { display: none; }
  .sh-actions { margin-left: auto; }
  .sh-body { flex-direction: column; }
  .sh-pages { width: auto; padding: 8px 12px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; }
  .sh-pages p { display: none; }
  .sh-pages ul { flex-direction: row; }
  .sh-pages button { width: auto; }
  .sh-stage { padding: 16px 12px 32px; }
  .sh-meta { display: none; }
  .sh-actions { flex: 1 0 100%; justify-content: flex-end; flex-wrap: wrap; }
  .sh-made { display: none; }
  .sh-all { flex-direction: column; align-items: center; gap: 24px; margin: 0; width: 100%; }
  .sh-stage.all { justify-content: center; }
  .sh-chat { width: auto; max-height: 40vh; border-right: 0; border-bottom: 1px solid var(--line); }
}
.drop-embed .sh-top { display: none; }
.drop-embed .sh-stage { min-height: 100vh; padding: 0; overflow: hidden; }
.drop-embed .sh-frame { border-radius: 0; box-shadow: none; }
.drop-embed .sh-body { min-height: 100vh; }
.drop-embed .sh-msg { padding: 24px; }

/* Headings and the brand name use the landing hero's font. ponytail: !important beats the per-component font shorthands; scope it if a heading ever needs another face. */
:is(h1, h2, h3, .brand, .site-brand, .sb-team) { font-family: "National Park", Inter, ui-sans-serif, system-ui, sans-serif !important; font-weight: 500 !important; letter-spacing: -0.02em; }

/* The wordmark: "outclass" in ink, ".design" in gray, the hero's thin National Park (same as /welcome). */
.wm { font-family: "National Park", Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 400; letter-spacing: -0.02em; }
.wm-d { color: #8a8a91; }
