
    :root {
      --bg-app: #09090b;
      --bg-sidebar: #0f1117;
      --bg-card: #141824;
      --bg-elev: #1a202c;
      --border: #27272a;
      --border-subtle: #1e2433;
      --border-focus: #3b82f6;
      --text: #f4f4f5;
      --text-muted: #94a3b8;
      --text-dim: #64748b;
      --accent: #4ade80;
      --accent-glow: rgba(74, 222, 128, 0.15);
      --accent-blue: #38bdf8;
      --hover: rgba(255, 255, 255, 0.05);
      --active-bg: rgba(74, 222, 128, 0.12);
      --code-bg: #141923;
      --code-fg: #f1f5f9;
      --sidebar-width: 300px;
      --header-height: 56px;
      --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    html {
      scroll-behavior: smooth;
    }

    body {
      background: var(--bg-app);
      color: var(--text);
      font-family: var(--font-family);
      line-height: 1.6;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      overflow-x: hidden;
    }

    /* ヘッダー */
    .guide-header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: var(--header-height);
      background: rgba(15, 17, 23, 0.95);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 20px;
      z-index: 100;
    }

    .guide-header-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .menu-toggle-btn {
      display: none;
      background: transparent;
      border: 1px solid var(--border);
      color: var(--text);
      padding: 6px 10px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 16px;
    }

    .brand-link {
      display: flex;
      align-items: center;
      gap: 8px;
      text-decoration: none;
      color: var(--text);
    }

    .brand-logo {
      font-weight: 800;
      font-size: 18px;
      letter-spacing: 0.05em;
      color: var(--accent);
    }

    .brand-sub {
      font-size: 13px;
      color: var(--text-muted);
      border-left: 1px solid var(--border);
      padding-left: 8px;
      margin-left: 4px;
    }

    .portal-return-link {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      color: var(--accent-blue);
      text-decoration: none;
      padding: 6px 12px;
      border-radius: 6px;
      border: 1px solid rgba(56, 189, 248, 0.2);
      background: rgba(56, 189, 248, 0.05);
      transition: all 0.2s ease;
    }

    .portal-return-link:hover {
      background: rgba(56, 189, 248, 0.15);
      border-color: var(--accent-blue);
      color: #fff;
    }

    /* メインレイアウト（2ペイン） */
    .guide-container {
      display: flex;
      margin-top: var(--header-height);
      min-height: calc(100vh - var(--header-height));
    }

    /* サイドバー */
    .guide-sidebar {
      width: var(--sidebar-width);
      position: fixed;
      top: var(--header-height);
      bottom: 0;
      left: 0;
      background: var(--bg-sidebar);
      border-right: 1px solid var(--border);
      display: flex;
      flex-direction: column;
      z-index: 90;
      transition: transform 0.3s ease;
    }

    .guide-search-box {
      padding: 12px 16px;
      border-bottom: 1px solid var(--border);
      position: relative;
    }

    .search-input-wrapper {
      position: relative;
      display: flex;
      align-items: center;
    }

    .search-icon {
      position: absolute;
      left: 10px;
      width: 14px;
      height: 14px;
      color: var(--text-dim);
      pointer-events: none;
    }

    .guide-search-input {
      width: 100%;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 7px 10px 7px 32px;
      font-size: 13px;
      color: var(--text);
      outline: none;
      transition: border-color 0.2s ease;
    }

    .guide-search-input:focus {
      border-color: var(--border-focus);
    }

    .search-clear-btn {
      position: absolute;
      right: 8px;
      background: transparent;
      border: none;
      color: var(--text-dim);
      font-size: 14px;
      cursor: pointer;
      display: none;
      padding: 2px 6px;
    }

    .search-count {
      margin-top: 6px;
      font-size: 11px;
      color: var(--text-dim);
      padding: 0 4px;
    }

    .guide-toc {
      flex: 1;
      overflow-y: auto;
      padding: 10px 8px;
      display: flex;
      flex-direction: column;
      gap: 2px;
    }

    .guide-toc-section-title {
      font-size: 11px;
      font-weight: 700;
      color: var(--text-dim);
      text-transform: uppercase;
      letter-spacing: 0.05em;
      padding: 8px 10px 4px;
    }

    .toc-item {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      border-radius: 6px;
      text-decoration: none;
      color: var(--text-muted);
      font-size: 13px;
      line-height: 1.4;
      transition: all 0.15s ease;
      cursor: pointer;
    }

    .toc-item:hover {
      background: var(--hover);
      color: var(--text);
    }

    .toc-item.is-active {
      background: var(--active-bg);
      color: var(--accent);
      font-weight: 600;
      border-left: 2px solid var(--accent);
    }

    .toc-num {
      font-size: 11px;
      color: var(--text-dim);
      min-width: 18px;
    }

    .toc-item.is-active .toc-num {
      color: var(--accent);
    }

    .toc-empty-msg {
      display: none;
      padding: 24px 16px;
      text-align: center;
      color: var(--text-dim);
      font-size: 13px;
    }

    /* 右ペイン（コンテンツ） */
    .guide-main {
      flex: 1;
      min-width: 0;
      box-sizing: border-box;
      margin-left: var(--sidebar-width);
      padding: 32px 48px 120px;
      max-width: 960px;
    }

    /* 「最初の使い方」カードセクション */
    .tutorial-section {
      background: linear-gradient(180deg, #141a29 0%, #101420 100%);
      border: 1px solid #2d374d;
      border-radius: 12px;
      padding: 28px 32px;
      margin-bottom: 48px;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    }

    .tutorial-badge {
      display: inline-block;
      font-size: 12px;
      font-weight: 600;
      color: var(--accent);
      background: var(--accent-glow);
      border: 1px solid rgba(74, 222, 128, 0.3);
      padding: 3px 10px;
      border-radius: 20px;
      margin-bottom: 12px;
    }

    .tutorial-title {
      font-size: 24px;
      font-weight: 700;
      margin-bottom: 8px;
      color: #fff;
    }

    .tutorial-lead {
      font-size: 14px;
      color: var(--text-muted);
      margin-bottom: 24px;
      line-height: 1.6;
    }

    .tutorial-steps-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 16px;
    }

    .step-card {
      background: rgba(26, 32, 48, 0.6);
      border: 1px solid #2d374d;
      border-radius: 8px;
      padding: 16px 20px;
      display: flex;
      gap: 16px;
      align-items: flex-start;
    }

    .step-num-badge {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--accent);
      color: #000;
      font-weight: 700;
      font-size: 14px;
      flex-shrink: 0;
      margin-top: 2px;
    }

    .step-content {
      flex: 1;
    }

    .step-heading {
      font-size: 15px;
      font-weight: 700;
      color: #fff;
      margin-bottom: 6px;
    }

    .step-desc {
      font-size: 13.5px;
      color: #cbd5e1;
      line-height: 1.6;
    }

    .ui-tag {
      display: inline-block;
      font-weight: 600;
      color: #7dd3fc;
      background: rgba(56, 189, 248, 0.12);
      border: 1px solid rgba(56, 189, 248, 0.25);
      border-radius: 4px;
      padding: 1px 6px;
      margin: 0 2px;
      font-size: 12.5px;
    }

    /* 章セクション */
    .guide-chapter {
      padding-top: 24px;
      margin-bottom: 48px;
      border-bottom: 1px solid var(--border-subtle);
      padding-bottom: 40px;
    }

    .guide-chapter:last-child {
      border-bottom: none;
    }

    .chapter-anchor-target {
      scroll-margin-top: calc(var(--header-height) + 16px);
    }

    /* Markdown スタイル */
    .guide-chapter h1 {
      font-size: 26px;
      font-weight: 800;
      color: #fff;
      margin-top: 0;
      margin-bottom: 20px;
      padding-bottom: 10px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .chapter-idx-badge {
      font-size: 12px;
      font-weight: 600;
      color: var(--accent);
      background: var(--accent-glow);
      border: 1px solid rgba(74, 222, 128, 0.2);
      border-radius: 4px;
      padding: 2px 8px;
    }

    .guide-chapter h2 {
      font-size: 19px;
      font-weight: 700;
      color: #f1f5f9;
      margin-top: 32px;
      margin-bottom: 14px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.06);
      padding-bottom: 6px;
    }

    .guide-chapter h3 {
      font-size: 16px;
      font-weight: 600;
      color: #e2e8f0;
      margin-top: 24px;
      margin-bottom: 10px;
    }

    .guide-chapter p {
      font-size: 14px;
      color: #cbd5e1;
      margin-bottom: 16px;
      line-height: 1.7;
    }

    .guide-chapter ul, .guide-chapter ol {
      margin-bottom: 18px;
      padding-left: 24px;
      font-size: 14px;
      color: #cbd5e1;
    }

    .guide-chapter li {
      margin-bottom: 6px;
      line-height: 1.6;
    }

    .guide-chapter code {
      background: var(--code-bg);
      border: 1px solid var(--border);
      border-radius: 4px;
      padding: 2px 6px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
      font-size: 12.5px;
      color: #38bdf8;
    }

    .guide-chapter pre {
      background: var(--code-bg);
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 14px 18px;
      overflow-x: auto;
      margin-bottom: 20px;
    }

    .guide-chapter pre code {
      background: transparent;
      border: none;
      padding: 0;
      color: var(--code-fg);
    }

    .guide-chapter table {
      width: 100%;
      border-collapse: collapse;
      margin-bottom: 20px;
      font-size: 13.5px;
    }

    .guide-chapter th, .guide-chapter td {
      padding: 10px 14px;
      border: 1px solid var(--border);
      text-align: left;
    }

    .guide-chapter th {
      background: var(--bg-card);
      font-weight: 700;
      color: #fff;
    }

    .guide-chapter tr:nth-child(even) td {
      background: rgba(255, 255, 255, 0.02);
    }

    .guide-chapter hr {
      border: 0;
      border-top: 1px solid var(--border);
      margin: 32px 0;
    }

    .guide-chapter blockquote {
      border-left: 3px solid var(--border-focus);
      background: rgba(59, 130, 246, 0.08);
      padding: 10px 18px;
      border-radius: 0 6px 6px 0;
      margin-bottom: 18px;
      color: #e2e8f0;
    }

    .guide-chapter a {
      color: var(--accent-blue);
      text-decoration: underline;
    }

    /* レスポンシブ対応 (狭幅 768px 以下) */
    @media (max-width: 768px) {
      .menu-toggle-btn {
        display: inline-block;
      }

      .guide-sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.5);
      }

      .guide-sidebar.is-open {
        transform: translateX(0);
      }

      .guide-main {
        margin-left: 0;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
        padding: 20px 16px 80px;
      }

      .tutorial-section {
        padding: 20px 16px;
      }

      .brand-sub {
        display: none;
      }
    }

    /* サイドバー オーバーレイ (モバイル用) */
    .sidebar-overlay {
      display: none;
      position: fixed;
      top: var(--header-height);
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(4px);
      z-index: 85;
    }

    .sidebar-overlay.is-visible {
      display: block;
    }


    #guide-language-controls { padding:12px 16px; border-bottom:1px solid var(--border); }
    #guide-language-controls label { display:block; font-size:12px; color:var(--text-muted); }
    #guide-language { width:100%; padding:8px; background:var(--bg-elev); color:var(--text); border:1px solid var(--border); border-radius:6px; }
    #guide-translation-status { font-size:12px; color:var(--text-muted); margin-top:6px; }
    #guide-translation-retry { padding:6px 10px; margin-top:6px; }
    .guide-soon-badge { display:inline-block; margin-left:4px; padding:1px 6px; border:1px solid rgba(56,189,248,.3); border-radius:4px; color:var(--accent-blue); font-size:10px; white-space:nowrap; }
    .guide-coming-soon { padding:20px; border:1px solid var(--border); border-radius:8px; background:var(--bg-card); color:var(--text-muted); }
    .guide-coming-soon strong { color:var(--accent-blue); }
    .guide-screenshot { margin:24px 0; }
    .guide-screenshot img { display:block; max-width:100%; width:auto; height:auto; border:1px solid var(--border); border-radius:10px; }
    .guide-screenshot figcaption { font-size:12px; color:var(--text-muted); margin-top:8px; }
    @media(max-width:600px) { .brand-sub { display:none; } .portal-return-link { font-size:11px; padding:5px; } }
