/* AI Shell Switch — Labs page
   開発ツールらしい、クールで精密な一枚のページ。装飾より罫線と余白。 */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #171a21;
  --muted: #59616e;
  --faint: #8a93a1;
  --line: #e2e5ea;
  --line-strong: #d3d7de;
  --code-bg: #eef0f3;
  --code-ink: #343a45;
  --accent: #0b8276;        /* アイコンのトグル色。リンク・番号に使用 */
  --accent-weak: rgba(11, 130, 118, .16);
  --button-bg: #171a21;
  --button-ink: #ffffff;
  --button-hover: #2c3140;
  --terminal-bg: #1b1e26;
  --terminal-bar: #262a34;
  --terminal-ink: #dde1e8;
  --terminal-muted: #8a93a1;
  --terminal-prompt: #63d8c9;
  --dot-grid: rgba(23, 26, 33, .07);
  --win-body: #f2f3f5;
  --win-bar: #e7e9ec;
  --win-border: #d3d7de;
  --win-btn: #ffffff;
  --win-btn-border: #c9cdd5;
  --win-muted: #656d7a;
  --win-faint: #939ba8;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101216;
    --surface: #16181e;
    --ink: #e6e8ec;
    --muted: #9aa2ae;
    --faint: #6f7783;
    --line: #262a32;
    --line-strong: #333844;
    --code-bg: #1c1f26;
    --code-ink: #ccd1d9;
    --accent: #4fc9ba;
    --accent-weak: rgba(79, 201, 186, .2);
    --button-bg: #e6e8ec;
    --button-ink: #101216;
    --button-hover: #c9cdd5;
    --terminal-bg: #0c0e12;
    --terminal-bar: #181b21;
    --terminal-ink: #d6dae1;
    --terminal-muted: #6f7783;
    --terminal-prompt: #4fc9ba;
    --dot-grid: rgba(230, 232, 236, .06);
    --win-body: #1b1e24;
    --win-bar: #23262e;
    --win-border: #333844;
    --win-btn: #262a32;
    --win-btn-border: #3b404c;
    --win-muted: #9aa2ae;
    --win-faint: #6f7783;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.95;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

::selection { background: var(--accent-weak); }

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

img { max-width: 100%; }

code {
  font-family: var(--mono);
  font-size: .85em;
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 2px 6px;
  border-radius: 5px;
}

pre {
  margin: 14px 0 0;
  padding: 14px 18px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  line-height: 1.7;
}
pre code { background: none; padding: 0; font-size: 13px; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 76px 0;
}

/* ---- ヘッダー ---- */

.site-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.site-head .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
}
.site-head .brand img { border-radius: 7px; }
.site-head nav a {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
}
.site-head nav a:hover { color: var(--accent); text-decoration: underline; }

/* ---- イントロ ---- */

.intro {
  position: relative;
  padding: 64px 0 8px;
}
.intro::before {
  content: "";
  position: absolute;
  inset: 0 -120px -40px;
  background-image: radial-gradient(circle, var(--dot-grid) 1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 42% 12%, black, transparent);
  mask-image: radial-gradient(ellipse 90% 75% at 42% 12%, black, transparent);
  pointer-events: none;
}
.intro > * { position: relative; }

.labs-line {
  margin: 0 0 34px;
  color: var(--faint);
  font-size: 13px;
}

.intro-icon {
  display: block;
  border-radius: 20px;
  margin-bottom: 28px;
  filter: drop-shadow(0 10px 20px rgba(16, 20, 40, .18));
}

h1 {
  margin: 0 0 22px;
  font-size: clamp(27px, 5.4vw, 38px);
  line-height: 1.45;
  letter-spacing: .02em;
  font-weight: 700;
  font-feature-settings: "palt" 1;
}

.lead { margin: 0; font-size: 17px; }

.spec {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}
.spec li {
  padding: 4px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .01em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 22px;
  background: var(--button-bg);
  color: var(--button-ink);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  transition: background-color .15s ease;
}
.button:hover { background: var(--button-hover); }

.textlink { font-size: 14.5px; }

.build-note {
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
}

/* ---- アプリ画面の再現 ---- */

.app-window { margin: 48px 0 0; }

.win {
  max-width: 440px;
  overflow: hidden;
  border: 1px solid var(--win-border);
  border-radius: 12px;
  background: var(--win-body);
  box-shadow: 0 24px 48px rgba(10, 14, 28, .12), 0 2px 8px rgba(10, 14, 28, .06);
  font-size: 13px;
  line-height: 1.6;
}

.win-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 13px;
  background: var(--win-bar);
  border-bottom: 1px solid var(--win-border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot-r { background: #ff5f57; }
.dot-y { background: #febc2e; }
.dot-g { background: #28c840; }
.win-title {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  color: var(--win-muted);
  font-size: 12.5px;
  font-weight: 600;
  pointer-events: none;
}

.win-body { padding: 20px 24px 14px; }
.win-head { display: flex; align-items: center; gap: 13px; }
.win-head img { border-radius: 11px; }
.win-head strong { display: block; font-size: 18px; line-height: 1.35; }
.win-head span { display: block; color: var(--win-muted); font-size: 11.5px; }
.win-status { margin: 16px 0 0; font-size: 16px; font-weight: 700; }
.win-detail { margin: 6px 0 0; color: var(--win-muted); font-size: 12.5px; }
.win-power { margin: 10px 0 0; font-size: 12px; font-weight: 500; font-family: var(--mono); }
.win-buttons { display: flex; gap: 10px; margin-top: 14px; }
.mac-btn {
  flex: 1;
  padding: 7px 10px;
  text-align: center;
  background: var(--win-btn);
  border: 1px solid var(--win-btn-border);
  border-radius: 7px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-foot {
  margin: 14px 0 0;
  color: var(--win-faint);
  text-align: center;
  font-size: 11px;
}

.app-window figcaption {
  margin-top: 12px;
  color: var(--faint);
  font-size: 12.5px;
}

/* ---- 本文セクション ---- */

section { margin: 60px 0; }
.intro { margin: 0; }

h2 {
  margin: 0 0 14px;
  font-size: 21px;
  line-height: 1.6;
  letter-spacing: .02em;
  font-weight: 700;
  font-feature-settings: "palt" 1;
}

section p { margin: 0 0 10px; }

ul.plain {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
ul.plain li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
}
ul.plain li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--faint);
}

/* ターミナル例 */

.terminal-frame {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--terminal-bg);
  box-shadow: 0 16px 32px rgba(10, 14, 28, .10);
}
.terminal-frame .term-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  background: var(--terminal-bar);
}
.terminal-frame .term-bar .dot { width: 11px; height: 11px; opacity: .9; }
.term-title {
  position: absolute;
  left: 0; right: 0;
  text-align: center;
  color: var(--terminal-muted);
  font-family: var(--mono);
  font-size: 11.5px;
  pointer-events: none;
}
pre.terminal {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--terminal-ink);
  padding: 16px 20px 18px;
}
pre.terminal code { color: inherit; }
pre.terminal .prompt { color: var(--terminal-prompt); }

/* コマンド一覧 */

.commands {
  margin: 22px 0 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.commands > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  padding: 11px 16px;
  border-top: 1px solid var(--line);
}
.commands > div:first-child { border-top: 0; }
.commands dt { min-width: 108px; margin: 0; }
.commands dt code { background: none; padding: 0; color: var(--accent); font-size: 13px; }
.commands dd { margin: 0; color: var(--muted); font-size: 14px; }

/* インストール手順 */

ol.steps {
  margin: 22px 0 0;
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 44px;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
}
ol.steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 34px;
  bottom: 4px;
  width: 1px;
  background: var(--line);
}
ol.steps p { margin: 0; }

.fine {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.9;
  margin-top: 18px;
}

/* ---- フッター ---- */

.site-foot {
  margin-top: 84px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
}
.site-foot p { margin: 0; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--accent); }

/* ---- モバイル ---- */

@media (max-width: 600px) {
  body { font-size: 16px; line-height: 1.85; }
  h1 br { display: none; }
  h1 { line-height: 1.5; }
  .wrap { padding: 0 20px; }
  .intro { padding-top: 40px; }
  .intro::before { opacity: .6; }
  .intro-icon { width: 72px; height: 72px; }
  .lead { font-size: 16px; }
  .spec li { font-size: 11.5px; }
  .actions { gap: 14px; }
  .actions .button { width: 100%; justify-content: center; }
  .actions .textlink { margin-left: 2px; }
  hr { margin: 56px 0; }
  section { margin: 52px 0; }
  h2 { font-size: 19px; }
  .terminal-frame { margin-left: -20px; margin-right: -20px; border-radius: 0; border-left: 0; border-right: 0; }
  pre.terminal code { font-size: 12.5px; }
  .commands { margin-left: -20px; margin-right: -20px; border-radius: 0; border-left: 0; border-right: 0; }
  .commands dt { min-width: 100%; }
  .commands dt code { font-size: 13.5px; }
  .win-body { padding: 16px 16px 12px; }
  .win-detail { font-size: 13px; }
  .win-buttons { flex-direction: column; }
  .mac-btn { white-space: normal; padding: 9px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
