

    :root {
      --bg-main: #181c20;
      --bg-panel: #23272e;
      --accent: #1698dc;
      --accent2: #0a2233;
      --text-main: #e0e0e0;
      --text-accent: #1698dc;
      --danger: #ff4d4d;
      --table-header: #23272e;
      --table-row-alt: #22282f;
    }

    body {
      background: var(--bg-main);
      color: var(--text-main);
      font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
      margin: 0;
      min-height: 100vh;
    }

    a:any-link{
    color: #1698dc;
  }

    .wrapper {
      margin: 0 auto;
      padding: 0;
    }

    /* ヘッダー */
    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: var(--bg-panel);
      padding: 0.7em 1.2em;
      border-radius: 0 0 8px 8px;
      position: relative;
      min-height: 56px;
    }
    .logo a {
      color: #fff;
      font-size: 1.5em;
      font-weight: bold;
      text-decoration: none;
      letter-spacing: 1px;
    }
    .logo img {
      height: 48px;

    }

    /* ハンバーガーメニュー */
    .menu-toggle {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      width: 44px;
      height: 44px;
      cursor: pointer;
      background: none;
      border: none;
      z-index: 20;
      margin-left: 12px;
    }
    .menu-toggle span {
      display: block;
      width: 32px;
      height: 4px;
      background: #1698dc;
      border-radius: 2px;
      margin: 4px 0;
      transition: all 0.2s;
    }

    /* グローバルナビ */
    .global-nav {
      position: absolute;
      top: 100%;
      right: 0;
      width: 180px;
      background: #23272e;
      border-radius: 0 0 8px 8px;
      box-shadow: 0 4px 16px rgba(0,0,0,0.18);
      display: none;
      flex-direction: column;
      z-index: 15;
    }
    .global-nav.active {
      display: flex;
    }
    .global-nav ul {
      flex-direction: column;
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;

    }
    .global-nav li {
      border-bottom: 1px solid #333;
    }
    .global-nav a {
      color: #fff;
      text-decoration: none;
      font-weight: 500;
      padding: 16px 24px;
      display: block;
      text-align: left;
      transition: background 0.2s, color 0.2s;
    }
    .global-nav a:hover {
      color: #bdf0ff;
    }

    /* PC時はグローバルナビを横並びに */
    @media (min-width: 701px) {
      .global-nav {
        position: static;
        display: flex !important;
        flex-direction: row;
        background: none;
        box-shadow: none;
        width: auto;
        border-radius: 0;
      }
      .global-nav ul {
        flex-direction: row;
      }
      .global-nav li {
        border-bottom: none;
      }
      .global-nav a {
        padding: 0 18px;
        color: #fff;
        background: none;
        text-align: center;
        line-height: 55px;
      }
      .menu-toggle {
        display: none !important;
      }
    }

    /* コンテンツ */
    .content {
      max-width: 1630px;
      padding: 2em 1em;
      background: none;
        margin: 0 auto;
    }

    /* テーブルレスポンシブ */
    .table-responsive {
      width: 100%;
      overflow-x: auto;
    }
    table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      background: var(--bg-panel);
      color: var(--text-main);
      margin-bottom: 2em;
      border-radius: 8px;
      font-size: 11px;
      /* min-width: 1000px; */
    }
    th, td {
      padding: 8px 10px;
      text-align: center;
    }
    th {
      background: var(--table-header);
      color: #fff;
      font-weight: bold;
    }
    tbody tr:nth-child(even) {
      background: var(--table-row-alt);
    }
    tbody tr:hover {
      background: #2a2f38;
    }
    @media (max-width: 900px) {
      .table-responsive table {
        /* min-width: 600px; */
      }
    }

    /* ボタン・フォーム */
    button, input[type="submit"], form button {
      background: var(--accent);
      color: #ffffff;
      border: none;
      border-radius: 4px;
      padding: 0.5em 1.2em;
      font-size: 1em;
      font-weight: bold;
      margin: 0.2em 0.2em;
      cursor: pointer;
      transition: background 0.2s;
    }
    button:hover, input[type="submit"]:hover, form button:hover {
      background: #1074aa;
    }
    input, select, textarea {
      background: #181c20;
      color: var(--text-main);
      border: 1px solid #444;
      border-radius: 4px;
      padding: 0.5em;
      margin-bottom: 0.5em;
    }

    /* 見出し */
    h2 {
      color: #fff;
      margin-top: 2em;
      margin-bottom: 0.5em;
      font-size: 1.3em;
      border-left: 6px solid var(--accent2);
      padding-left: 0;
    }

    /* チェックボックスグリッド */
    .tickers-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
      margin-bottom: 1em;
    }
    .tickers-grid label, .ticker-label {
      display: flex;
      align-items: center;
      padding: 4px;
      gap: 0.5em;
      font-size: 14px;
    }
    .tickers-grid input[type="checkbox"] {
      width: 18px;
      height: 18px;
      margin: 0 4px 0 0;
    }
    @media (min-width: 768px) {
      .tickers-grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }
    .l-break {
      word-break: break-word;
      min-width: 100px;
    }
    .checkbox-controls {
      margin-bottom: 1em;
    }
    .checkbox-controls button {
      min-width: 110px;
    }

    .bad{
      background-color: #0ed3d626;
      color: #1ad1d6;
    }
    .good{
      background-color: #db00552e;
      color: #ff004a;
    }

    /* 中間評価（しきい値近辺） */
    .mid{
      background-color: rgba(200,160,0,0.20);
      color: #e0c060;
    }

    /* プラス/マイナス表示の標準色（全ページ共通） */
    .profit-plus { color:#ff0055; }
    .profit-minus { color:#12ddd6; }
    .profit-zero { color:#444; }

    /* Watch の NO POS 行などに使う薄赤背景 */

  /* 強制適用: 行全体のセル背景を上書きして、nth-child 等のルールより優先させる */
  tr.sell-bg td { background-color: rgba(255, 0, 0, 0.12) !important; }

    /* Dropdown styles (moved from base.html inline) */
    .global-nav ul { list-style: none; margin: 0; padding: 0; }
    .global-nav li { position: relative; }
    .global-nav .dropdown > a::after { content: "▼"; font-size: 0.7em; margin-left: 6px; }
    .global-nav .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: auto;
        right: 0;
        background: #1f1f1f;
        color: #eee;
        min-width: 180px;
        max-width: calc(100vw - 24px);
        overflow-x: auto;
        border: 1px solid #444;
        box-shadow: 0 2px 10px rgba(0,0,0,0.25);
        z-index: 1000;
    }
    .global-nav .dropdown-menu li a {
        display: block;
        padding: 8px 12px;
        white-space: nowrap;
        color: #eee;
        text-decoration: none;
    }
    .global-nav .dropdown-menu li a:hover {
        background: #333;
        color: #fff;
    }
    .global-nav .dropdown:hover > .dropdown-menu { display: block; }
    .global-nav .dropdown.open > .dropdown-menu { display: block; }
    .global-nav.active .dropdown-menu {
        position: static;
        border: none;
        box-shadow: none;
        background: #1f1f1f;
    }

    /* --- Badge styles (Bootstrap-like) --- */
    .badge {
      display: inline-block;
      padding: 0.2rem 0.5rem;
      border-radius: 0.25rem;
      font-size: 0.85em;
      font-weight: 600;
      line-height: 1;
      white-space: nowrap;
      vertical-align: baseline;
    }
    .bg-success { background-color: #198754; color: #fff; }
    .bg-warning { background-color: #ffc107; color: #000; }
    .bg-danger  { background-color: #dc3545; color: #fff; }
    .bg-secondary { background-color: #6c757d; color: #fff; }
    .text-dark { color: #000 !important; }