:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-strong: #f2f5fb;
  --text: #0a1b47;
  --muted: #4a5b7f;
  --line: #d9e3f2;
  --blue: #1f66e5;
  --blue-dark: #1347ad;
  --dark: #121827;
  --radius: 24px;
  --shadow: 0 16px 40px rgba(16, 34, 68, 0.08);
  --safe-top: max(env(safe-area-inset-top), 0px);
  --safe-right: max(env(safe-area-inset-right), 0px);
  --safe-bottom: max(env(safe-area-inset-bottom), 0px);
  --safe-left: max(env(safe-area-inset-left), 0px);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: rgba(247, 249, 252, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(217, 227, 242, 0.9);
}
.brand, .github-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}
.brand { font-size: clamp(1.2rem, 2vw, 1.85rem); }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #eaf1ff; color: var(--blue);
}
.brand-mark svg, .github-button svg, .trust-item svg, .guide-icon svg, .privacy-note svg, .test-control svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.github-button {
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  box-shadow: 0 8px 16px rgba(16, 34, 68, 0.04);
}
main { padding: 30px 0 56px; }
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: 40px; align-items: start;
}
.hero-copy { padding: 28px 0 0; }
.eyebrow, .section-kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px;
  text-transform: uppercase; letter-spacing: 0.12em; font-weight: 800; color: var(--blue); font-size: 0.92rem;
}
.eyebrow-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 6px rgba(31, 102, 229, 0.12); }
h1 { margin: 0; font-size: clamp(3rem, 7vw, 6rem); line-height: 0.92; letter-spacing: -0.05em; }
.hero-description { max-width: 620px; margin: 28px 0 32px; font-size: clamp(1.1rem, 2.4vw, 1.5rem); line-height: 1.6; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.primary-button, .outline-button, .secondary-link, .test-control {
  border: 0; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer;
}
.primary-button {
  padding: 18px 26px; background: linear-gradient(135deg, #2a78ff, #1256d8); color: #fff; font-weight: 800; box-shadow: 0 14px 30px rgba(31, 102, 229, 0.24);
}
.primary-button svg { width: 22px; height: 22px; fill: currentColor; }
.secondary-link { color: var(--blue); font-weight: 800; }
.trust-row {
  display: flex; flex-wrap: wrap; gap: 28px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line);
}
.trust-item { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 700; }
.trust-item svg { color: var(--blue); }
.checker-preview {
  border: 1px solid var(--line); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); padding: 20px;
}
.preview-launcher {
  width: 100%; padding: 0; border: 0; background: none; display: block; cursor: pointer;
}
.preview-window {
  border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--surface-strong);
}
.preview-screen {
  position: relative; min-height: 330px; border-radius: 18px 18px 0 0; border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.preview-label, .preview-progress, .test-pattern-name, .test-progress {
  position: absolute; display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 12px; background: rgba(17, 24, 39, 0.84); color: #fff; font-weight: 800; letter-spacing: -0.01em;
}
.preview-label { top: 20px; left: 20px; }
.preview-progress { top: 20px; right: 20px; }
.preview-controls {
  display: flex; justify-content: space-between; gap: 12px; padding: 14px 18px; color: var(--muted); font-weight: 800;
}
.preview-next { color: var(--blue); }
.pattern-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pattern-button {
  border: 1px solid var(--line); background: var(--surface); border-radius: 18px; padding: 12px 10px; display: flex; flex-direction: column; gap: 10px; align-items: center; cursor: pointer; font-weight: 800; color: #26385d;
}
.pattern-button.is-selected { border-color: #88adff; box-shadow: inset 0 0 0 2px rgba(31, 102, 229, 0.55); }
.pattern-swatch {
  width: 100%; height: 54px; border-radius: 10px; border: 1px solid rgba(17, 24, 39, 0.12);
}
.swatch-white { background: #ffffff; }
.swatch-black { background: #000000; }
.swatch-red { background: #ff0000; }
.swatch-green { background: #00cc33; }
.swatch-blue { background: #003cff; }
.swatch-yellow { background: #ffef00; }
.swatch-cyan { background: #00e5ff; }
.swatch-magenta { background: #ff00cc; }
.swatch-orange { background: #ff7a00; }
.swatch-purple { background: #7b2cff; }
.guide-section {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 28px;
}
.guide-card {
  border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); padding: 24px; display: flex; gap: 18px;
}
.guide-card h2 { margin: 4px 0 10px; font-size: 1.65rem; }
.guide-card ul { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.75; }
.guide-icon {
  width: 52px; height: 52px; flex: 0 0 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
}
.guide-icon-blue { background: #ebf2ff; color: var(--blue); }
.guide-icon-green { background: #ebfff2; color: #18934f; }
.guide-icon-purple { background: #f3ebff; color: #7f3bf2; }
.result-key { margin: 0; display: grid; gap: 10px; }
.result-key div { display: grid; gap: 4px; }
.result-key dt { font-weight: 800; display: flex; align-items: center; gap: 10px; }
.result-key dd { margin: 0; color: var(--muted); }
.result-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-red { background: #ff4c53; }
.dot-orange { background: #ff9c2e; }
.dot-slate { background: #6d7690; }
.dot-purple { background: #7f3bf2; }
.privacy-note {
  margin-top: 22px; border: 1px solid var(--line); border-radius: 22px; background: #fbfdff; padding: 16px 20px; display: flex; gap: 12px; align-items: center; color: var(--muted); font-weight: 700;
}
.privacy-note svg { color: #6a86ff; flex: 0 0 auto; }
.site-footer { text-align: center; padding: 18px 16px 28px; color: var(--muted); font-weight: 700; }
.test-overlay {
  position: fixed; inset: 0; display: none; z-index: 100; background: #000;
}
.test-overlay.is-open { display: block; }
.pattern-stage {
  position: relative; width: 100%; height: 100dvh; min-height: 100vh; overflow: hidden;
}
.test-overlay.ui-hidden .ui-panel,
.test-overlay.ui-hidden .completion-panel { opacity: 0; pointer-events: none; }
.test-overlay.ui-hidden.edge-reveal .ui-panel,
.test-overlay.ui-hidden.edge-reveal .completion-panel { opacity: 1; pointer-events: auto; }
.test-hud, .test-controls {
  position: absolute; left: 50%; transform: translateX(-50%); width: min(680px, calc(100vw - 28px - var(--safe-left) - var(--safe-right))); background: rgba(17, 24, 39, 0.82); color: #fff; border-radius: 18px; backdrop-filter: blur(16px); box-shadow: 0 16px 40px rgba(0,0,0,0.25); transition: opacity 0.18s ease;
}
.test-hud {
  top: calc(18px + var(--safe-top)); padding: 18px 18px 16px;
}
.test-meta { position: relative; min-height: 44px; }
.test-pattern-name { position: static; }
.test-progress { top: 0; right: 0; }
.test-hint { margin: 10px 0 8px; font-size: 1.15rem; line-height: 1.5; max-width: calc(100% - 92px); }
.test-shortcuts { margin: 0; color: rgba(255,255,255,0.72); font-size: 0.94rem; }
.test-controls {
  bottom: calc(18px + var(--safe-bottom)); padding: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.test-control { min-height: 56px; font-weight: 800; color: #fff; }
.primary-control { background: linear-gradient(135deg, #2a78ff, #1256d8); }
.secondary-control { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18); }
.edge-hint {
  position: absolute; left: 50%; bottom: calc(96px + var(--safe-bottom)); transform: translateX(-50%); background: rgba(17, 24, 39, 0.82); color: #fff; padding: 10px 14px; border-radius: 999px; font-size: 0.92rem; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.edge-hint.is-visible { opacity: 1; }
.completion-panel {
  position: absolute; inset: 0; display: none; place-items: center; padding: 24px;
}
.completion-panel.is-visible { display: grid; }
.completion-card {
  width: min(860px, calc(100vw - 28px - var(--safe-left) - var(--safe-right))); max-height: min(90dvh, 920px); overflow: auto; background: rgba(255,255,255,0.97); color: var(--text); border-radius: 28px; box-shadow: 0 25px 70px rgba(0,0,0,0.35); padding: 28px;
}
.completion-icon {
  width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; color: var(--blue); background: #ebf2ff;
}
.completion-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; }
.completion-card h2 { margin: 8px 0 10px; font-size: clamp(2rem, 4vw, 2.8rem); }
.completion-intro { margin: 0 0 20px; color: var(--muted); font-size: 1.1rem; }
.completion-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.completion-grid article { border: 1px solid var(--line); border-radius: 18px; padding: 16px; display: flex; gap: 12px; }
.completion-grid h3 { margin: 0 0 6px; }
.completion-grid p { margin: 0; color: var(--muted); line-height: 1.55; }
.completion-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.compact-button { padding: 14px 20px; }
.outline-button { padding: 14px 20px; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 800; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; }
  .guide-section { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .site-header { padding: 14px 16px; }
  .github-button span { display: none; }
  .page-shell { width: min(100% - 20px, 1180px); }
  .hero-copy { padding-top: 14px; }
  .pattern-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preview-screen { min-height: 240px; }
  .test-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .test-hint { max-width: 100%; font-size: 1rem; }
  .completion-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hero-actions { align-items: stretch; }
  .primary-button { width: 100%; }
  .secondary-link { width: 100%; justify-content: center; }
  .pattern-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .test-controls { width: calc(100vw - 16px - var(--safe-left) - var(--safe-right)); bottom: calc(10px + var(--safe-bottom)); padding: 10px; }
  .test-hud { width: calc(100vw - 16px - var(--safe-left) - var(--safe-right)); top: calc(10px + var(--safe-top)); }
  .test-control { min-height: 52px; }
  .test-shortcuts { display: none; }
}
