:root {
  --accent: #a65239;
  --accent-soft: #fff9f8;
  --accent-border: #f0e0dc;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1a1d26;
  --muted: #5c6578;
  --line: #e0e4ec;
  --shadow: 0 8px 32px rgba(26, 29, 38, 0.06);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
}

.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--muted);
}

.nav-links {
  display: none;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(166, 82, 57, 0.35);
}

.btn-secondary {
  background: var(--card);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

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

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
}

.nav-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1.25rem 1rem;
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  color: var(--muted);
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

/* Layout */
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

section {
  margin-top: 4rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.section-title {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.section-lead {
  color: var(--muted);
  max-width: 42rem;
  margin: 0 0 1.5rem;
  font-size: 1rem;
}

.section-sub {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.75rem;
}

.card-daily {
  border-color: var(--accent-border);
  background: linear-gradient(180deg, #fff 0%, var(--accent-soft) 100%);
}

.card-hint {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Hero */
.hero {
  display: grid;
  gap: 2rem;
  padding-top: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    padding-top: 3.5rem;
  }
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

.hero-slogan {
  font-size: 1.05rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.hero-sub {
  color: var(--muted);
  margin: 0 0 1.25rem;
  font-size: 0.98rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.hero-note {
  font-size: 0.82rem;
  color: var(--muted);
  border-left: 3px solid var(--accent-border);
  padding-left: 0.75rem;
  margin: 0;
}

/* Catalog demo */
.catalog-demo {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.catalog-demo-header {
  display: flex;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: #f8f9fc;
  border-bottom: 1px solid var(--line);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
}

.catalog-demo-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 220px;
}

.catalog-messy,
.catalog-clean {
  padding: 1rem;
  font-size: 0.78rem;
  line-height: 1.7;
}

.catalog-messy {
  background: #fafafa;
  border-right: 1px solid var(--line);
  color: #888;
}

.catalog-messy .line {
  opacity: 0.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-messy .line.highlight {
  opacity: 1;
  color: #c44;
}

.catalog-clean {
  background: #fff;
}

.catalog-clean .chapter {
  padding: 0.25rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.5rem;
}

.catalog-clean .chapter.active {
  border-left-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.catalog-arrow {
  display: none;
}

@media (min-width: 600px) {
  .catalog-demo-body {
    grid-template-columns: 1fr auto 1fr;
  }
  .catalog-arrow {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
    color: var(--accent);
    font-size: 1.25rem;
  }
}

.mode-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--accent-soft);
}

.badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-weight: 600;
}

/* Heat strip */
.heat-strip {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.heat-bars {
  flex: 1;
  display: flex;
  gap: 3px;
  height: 28px;
  align-items: flex-end;
}

.heat-bars span {
  flex: 1;
  border-radius: 2px 2px 0 0;
  animation: pulse 2.5s ease-in-out infinite;
}

.heat-bars span:nth-child(1) { height: 40%; background: rgba(166, 82, 57, 0.35); animation-delay: 0s; }
.heat-bars span:nth-child(2) { height: 65%; background: rgba(156, 39, 176, 0.35); animation-delay: 0.2s; }
.heat-bars span:nth-child(3) { height: 90%; background: rgba(33, 150, 243, 0.4); animation-delay: 0.4s; }
.heat-bars span:nth-child(4) { height: 55%; background: rgba(166, 82, 57, 0.5); animation-delay: 0.6s; }
.heat-bars span:nth-child(5) { height: 75%; background: rgba(255, 152, 0, 0.35); animation-delay: 0.8s; }

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* Cards grid */
.cards {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .cards-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .cards-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text);
}

.card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.card .card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.pro-note {
  font-size: 0.85rem;
  color: var(--muted);
  background: #fffdf8;
  border: 1px solid #e8e0d5;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
}

/* Feature list */
.feature-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.feature-list li {
  padding: 0.5rem 0;
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.92rem;
  color: var(--muted);
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Download */
.download-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 700px) {
  .download-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.download-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.download-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.download-card p {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.sha256 {
  font-size: 0.72rem;
  word-break: break-all;
  color: var(--muted);
  margin-top: 0.75rem;
  font-family: ui-monospace, monospace;
}

.disclaimer {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 1.5rem;
  padding: 1rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* Footer */
.site-footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer a {
  margin: 0 0.5rem;
}

.site-footer .studio {
  color: var(--text);
  font-weight: 600;
}

/* ====== Guide Overlay / Modal ====== */
.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 15, 25, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.guide-overlay.open {
  opacity: 1;
  visibility: visible;
}

.guide-modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 920px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  transform: translateY(18px);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.guide-overlay.open .guide-modal {
  transform: translateY(0);
}

.guide-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: var(--card);
  flex-shrink: 0;
}

.guide-modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--text);
  font-weight: 700;
}

.guide-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.guide-modal-close:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.guide-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 1.8rem 2.5rem;
  -webkit-overflow-scrolling: touch;
}

/* Guide content inside modal — reuse guide.html patterns */
.guide-modal-body h2 {
  font-size: 1.35rem;
  margin-top: 2.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent-border);
  color: var(--accent);
}

.guide-modal-body h2:first-child {
  margin-top: 0;
}

.guide-modal-body h3 {
  font-size: 1.08rem;
  margin-top: 1.5rem;
  color: var(--text);
}

.guide-modal-body h4 {
  font-size: 0.95rem;
  margin-top: 1.1rem;
  color: var(--muted);
}

.guide-modal-body p,
.guide-modal-body li {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.93rem;
}

.guide-modal-body ul,
.guide-modal-body ol {
  padding-left: 1.25rem;
}

.guide-modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.85rem 0;
  font-size: 0.88rem;
}

.guide-modal-body th,
.guide-modal-body td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--line);
}

.guide-modal-body th {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
}

.guide-modal-body td {
  color: var(--muted);
}

.guide-modal-body blockquote {
  margin: 0.65rem 0;
  padding: 0.55rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.guide-modal-body .permission-tag {
  display: inline-block;
  padding: 0.12em 0.45em;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.guide-modal-body .tag-pro {
  background: #e8f0fe;
  color: #1a56db;
}

.guide-modal-body .tag-free {
  background: #e6f4ea;
  color: #137333;
}

.guide-modal-body .tag-paid {
  background: #fef3e6;
  color: #c2410c;
}

.guide-modal-body .tag-internal {
  background: #f3e8ff;
  color: #6b21a8;
}

/* Guide TOC inside modal */
.guide-toc {
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.6rem;
}

.guide-toc strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--text);
}

.guide-toc ol {
  columns: 2;
  column-gap: 2rem;
  padding-left: 1.25rem;
  margin: 0.3rem 0 0;
  list-style: decimal;
}

.guide-toc li {
  padding: 0.12rem 0;
  font-size: 0.85rem;
}

.guide-toc a {
  color: var(--accent);
  text-decoration: none;
}

.guide-toc a:hover {
  text-decoration: underline;
}

.guide-footer-note {
  margin-top: 2.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

/* Modal scrollbar */
.guide-modal-body::-webkit-scrollbar {
  width: 6px;
}

.guide-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.guide-modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

/* Mobile: modal fills screen */
@media (max-width: 600px) {
  .guide-overlay {
    padding: 0;
  }

  .guide-modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .guide-modal-body {
    padding: 1.25rem 1rem 2rem;
  }

  .guide-toc ol {
    columns: 1;
  }
}
