/* Workshop の共通の見た目（Spine が持つ）。モジュールの画面は、これを読んでから自分の CSS を書く。
   色はここの --ws-* を使う（モジュールの中の名前は、--ws-* に置き換えてよい）。
   見出し（ヘッダー）は spine/_header_start.html と spine/_header_end.html で組む。 */
/* 色はライト（:root）とダーク（data-theme="dark"）の 2 組。data-theme は spine/theme.js が付ける
   （「自動」なら OS の設定に合わせる）。画面に色を直接書かず、ここの --ws-* を使うこと。 */
:root {
  color-scheme: light;
  --ws-bg: #f3f4f6;
  --ws-panel: #ffffff;
  --ws-field: #ffffff;       /* 入力欄・白いボタン */
  --ws-ink: #1d2129;
  --ws-sub: #6b7280;
  --ws-faint: #8a8f98;       /* さらに薄い字 */
  --ws-line: #d4d7dd;
  --ws-thead: #fafbfc;       /* 表の見出し */
  --ws-soft: #f0f3f8;        /* 薄い面（丸い札・表の見出しの行） */
  --ws-off: #f1f2f4;         /* 使えない・休み */
  --ws-hover: #f0f4fb;
  --ws-accent: #1f6feb;
  --ws-accent-weak: #e8f0fe;
  --ws-ok: #1b7f3b;  --ws-ok-bg: #e7f6ec;
  --ws-ng: #b42318;  --ws-ng-bg: #fdecea;
  --ws-warn: #9a5b00; --ws-warn-bg: #fff6e0;
  --ws-violet: #6d28d9; --ws-violet-bg: #f3effd;
  --ws-chg: #fff1c2; --ws-new: #eef6ff;    /* 変えた・新しい行 */
  --ws-shade: rgba(17, 24, 39, .45);  --ws-shadow: rgba(0, 0, 0, .2);
  --ws-head: #1f2937; --ws-head-ink: #ffffff; --ws-head-sub: #cbd5e1; --ws-head-line: #4b5563; --ws-head-on: #374151;
  /* 図（積込表示など） */
  --ws-fig-bg: #ffffff; --ws-fig-line: #555555; --ws-fig-ink: #333333; --ws-fig-sub: #6b7280;
  --ws-fig-ok: #cfeedd; --ws-fig-ok-line: #1f8a4c;
  /* 見分ける色 12 色（容器など）。1 赤・2 橙・3 黄・4 黄緑・5 緑・6 青緑・7 水色・8 青・9 紫・10 桃・11 茶・12 灰。文字は --ws-fig-ink */
  --ws-pal-1: #f4a7a3; --ws-pal-2: #f8c08a; --ws-pal-3: #f1dc7e; --ws-pal-4: #cde79a; --ws-pal-5: #9fd8a8; --ws-pal-6: #8fd6cc;
  --ws-pal-7: #a3d8f0; --ws-pal-8: #a9bff5; --ws-pal-9: #c3a8ec; --ws-pal-10: #f2b0d4; --ws-pal-11: #d6b892; --ws-pal-12: #c4c9d0;
  --ws-font: "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ws-bg: #12161c;
  --ws-panel: #1b2029;
  --ws-field: #141922;
  --ws-ink: #e3e6eb;
  --ws-sub: #9ba4b1;
  --ws-faint: #7b8492;
  --ws-line: #353c48;
  --ws-thead: #222833;
  --ws-soft: #252c38;
  --ws-off: #232831;
  --ws-hover: #243047;
  --ws-accent: #5b9bff;
  --ws-accent-weak: #1e2d47;
  --ws-ok: #52c27f;  --ws-ok-bg: #173123;
  --ws-ng: #ff8174;  --ws-ng-bg: #3b1d1b;
  --ws-warn: #e3aa48; --ws-warn-bg: #352a12;
  --ws-violet: #b9a0ff; --ws-violet-bg: #2a2342;
  --ws-chg: #3b3214; --ws-new: #1b2940;
  --ws-shade: rgba(0, 0, 0, .6);  --ws-shadow: rgba(0, 0, 0, .55);
  --ws-head: #0c0f14; --ws-head-ink: #f1f3f6; --ws-head-sub: #a9b3c1; --ws-head-line: #3a414d; --ws-head-on: #252c37;
  --ws-fig-bg: #10141a; --ws-fig-line: #8d96a3; --ws-fig-ink: #eceff3; --ws-fig-sub: #b3bcc8;
  --ws-fig-ok: #1d4a31; --ws-fig-ok-line: #52c27f;
  --ws-pal-1: #7a3330; --ws-pal-2: #7a4a22; --ws-pal-3: #6b5d1e; --ws-pal-4: #4f6624; --ws-pal-5: #2b6038; --ws-pal-6: #22605a;
  --ws-pal-7: #245a73; --ws-pal-8: #2f4a85; --ws-pal-9: #523a7d; --ws-pal-10: #73345a; --ws-pal-11: #5e4630; --ws-pal-12: #4a505a;
}

/* ライト・ダークの切り替え（見出しのボタン） */
.ws-theme { white-space: nowrap; }

/* 見出し */
.ws-header { background: var(--ws-head); color: var(--ws-head-ink); padding: 8px 16px; display: flex; align-items: center;
  gap: 14px; flex-wrap: wrap; position: sticky; top: 0; z-index: 20; font-family: var(--ws-font); font-size: 14px; }
.ws-header h1 { font-size: 18px; margin: 0; font-weight: 600; color: var(--ws-head-ink); }
.ws-header a { color: var(--ws-head-ink); }
.ws-menu { display: inline-flex; align-items: center; gap: 6px; color: var(--ws-head-sub) !important; text-decoration: none;
  padding: 6px 10px; border-radius: 6px; border: 1px solid var(--ws-head-line); font-size: 14px; }
.ws-menu:hover, .ws-menu:focus-visible { color: var(--ws-head-ink) !important; background: var(--ws-head-on); outline: none; }
.ws-menu svg { width: 14px; height: 14px; }
/* モジュールの中の画面の切り替え（ページへのリンクでも、画面の中のタブのボタンでも同じ形） */
.ws-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.ws-nav a, .ws-nav button { background: transparent; color: var(--ws-head-sub); border: 0; padding: 7px 14px; border-radius: 6px;
  cursor: pointer; text-decoration: none; font: inherit; font-size: 15px; }
.ws-nav a:hover, .ws-nav button:hover { color: var(--ws-head-ink); }
.ws-nav a.active, .ws-nav button.active { background: var(--ws-head-on); color: var(--ws-head-ink); }
.ws-dim { color: var(--ws-head-sub); font-size: 13px; }
.ws-badge { font-size: 12px; background: #f59e0b; color: var(--ws-head); padding: 2px 8px; border-radius: 10px; }
.ws-right { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--ws-head-sub); font-size: 14px; }
.ws-right form { margin: 0; }
.ws-header .ws-btn { font: inherit; font-size: 14px; background: transparent; color: var(--ws-head-sub); border: 1px solid var(--ws-head-line);
  border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.ws-header .ws-btn:hover { color: var(--ws-head-ink); background: var(--ws-head-on); }
.ws-header .ws-btn.primary { background: var(--ws-accent); border-color: var(--ws-accent); color: #fff; }
