/* TV REMOTE for B — user manual styles
   Dark glassmorphism look matching the app (dark gradient + cyan glow). */

:root {
  --bg-top: #121729;
  --bg-mid: #05080f;
  --bg-bottom: #030308;
  --card: rgba(255, 255, 255, 0.06);
  --card-border: rgba(255, 255, 255, 0.14);
  --text: #e8ecf4;
  --text-dim: #9aa3b5;
  --cyan: #46d4e8;
  --cyan-dim: rgba(70, 212, 232, 0.35);
  --green: #4ade80;
  --orange: #fbbf24;
  --red: #f87171;
  --maxw: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.85;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-bottom) 100%) fixed;
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px 80px;
}

/* ---- Header / nav ---- */

header.site {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 20px 8px;
  text-align: center;
}

.app-icon {
  display: block;
  width: 80px; height: 80px;
  margin: 0 auto 16px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 0 28px rgba(70, 212, 232, 0.25);
}

header.site h1 {
  margin: 0 0 4px;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
}

header.site .tagline {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin: 0;
}

nav.tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 26px auto 12px;
  padding: 5px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lang-switch {
  margin: 0 auto 32px;
  text-align: center;
  font-size: 0.85rem;
}
.lang-switch a {
  color: var(--text-dim);
  text-decoration: none;
  font-weight: 600;
  padding: 0 7px;
}
.lang-switch a.active { color: var(--cyan); }
.lang-switch span { color: var(--text-dim); opacity: 0.45; }

nav.tabs a {
  padding: 8px 22px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 600;
  transition: color 0.15s;
}

nav.tabs a:hover { color: var(--text); }

nav.tabs a.active {
  color: var(--cyan);
  background: rgba(70, 212, 232, 0.14);
  text-shadow: 0 0 12px rgba(70, 212, 232, 0.6);
}

/* ---- Sections / cards ---- */

section { margin-bottom: 44px; }

h2 {
  font-size: 1.3rem;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

h2 .em { color: var(--cyan); }

h3 {
  font-size: 1.05rem;
  margin: 28px 0 10px;
  color: var(--cyan);
}

h4 {
  font-size: 0.98rem;
  margin: 22px 0 8px;
  color: var(--text);
}

p { margin: 0 0 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

.card h3 { margin-top: 0; }

.dim { color: var(--text-dim); font-size: 0.92rem; }

/* ---- Step list ---- */

ol.steps {
  list-style: none;
  counter-reset: step;
  margin: 0; padding: 0;
}

ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 18px 52px;
}

ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 2px;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: var(--cyan);
  background: rgba(70, 212, 232, 0.12);
  border: 1.5px solid var(--cyan-dim);
  box-shadow: 0 0 10px rgba(70, 212, 232, 0.2);
}

ol.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px; top: 38px; bottom: 2px;
  width: 1.5px;
  background: rgba(70, 212, 232, 0.2);
}

ol.steps b { color: var(--text); }

/* ---- Inline UI tokens ---- */

.btn {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.88em;
  font-weight: 600;
  white-space: nowrap;
}

.btn.ok {
  border-color: rgba(110, 130, 255, 0.7);
  box-shadow: 0 0 8px rgba(100, 125, 255, 0.45);
}

.btn.cyan { color: var(--cyan); border-color: var(--cyan-dim); }
.btn.red  { color: var(--red); }

.badge {
  display: inline-block;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 700;
}
.badge.on      { color: var(--green);  background: rgba(74, 222, 128, 0.14); }
.badge.standby { color: var(--orange); background: rgba(251, 191, 36, 0.14); }
.badge.off     { color: var(--text-dim); background: rgba(255, 255, 255, 0.08); }

/* ---- Tables ---- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  margin: 8px 0 16px;
}

th, td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: top;
}

th {
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

td:first-child { white-space: nowrap; font-weight: 600; }

/* ---- Notes ---- */

.note, .tip {
  border-radius: 12px;
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 0.92rem;
}

.tip {
  background: rgba(70, 212, 232, 0.08);
  border: 1px solid rgba(70, 212, 232, 0.25);
}
.tip::before { content: "💡 "; }

.note {
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.25);
}
.note::before { content: "⚠️ "; }

/* ---- Misc ---- */

ul { padding-left: 1.3em; margin: 0 0 14px; }
li { margin-bottom: 4px; }

a { color: var(--cyan); }

footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 24px 20px 48px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* TOC on the details page */
.toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-bottom: 36px;
}
.toc a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.toc a:hover {
  border-color: var(--cyan-dim);
  box-shadow: 0 0 12px rgba(70, 212, 232, 0.18);
}

/* Line icons matching the app's SF Symbols (drawn in the #sprite svg). */
.ic-svg {
  width: 22px;
  height: 22px;
  flex: none;
  color: var(--cyan);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
h2 .ic-svg.ic-h2 {
  vertical-align: -4px;
  margin-right: 9px;
}
.ic-svg.ic-inline {
  width: 17px;
  height: 17px;
  vertical-align: -3px;
}

/* ---- Code / macro blocks ---- */
pre.macro {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 12px 0;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-dim);
}
code.k {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  background: var(--cyan-dim);
  color: var(--text);
  border-radius: 5px;
  padding: 1px 6px;
}

@media (max-width: 520px) {
  header.site { padding-top: 32px; }
  .card { padding: 16px; }
  th, td { padding: 8px 8px; }
}
