/* Preview site. Same tokens as the app (kit/tokens.css), Geist, hairline elevation, one primary button. */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: "Geist", ui-sans-serif, system-ui, sans-serif; font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--accent-ink); }
.num { font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.3; margin: 0; }
h2 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
p { margin: 0; }
.ic { width: 20px; height: 20px; flex: none; }

.top { height: 56px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand .wm svg { height: 18px; width: auto; display: block; }
.top-title { font-size: 13px; color: var(--text-2); padding-left: 12px; border-left: 1px solid var(--border); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; }
.page-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.sub { color: var(--text-2); }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-2); text-decoration: none; }
.back .ic { width: 16px; height: 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-size: 12px; font-weight: 500; }

/* gallery */
.grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.g-card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; color: inherit; text-decoration: none; transition: border-color 120ms; }
.g-card:hover { border-color: var(--border-strong); }
.g-card img { width: 100%; height: auto; display: block; border-bottom: 1px solid var(--border); }
.g-body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.g-title { font-weight: 600; font-size: 15px; }
.g-note { font-size: 13px; color: var(--text-2); }

/* post page */
.layout { display: grid; gap: 24px; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: minmax(0, 1fr); } }

/* Instagram-like mock: neutral chrome in our tokens, no Instagram marks. */
.ig { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; max-width: 470px; width: 100%; }
.ig-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.ig-avatar { width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--border); display: grid; place-items: center; background: var(--surface); flex: none; }
.ig-avatar svg { width: 20px; height: 20px; display: block; }
.ig-who { flex: 1; font-size: 13px; }
.ig-more { color: var(--text); }
.ig-media { position: relative; background: var(--surface-3); }
.ig-track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none; }
.ig-track::-webkit-scrollbar { display: none; }
.ig-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; display: block; user-select: none; }
.ig-count { position: absolute; top: 12px; right: 12px; padding: 2px 8px; border-radius: 999px; background: var(--scrim); color: var(--accent-fg); font-size: 12px; }
.ig-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; padding: 0; box-shadow: var(--emboss); }
.ig-nav .ic { width: 16px; height: 16px; }
.ig-nav.prev { left: 10px; }
.ig-nav.next { right: 10px; }
.ig-nav[hidden] { display: none; }
.ig-actions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 12px 4px; }
.ig-left { display: flex; gap: 14px; }
.ig-left .ic, .ig-right .ic { width: 24px; height: 24px; }
.ig-right { justify-self: end; display: flex; }
.ig-dots { display: flex; gap: 4px; }
.ig-dots i { width: 6px; height: 6px; border-radius: 999px; background: var(--border-strong); }
.ig-dots i.on { background: var(--accent); }
.ig-caption { padding: 4px 12px 14px; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ig-caption .tagline { color: var(--accent-ink); }
.more { border: 0; background: none; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.empty-cap { color: var(--muted); font-style: normal; }

.panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel-sec { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 500 14px/1 "Geist", ui-sans-serif, system-ui, sans-serif; text-decoration: none; cursor: pointer; box-shadow: var(--emboss); transition: background-color 120ms; }
.btn:hover { background: var(--surface-2); }
.btn:active { box-shadow: var(--emboss-pressed); }
.btn.primary { background: var(--accent); border-color: var(--accent-edge); color: var(--accent-fg); box-shadow: var(--emboss-primary); }
.btn.primary:hover { background: var(--accent-hover); }
.btn:disabled { cursor: default; opacity: 0.6; }
.btn .ic { width: 16px; height: 16px; }
.btn-sm { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--accent-ink); text-decoration: none; }
.btn-sm .ic { width: 14px; height: 14px; }
.hint { font-size: 12px; color: var(--text-2); }
.hint:empty { display: none; }
.cap-src { width: 100%; resize: vertical; font: 13px/1.55 "Geist", ui-sans-serif, system-ui, sans-serif; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; box-shadow: var(--input-inset); }
.dl { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.dl li { display: flex; flex-direction: column; gap: 6px; }
.dl img { width: 100%; height: auto; display: block; border: 1px solid var(--border); border-radius: 4px; }

.themes { display: flex; flex-direction: column; gap: 8px; }
.theme-row { border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--border); }
.theme-row.light { background: var(--surface); }
.theme-row.dark { background: var(--bg); color: var(--text); border-color: var(--border); }
.theme-label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.strip { display: flex; gap: 6px; overflow-x: auto; }
.strip img { height: 120px; width: auto; display: block; border-radius: 2px; }

@media (max-width: 480px) {
  .wrap { padding: 16px 0 48px; }
  .page-head, .panel { padding: 0 16px; }
  .ig { border-left: 0; border-right: 0; border-radius: 0; max-width: none; }
  .grid { padding: 0 16px; }
}
