/* ============================================================
   ADB Toggle – shared stylesheet
   ============================================================ */

:root {
  --bg:        #0d1117;
  --surface:   #161b22;
  --surface2:  #21262d;
  --border:    #30363d;
  --text:      #e6edf3;
  --text-muted:#8b949e;
  --accent:    #58a6ff;
  --accent-dim:#1f3a5f;
  --green:     #3fb950;
  --orange:    #d29922;
  --red:       #f85149;
  --radius:    10px;
  --max-w:     860px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP",
               Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.site-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  white-space: nowrap;
}
.site-logo:hover { text-decoration: none; color: var(--accent); }

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

.lang-btn {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.25rem 0.65rem;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* ── Main ────────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 3rem 1rem 2.5rem;
}

.hero-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
  background: var(--accent-dim);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-icon svg { width: 48px; height: 48px; fill: var(--accent); }

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 2rem;
}

.play-badge {
  display: inline-block;
  margin-bottom: 0.5rem;
}

.play-badge img {
  height: 52px;
  border-radius: 8px;
}

/* ── Section headings ────────────────────────────────────── */
h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 2.25rem 0 1rem;
  padding-left: .75rem;
  border-left: 3px solid var(--accent);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.5rem 0 .6rem;
  color: #cdd9e5;
}

p { margin-bottom: .85rem; }

ul, ol {
  margin: .5rem 0 1rem 1.5rem;
}
li { margin-bottom: .35rem; }

/* ── Cards ───────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .15s;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

a.card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.card-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  width: fit-content;
}

.card-badge.green { background: #122d1a; color: var(--green); }
.card-badge.orange { background: #2d2004; color: var(--orange); }

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.card-desc {
  font-size: .9rem;
  color: var(--text-muted);
  margin: 0;
}

.card-arrow {
  margin-top: auto;
  padding-top: .5rem;
  font-size: .85rem;
  color: var(--accent);
}

/* ── Steps ───────────────────────────────────────────────── */
.steps { counter-reset: step; list-style: none; margin-left: 0; }

.steps li {
  counter-increment: step;
  position: relative;
  padding: .75rem 1rem .75rem 3.25rem;
  margin-bottom: .75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: .75rem;
  width: 1.75rem;
  height: 1.75rem;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: .85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Screenshot placeholder ──────────────────────────────── */
.screenshot {
  background: var(--surface2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
  margin: .75rem 0 1rem;
}

.screenshot img {
  max-width: 100%;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

/* ── Code block ──────────────────────────────────────────── */
.code-block {
  position: relative;
  background: #010409;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: .75rem 0 1.25rem;
  overflow-x: auto;
}

.code-block code {
  font-family: "Cascadia Code", "SF Mono", "Consolas", monospace;
  font-size: .875rem;
  color: #79c0ff;
  white-space: pre;
}

.copy-btn {
  position: absolute;
  top: .6rem;
  right: .6rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  font-size: .75rem;
  font-family: inherit;
  padding: .25rem .65rem;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }

/* ── OS Tabs ─────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: .5rem;
  border-bottom: 1px solid var(--border);
  margin: 1.5rem 0 0;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-size: .9rem;
  font-family: inherit;
  padding: .5rem 1rem;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .15s;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-panel { display: none; padding-top: 1.5rem; }
.tab-panel.active { display: block; }

/* ── Alert / Info box ────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-size: .9rem;
  border-left: 3px solid;
}

.alert.info { background: #111d2e; border-color: var(--accent); }
.alert.warn { background: #1f1a0f; border-color: var(--orange); }
.alert strong { display: block; margin-bottom: .25rem; }

/* ── Footer ──────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: .8rem;
  color: var(--text-muted);
}

.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); text-decoration: none; }

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
}

/* ── Comparison table ────────────────────────────────────── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: .875rem;
}

.compare-table th,
.compare-table td {
  padding: .6rem .85rem;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
}

.compare-table thead th {
  background: var(--surface2);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.compare-table thead th:last-child { color: var(--accent); }

.compare-table tbody tr:nth-child(odd) { background: var(--surface); }

.compare-table .check { color: var(--green); font-weight: 700; }
.compare-table .dash  { color: var(--text-muted); }

@media (max-width: 600px) {
  .compare-table th,
  .compare-table td { padding: .5rem .55rem; font-size: .8rem; }
}

/* ── Inline utils ────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.65rem; }
  main { padding: 1.75rem 1rem 3rem; }
  .steps li { padding-left: 3rem; }
  .header-inner { gap: 1rem; }
  .site-nav { gap: .75rem; }
}
