/* Ataraxian Studios — shared styles */
:root {
  --bg: #0b0e14;
  --bg-2: #10141c;
  --surface: #151a24;
  --surface-2: #1b2130;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f6;
  --muted: #9aa3b2;
  --faint: #6b7385;
  --accent: #ff9f43;
  --accent-2: #ff5e7e;
  --accent-grad: linear-gradient(135deg, #ffb347 0%, #ff7a59 50%, #ff5e7e 100%);
  --ok: #4fd1a5;
  --radius: 18px;
  --radius-sm: 12px;
  --max: 1160px;
  --font-head: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 0; background: #fff; color: #000; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 14, 20, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; letter-spacing: .02em; }
.brand-mark { width: 34px; height: 34px; }
.nav-links { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .95rem; font-weight: 500; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); color: var(--text); border-radius: 10px; width: 42px; height: 42px; cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; margin: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: .98rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent-grad); color: #1a0f08; box-shadow: 0 10px 30px -10px rgba(255, 122, 89, .6); }
.btn-primary:hover { box-shadow: 0 14px 34px -10px rgba(255, 122, 89, .8); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-play { background: #fff; color: #0b0e14; padding: .7rem 1.35rem .7rem 1.1rem; border-radius: 14px; }
.btn-play small { display: block; font-size: .68rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; opacity: .7; line-height: 1.1; }
.btn-play span { display: block; font-size: 1.05rem; line-height: 1.15; text-align: left; }
.btn-play:hover { box-shadow: 0 12px 30px -12px rgba(255, 255, 255, .45); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero::before {
  content: ""; position: absolute; inset: -30% -10% auto; height: 120%;
  background:
    radial-gradient(45% 45% at 25% 30%, rgba(255, 159, 67, .18), transparent 70%),
    radial-gradient(40% 40% at 80% 20%, rgba(255, 94, 126, .14), transparent 70%),
    radial-gradient(50% 50% at 60% 80%, rgba(80, 140, 255, .10), transparent 70%);
  pointer-events: none;
}
.hero > .container { position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.2rem; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--accent-grad); border-radius: 2px; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 640px; }
.grad-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-top: clamp(3rem, 6vw, 4.5rem); }
.stat { background: var(--bg-2); padding: 1.5rem 1.25rem; text-align: center; }
.stat strong { display: block; font-family: var(--font-head); font-size: clamp(1.6rem, 3.5vw, 2.3rem); font-weight: 700; line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }

/* Sections */
.section { padding: clamp(4rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 2.75rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; }

/* App cards */
.app-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.app-card {
  position: relative; display: flex; flex-direction: column; gap: 1.1rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.75rem; transition: transform .25s ease, border-color .25s, box-shadow .25s;
}
.app-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .7); }
.app-card-top { display: flex; gap: 1.1rem; align-items: center; }
.app-icon { width: 76px; height: 76px; border-radius: 20px; flex: none; background: #fff1; }
.app-card h3 { margin: 0 0 .15rem; font-size: 1.3rem; }
.app-card h3 a { text-decoration: none; }
.app-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.app-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; color: var(--muted); font-size: .88rem; }
.app-meta .dl { color: var(--ok); font-weight: 600; }
.app-card p { color: var(--muted); margin: 0; flex: 1; }
.app-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: relative; z-index: 1; }
.link-more { color: var(--text); font-weight: 600; text-decoration: none; font-size: .95rem; display: inline-flex; align-items: center; gap: .35rem; }
.link-more::after { content: "→"; transition: transform .2s; }
.app-card:hover .link-more::after { transform: translateX(4px); }
.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; padding: .3rem .7rem; border-radius: 999px; background: rgba(255, 159, 67, .12); color: var(--accent); }
.play-mini { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; font-weight: 600; text-decoration: none; padding: .5rem .95rem; border-radius: 10px; background: #fff; color: #0b0e14; }
.play-mini svg { width: 16px; height: 16px; }

/* Feature grid */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; }
.feature-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 159, 67, .12); color: var(--accent); margin-bottom: 1rem; }
.feature-icon svg { width: 24px; height: 24px; }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }

/* App page hero */
.crumbs { font-size: .88rem; color: var(--faint); margin-bottom: 1.75rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.crumbs span { margin: 0 .4rem; }
.app-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.app-hero-id { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1.4rem; }
.app-hero-id img { width: 88px; height: 88px; border-radius: 22px; }
.app-hero-id .dev { color: var(--muted); font-size: .95rem; }
.app-hero h1 { font-size: clamp(2rem, 4.6vw, 3.2rem); }
.aka { color: var(--faint); font-size: .95rem; margin-top: -.25rem; }
.app-facts { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.app-facts li { font-size: .88rem; padding: .4rem .85rem; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); }
.app-facts li strong { color: var(--text); }
.phone { position: relative; justify-self: center; width: min(300px, 80vw); border-radius: 34px; padding: 10px; background: linear-gradient(160deg, #2a3142, #11151d); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--border-strong); }
.phone img { border-radius: 26px; width: 100%; }
.phone-glow { position: absolute; inset: 10% -20%; background: radial-gradient(50% 50% at 50% 50%, rgba(255, 122, 89, .28), transparent 70%); z-index: -1; filter: blur(20px); }
.icon-stage { justify-self: center; width: min(320px, 70vw); aspect-ratio: 1; display: grid; place-items: center; border-radius: 40px; background: radial-gradient(60% 60% at 50% 40%, rgba(255, 159, 67, .2), transparent 70%), var(--surface); border: 1px solid var(--border); }
.icon-stage img { width: 62%; border-radius: 22%; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .5)); }

/* Screenshot strip */
.shots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 230px); gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .5rem .25rem 1.25rem; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img { border-radius: 18px; border: 1px solid var(--border); background: var(--surface); }
.shots figcaption { font-size: .85rem; color: var(--muted); margin-top: .6rem; text-align: center; }

/* Steps */
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-grad); color: #1a0f08; font-weight: 700; margin-bottom: 1rem; }
.steps p { color: var(--muted); margin: 0; }

/* FAQ */
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 1.25rem 2.5rem 1.25rem 0; font-weight: 600; font-size: 1.05rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 1.25rem; margin: 0; }

/* CTA band */
.cta-band { text-align: center; background: radial-gradient(60% 120% at 50% 0%, rgba(255, 122, 89, .16), transparent 70%), var(--bg-2); border: 1px solid var(--border); border-radius: 28px; padding: clamp(2.5rem, 6vw, 4rem) 1.5rem; }
.cta-band p { color: var(--muted); max-width: 560px; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; }

/* Prose (about, legal-ish) */
.prose { max-width: 760px; color: var(--muted); font-size: 1.08rem; }
.prose strong { color: var(--text); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.contact-list a { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; transition: border-color .2s; }
.contact-list a:hover { border-color: var(--border-strong); }
.contact-list svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.contact-list small { display: block; color: var(--faint); font-size: .8rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 3.5rem 0 2rem; margin-top: 2rem; color: var(--muted); font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr .8fr 1.2fr; gap: 2rem; }
.site-footer h4 { font-family: var(--font-head); color: var(--text); font-size: .95rem; margin: 0 0 1rem; font-weight: 600; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.site-footer a { text-decoration: none; color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-top: 1px solid var(--border); margin-top: 2.5rem; padding-top: 1.5rem; color: var(--faint); font-size: .85rem; }

/* Responsive */
@media (max-width: 960px) {
  .feature-grid, .steps { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .app-hero { grid-template-columns: 1fr; gap: 2.5rem; }
}
@media (max-width: 720px) {
  .nav-toggle { display: grid; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: .5rem 1.25rem 1rem; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: .85rem 0; font-size: 1.05rem; }
  .app-grid, .feature-grid, .steps, .two-col { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .app-card { padding: 1.4rem; }
  .app-card-foot { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Hero screenshot that already has its own frame (store marketing images) */
.shot-hero { position: relative; justify-self: center; width: min(300px, 80vw); }
.shot-hero img { border-radius: 22px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px var(--border-strong); }

/* Legal pages */
.legal-hero { padding-bottom: 2.5rem; }
.legal-wrap { max-width: 820px; }
.legal { color: var(--muted); font-size: 1rem; line-height: 1.75; }
.legal h2 { color: var(--text); font-size: 1.35rem; margin: 2.5rem 0 .8rem; scroll-margin-top: 90px; }
.legal h3 { color: var(--text); font-size: 1.08rem; margin: 1.75rem 0 .6rem; scroll-margin-top: 90px; }
.legal a[id] { scroll-margin-top: 90px; }
.legal strong { color: var(--text); }
.legal a[href] { color: var(--accent); }
.legal ul { padding-left: 1.3rem; margin: 0 0 1rem; }
.legal li { margin-bottom: .4rem; }
.legal table { width: 100%; border-collapse: collapse; margin: 0; font-size: .92rem; table-layout: fixed; }
.legal table + table { margin-top: -1px; }
.legal td:nth-child(1), .legal th:nth-child(1) { width: 30%; }
.legal td:nth-child(3), .legal th:nth-child(3) { width: 16%; text-align: center; }
@media (max-width: 560px) { .legal table { font-size: .8rem; } .legal th, .legal td { padding: .45rem; overflow-wrap: anywhere; } }
.legal th, .legal td { border: 1px solid var(--border); padding: .6rem .75rem; text-align: left; vertical-align: top; }
.legal th { color: var(--text); background: var(--surface); }
.legal td p, .legal th p { margin: 0; }

/* Footer legal list */
.site-footer .legal-row span { display: block; color: var(--text); font-size: .88rem; }
.site-footer .legal-row a { font-size: .88rem; }

/* ---------- Tools ---------- */
.tool { display: grid; gap: 1.25rem; }
.tool-status { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; }
.tool-status > div:nth-child(2) { flex: 1; min-width: 220px; }
.tool-status strong { display: block; font-family: var(--font-head); font-size: 1.1rem; }
.tool-status span { color: var(--muted); font-size: .95rem; }
.tool-status-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--faint); flex: none; box-shadow: 0 0 0 4px rgba(255,255,255,.05); }
.tool-status[data-state="wait"] .tool-status-dot { background: var(--accent); animation: pulse 1.2s infinite; }
.tool-status[data-state="good"] .tool-status-dot { background: var(--ok); }
.tool-status[data-state="warn"] .tool-status-dot { background: #ffcc4d; }
.tool-status[data-state="bad"] .tool-status-dot { background: var(--accent-2); }
@keyframes pulse { 50% { opacity: .35; } }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.tool-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; min-width: 0; }
.tool-h { font-size: 1.15rem; margin: 0 0 .75rem; }
.tool-note { color: var(--muted); font-size: .93rem; margin: 0 0 1rem; }
.tool-privacy { color: var(--faint); font-size: .85rem; text-align: center; margin: 0; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.check-list li { display: flex; gap: .85rem; align-items: flex-start; }
.check-list small { display: block; color: var(--muted); font-size: .85rem; }
.check-state { flex: none; min-width: 84px; text-align: center; font-size: .8rem; font-weight: 600; padding: .25rem .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.check-list li[data-ok="yes"] .check-state { background: rgba(79,209,165,.15); color: var(--ok); }
.check-list li[data-ok="no"] .check-state { background: rgba(255,94,126,.14); color: var(--accent-2); }
.verdict { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; margin: 0 0 .5rem; }
.verdict[data-tone="good"] { color: var(--ok); }
.verdict[data-tone="warn"] { color: #ffcc4d; }
.verdict[data-tone="bad"] { color: var(--accent-2); }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: 1rem 0 0; }
.stat-row div { background: var(--surface-2); border-radius: var(--radius-sm); padding: .75rem 1rem; }
.stat-row dt { color: var(--muted); font-size: .8rem; }
.stat-row dd { margin: 0; font-family: var(--font-head); font-size: 1.35rem; font-weight: 600; }
.tool-chart { width: 100%; height: auto; aspect-ratio: 900 / 260; background: var(--bg-2); border-radius: var(--radius-sm); display: block; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: .85rem; color: var(--muted); margin: .6rem 0 1rem; }
.legend span::before { content: ""; display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: .4rem; vertical-align: middle; }
.legend .lx::before { background: #ff9f43; } .legend .ly::before { background: #4fd1a5; } .legend .lz::before { background: #6ea8ff; }
.readouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.readouts div { background: var(--surface-2); border-radius: var(--radius-sm); padding: .6rem .8rem; }
.readouts span { display: block; color: var(--muted); font-size: .78rem; }
.readouts strong { font-variant-numeric: tabular-nums; font-size: 1rem; }
.drift-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.drift-row .verdict { margin: 0; font-size: 1.02rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Gamepad */
.pad-card + .pad-card { margin-top: 1.25rem; }
.pad-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.pad-name { overflow-wrap: anywhere; }
.pad-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.pad-drift-result { font-size: 1rem; min-height: 1.2em; }
.pad-layout { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.25rem; margin: 1rem 0 1.5rem; }
.pad-layout h3, .pad-sub { font-size: .95rem; color: var(--muted); font-weight: 600; margin: 0 0 .6rem; font-family: var(--font-body); }
.stick { width: 100%; max-width: 220px; display: block; margin: 0 auto; }
.stick-ring { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 2; }
.stick-dz { fill: rgba(255,159,67,.12); stroke: rgba(255,159,67,.6); stroke-width: 1.5; stroke-dasharray: 4 3; }
.stick-axis { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.stick-trail { fill: none; stroke: rgba(255,159,67,.45); stroke-width: 2; }
.stick-dot { fill: var(--accent); }
.stick-val { text-align: center; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; margin: .5rem 0 0; }
.trigger { display: grid; grid-template-columns: 32px 1fr 44px; align-items: center; gap: .6rem; margin-bottom: .9rem; font-size: .9rem; }
.trigger .bar { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.trigger .bar i { display: block; height: 100%; width: 0; background: var(--accent-grad); }
.trigger b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; color: var(--muted); }
.btn-grid, .axes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; margin-bottom: 1rem; }
.pad-btn { display: flex; justify-content: space-between; gap: .5rem; align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .55rem .75rem; font-size: .85rem; transition: background .08s, border-color .08s; }
.pad-btn b { color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.pad-btn[data-on="1"] { background: rgba(255,159,67,.18); border-color: var(--accent); }
.pad-btn[data-on="1"] b { color: var(--text); }

/* Guides */
.guide-body { margin-top: 3rem; }
.legal-wrap .guide-body { margin-top: 0; }
.guide-body ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.guide-body ol li { margin-bottom: .45rem; }
.guide-body .faq { max-width: none; }
.guide-body .faq summary { color: var(--text); }
.callout { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 1.25rem 1.5rem; margin-bottom: 2rem; }
.callout h2 { margin-top: 0 !important; font-size: 1.1rem !important; }
.callout ol { margin-bottom: 0; }

@media (max-width: 860px) {
  .tool-grid, .pad-layout { grid-template-columns: 1fr; }
  .readouts { grid-template-columns: repeat(2, 1fr); }
}

/* Real <button>s: no browser default background or font */
button.btn { font-family: inherit; line-height: 1.2; }
.btn-ghost { background: transparent; }

/* Gamepad diagram */
.pad-svg { display: block; width: 100%; max-width: 640px; height: auto; margin: .25rem auto 1rem; }
.pad-svg .pad-body { fill: var(--surface-2); stroke: var(--border-strong); stroke-width: 2; }
.pad-svg .part { fill: #232a3a; stroke: rgba(255,255,255,.18); stroke-width: 1.5; transition: fill .06s, stroke .06s; }
.pad-svg .lbl { fill: var(--muted); font: 600 15px Inter, system-ui, sans-serif; text-anchor: middle; pointer-events: none; }
.pad-svg .lbl.sm { font-size: 12px; }
.pad-svg .lbl.xs { font-size: 10.5px; font-weight: 500; fill: var(--faint); }
.pad-svg .on .part { fill: var(--accent); stroke: #ffd1a3; }
.pad-svg .on .lbl { fill: #1a0f08; }
.pad-svg .stick-g.on .lbl.xs, .pad-svg .pbtn.on .lbl.xs { fill: var(--accent); }
.pad-svg .well { fill: #141925; stroke: rgba(255,255,255,.12); stroke-width: 1.5; }
.pad-svg .knob { fill: #2c3549; stroke: rgba(255,255,255,.28); }
.pad-svg .dz { fill: rgba(255,159,67,.14); stroke: rgba(255,159,67,.7); stroke-width: 1.2; stroke-dasharray: 3 2; }
.pad-svg .trail { fill: none; stroke: rgba(255,159,67,.55); stroke-width: 2; }
.pad-svg .trig-fill { fill: var(--accent); opacity: .85; pointer-events: none; }
.pad-values { display: grid; grid-template-columns: 1.3fr 1.3fr .7fr .7fr; gap: .6rem; }
.pad-values div { background: var(--surface-2); border-radius: var(--radius-sm); padding: .55rem .8rem; }
.pad-values span { display: block; color: var(--muted); font-size: .78rem; }
.pad-values strong { font-variant-numeric: tabular-nums; font-size: .95rem; font-weight: 600; }
.pad-msg { font-size: .92rem; color: var(--muted); margin: .25rem 0 0; min-height: 1.2em; }
.pad-msg[data-tone="good"] { color: var(--ok); }
.pad-msg[data-tone="warn"] { color: #ffcc4d; }
.pad-details { margin-top: 1rem; border-top: 1px solid var(--border); padding-top: .75rem; }
.pad-details summary { cursor: pointer; color: var(--muted); font-size: .92rem; font-weight: 600; padding: .25rem 0 .75rem; }
.pad-details[open] summary { color: var(--text); }
@media (max-width: 560px) { .pad-values { grid-template-columns: 1fr 1fr; } }
.pad-svg { max-width: 580px; }
.pad-svg .trig .lbl { fill: #fff; paint-order: stroke; stroke: rgba(0,0,0,.35); stroke-width: 3px; }
.pad-msg:empty, .pad-drift-result:empty { display: none; }
