:root {
  --sf-bg: #ffffff;
  --sf-paper: #ffffff;
  --sf-ink: #121212;
  --sf-muted: #6d6d6d;
  --sf-line: #e5e5e5;
  --sf-accent: #121212;
  --sf-on-accent: #ffffff;
  --sf-soft: #f5f5f5;
  --sf-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sf-width: 1200px;
  --sf-radius: 4px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sf-sans);
  background: var(--sf-bg);
  color: var(--sf-ink);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.5; cursor: default; }

.sf-wrap { min-height: 100vh; display: flex; flex-direction: column; background: var(--sf-bg); }
.sf-inner { width: min(var(--sf-width), calc(100% - 40px)); margin: 0 auto; }

.sf-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--sf-paper);
  border-bottom: 1px solid var(--sf-line);
}
.sf-header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 72px;
}
.sf-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sf-brand img, .sf-brand-mark {
  width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
  background: var(--sf-soft); flex-shrink: 0;
}
.sf-brand-name {
  font-size: 18px; font-weight: 600; letter-spacing: -0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sf-nav {
  display: flex; align-items: center; gap: 28px;
  font-size: 14px; font-weight: 500;
}
.sf-nav a { color: var(--sf-ink); opacity: 0.78; }
.sf-nav a:hover, .sf-nav a.is-on { opacity: 1; text-decoration: underline; text-underline-offset: 6px; }
.sf-header-actions { display: flex; align-items: center; gap: 8px; }
.sf-icon-btn, .sf-cart-btn {
  border: 0; background: transparent;
  height: 40px; min-width: 40px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 14px; font-weight: 500;
}
.sf-cart-count { font-variant-numeric: tabular-nums; }
.sf-menu-btn { display: none; }

.sf-banner {
  position: relative;
  min-height: min(68vh, 560px);
  background: var(--sf-soft);
  display: flex; align-items: center;
  overflow: hidden;
}
.sf-banner img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.sf-banner-shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.72) 42%, rgba(255,255,255,0.18) 100%);
}
.sf-banner-copy { position: relative; z-index: 1; padding: 72px 0; max-width: 34em; }
.sf-banner h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700; letter-spacing: -0.035em; line-height: 1.05;
  margin: 0 0 16px;
}
.sf-banner p { font-size: 16px; color: var(--sf-muted); margin: 0 0 28px; max-width: 32em; }

.sf-btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 28px; border-radius: var(--sf-radius); border: 1px solid var(--sf-accent);
  background: var(--sf-accent); color: var(--sf-on-accent);
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em;
}
.sf-btn-ghost {
  background: var(--sf-paper); color: var(--sf-ink); border-color: var(--sf-line);
}
.sf-btn-wide { width: 100%; }

.sf-section { padding: 56px 0 64px; }
.sf-section h2 {
  font-size: clamp(24px, 3vw, 32px); font-weight: 600; letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.sf-section-lead { color: var(--sf-muted); margin: 0 0 32px; }

.sf-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px;
}
.sf-card { display: block; color: inherit; }
.sf-card-img {
  background: var(--sf-soft); overflow: hidden; aspect-ratio: 1 / 1;
  border-radius: var(--sf-radius);
}
.sf-card-img img { width: 100%; height: 100%; object-fit: cover; }
.sf-card h3 { font-size: 14px; font-weight: 500; margin: 12px 0 4px; }
.sf-card .sf-price { font-size: 14px; color: var(--sf-muted); }

.sf-about { padding: 56px 0 80px; max-width: 42em; }
.sf-about h2 { margin: 0 0 16px; font-size: 32px; letter-spacing: -0.03em; }
.sf-about p { color: var(--sf-muted); font-size: 16px; line-height: 1.7; margin: 0; }

.sf-footer {
  margin-top: auto; border-top: 1px solid var(--sf-line);
  padding: 40px 0 28px; color: var(--sf-muted); font-size: 13px; background: var(--sf-paper);
}
.sf-footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.sf-footer-nav { display: flex; gap: 20px; flex-wrap: wrap; }
.sf-footer-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sf-powered a { text-decoration: underline; text-underline-offset: 3px; }

.sf-product {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  padding: 40px 0 80px; align-items: start;
}
.sf-product-img {
  background: var(--sf-soft); min-height: 420px; border-radius: var(--sf-radius); overflow: hidden;
}
.sf-product-img img { width: 100%; height: 100%; max-height: 720px; object-fit: cover; }
.sf-product h1 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 600; letter-spacing: -0.03em; margin: 0 0 12px;
}
.sf-kicker { font-size: 13px; color: var(--sf-muted); margin-bottom: 10px; }
.sf-product-price { font-size: 18px; margin-bottom: 18px; }
.sf-product-desc { color: var(--sf-muted); line-height: 1.7; margin-bottom: 28px; }
.sf-qty {
  display: inline-flex; align-items: center; border: 1px solid var(--sf-line);
  border-radius: var(--sf-radius); overflow: hidden; margin: 0 10px 16px 0;
}
.sf-qty button, .sf-qty span {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--sf-paper); border: 0; font-size: 16px;
}

.sf-community { padding: 40px 0 80px; max-width: 720px; }
.sf-community h1 { font-size: 32px; letter-spacing: -0.03em; margin: 0 0 8px; }
.sf-compose {
  border: 1px solid var(--sf-line); border-radius: var(--sf-radius);
  padding: 16px; margin: 28px 0 8px; background: var(--sf-paper);
}
.sf-compose textarea {
  width: 100%; min-height: 96px; border: 0; resize: vertical; outline: none;
  font-size: 15px; line-height: 1.55; background: transparent;
}
.sf-compose-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--sf-line);
}
.sf-compose-file { font-size: 13px; color: var(--sf-muted); }
.sf-compose-err { color: #b42318; font-size: 13px; margin: 8px 0 0; }
.sf-journal { display: flex; flex-direction: column; gap: 0; margin-top: 12px; }
.sf-post {
  padding: 28px 0;
  border-bottom: 1px solid var(--sf-line);
}
.sf-post time { display: block; font-size: 12px; color: var(--sf-muted); margin-bottom: 10px; }
.sf-post p { margin: 0; font-size: 16px; line-height: 1.65; white-space: pre-wrap; }
.sf-post-media { margin-top: 16px; border-radius: var(--sf-radius); overflow: hidden; background: var(--sf-soft); }
.sf-post-media img, .sf-post-media video { width: 100%; max-height: 520px; object-fit: cover; }
.sf-empty { color: var(--sf-muted); padding: 28px 0; }

.sf-home-journal { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sf-home-post {
  display: block; border: 1px solid var(--sf-line); border-radius: var(--sf-radius);
  overflow: hidden; background: var(--sf-paper);
}
.sf-home-post img { width: 100%; height: 220px; object-fit: cover; background: var(--sf-soft); }
.sf-home-post-body { padding: 16px 18px 20px; }
.sf-home-post time { font-size: 12px; color: var(--sf-muted); }
.sf-home-post h3 { font-size: 16px; font-weight: 600; margin: 6px 0 0; letter-spacing: -0.02em; }

.sf-drawer-bg {
  position: fixed; inset: 0; background: rgba(18,18,18,0.28);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 50;
}
.sf-drawer-bg.is-open { opacity: 1; pointer-events: auto; }
.sf-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(400px, 100%);
  background: var(--sf-paper); z-index: 51; transform: translateX(100%);
  transition: transform .25s ease; display: flex; flex-direction: column;
  border-left: 1px solid var(--sf-line);
}
.sf-drawer.is-open { transform: none; }
.sf-drawer-head, .sf-drawer-foot { padding: 20px; }
.sf-drawer-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--sf-line); }
.sf-drawer-body { flex: 1; overflow: auto; padding: 8px 20px; }
.sf-line-item { display: grid; grid-template-columns: 72px 1fr auto; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--sf-line); }
.sf-line-item img { width: 72px; height: 72px; object-fit: cover; border-radius: var(--sf-radius); background: var(--sf-soft); }

.sf-nav-panel {
  position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw);
  background: var(--sf-paper); z-index: 52; transform: translateX(-100%);
  transition: transform .25s ease; padding: 20px; border-right: 1px solid var(--sf-line);
}
.sf-nav-panel.is-open { transform: none; }
.sf-nav-panel a { display: block; padding: 14px 0; border-bottom: 1px solid var(--sf-line); font-size: 16px; font-weight: 500; }

.sf-status {
  min-height: 70vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 80px 24px;
}
.sf-status h1 { font-size: 32px; font-weight: 600; margin: 0 0 12px; }

.sf-nl { margin-top: 16px; max-width: 320px; }
.sf-nl label { display: block; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.sf-nl-row { display: flex; gap: 8px; }
.sf-nl input {
  flex: 1; height: 40px; padding: 0 10px; border: 1px solid var(--sf-line); border-radius: var(--sf-radius);
  background: var(--sf-paper);
}
.sf-nl button {
  height: 40px; padding: 0 14px; border: 0; border-radius: var(--sf-radius);
  background: var(--sf-accent); color: var(--sf-on-accent); font-weight: 600;
}

#sf-ai { position: fixed; right: 18px; bottom: 18px; z-index: 60; }
.sf-ai-fab {
  width: 48px; height: 48px; border-radius: 24px; border: 0;
  background: var(--sf-accent); color: var(--sf-on-accent); font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.sf-ai-panel {
  position: absolute; right: 0; bottom: 58px; width: min(340px, calc(100vw - 32px));
  background: var(--sf-paper); border: 1px solid var(--sf-line); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.16); overflow: hidden;
}
.sf-ai-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--sf-line); font-size: 13px;
}
.sf-ai-head button { border: 0; background: none; font-size: 12px; color: var(--sf-muted); }
.sf-ai-log { height: 220px; overflow: auto; padding: 12px; font-size: 13px; line-height: 1.45; }
.sf-ai-me, .sf-ai-bot { margin-bottom: 8px; padding: 8px 10px; border-radius: 8px; }
.sf-ai-me { background: var(--sf-accent); color: var(--sf-on-accent); margin-left: 28px; }
.sf-ai-bot { background: var(--sf-soft); margin-right: 28px; }
.sf-ai-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--sf-line); }
.sf-ai-form input {
  flex: 1; height: 36px; border: 1px solid var(--sf-line); border-radius: 8px; padding: 0 10px;
}
.sf-ai-form button {
  height: 36px; padding: 0 12px; border: 0; border-radius: 8px;
  background: var(--sf-accent); color: var(--sf-on-accent); font-weight: 600;
}

@media (max-width: 990px) {
  .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sf-product, .sf-home-journal { grid-template-columns: 1fr; }
  .sf-nav { display: none; }
  .sf-menu-btn { display: inline-flex; }
  .sf-banner { min-height: 420px; }
  .sf-banner-shade { background: rgba(255,255,255,0.78); }
  .sf-banner-copy { padding: 48px 0; }
}
@media (max-width: 560px) {
  .sf-grid { grid-template-columns: 1fr 1fr; gap: 16px 10px; }
  .sf-inner { width: min(var(--sf-width), calc(100% - 28px)); }
}
