/* =======================================================================
   ROCK PAINT Web UI
   構成：
     1) グローバルトークン & ベース
     2) 固定ヘッダー／フッター
     3) サイドバー & レイアウト（共通）
     4) 共有コンポーネント（カード／ボトムナビ／トースト）
     5) 検索結果（index）専用
     6) 検索前画面（search.html）専用
   ======================================================================= */

/* -----------------------------------------------------------------------
   1) グローバルトークン & ベース
   ----------------------------------------------------------------------- */
:root {
  /* レイアウト寸法 */
  --ui-sidebar-width: 80px;
  --ui-gap: 16px;
  --ui-radius: 10px;

  /* カラー（共通） */
  --ui-border: #e5e7eb;
  /* 枠線 */
  --ui-bg: #fff;
  /* コンポーネント背景（白） */
  --ui-app-bg: #f3f4f6;
  /* ページ背景（薄グレー） */
  --ui-text: #454545;
  /* 本文色 */
  --ui-muted: #6b7280;
  /* 補助文字色 */

  /* 固定バー高さ */
  --ui-header-h: 56px;
  --ui-header-h2: 76px;
  --ui-footer-h: 44px;
  --ui-header-decor-h: 20px;

  /* テーブル用 */
  --tbl-grid: #ccc;
  /* セル間の点線 */
  --tbl-key-bg: #f3f4f6;
  /* Keyラベル背景 */
  --tbl-score-w: 160px;
  /* 右端スコア列幅 */

  /* プライマリ */
  --ui-primary: #2563eb;
  --ui-primary-hover: #1d4ed8;
  --ui-primary-border: #1e40af;
  --tbl-active: var(--ui-primary);

  /* ボトムナビ */
  --bn-bg: #241717;
  --bn-hover: #f97316;

  /* Dark Green（ヘッダー帯／緑アクセント） */
  --ui-dark-green: #015E4B;
  --ui-dark-green-ink: #ffffff;

  /* blue（ヘッダー帯／青アクセント） */
  --ui-blue: #2563eb;
  --ui-blue-ink: #ffffff;

  /* フォーム系（検索前画面で使用） */
  --field-h: 38px;
  /* 入力高さ（基準） */
  --field-h-up: calc(var(--field-h) * 1.15);
  /* 入力高さ +15% */
  --field-w: 300px;
  /* 入力幅（例：288px） */
  --label-w: 116px;
  /* 見出し幅（例：116px） */
  --select-accent-w: 60px;
  /* 右端の緑帯の幅（大きいほど左へ） */
  --divider-color: var(--ui-border);
  /* 区切り線色 */

  /* 行間のゆとり */
  --row-gap-up: 4px;
  /* 行間（既定8px→少し広げる） */
  --row-pad-block: 6px;
  /* dd上下パディングで“背”を足す */

  /* アコーディオン検索パネル用 */
  --accordion-search-panel-width: 420px;
  /* パネル幅：*/
  --accordion-search-panel-bg: #ffffff;
  /* 背景色 */
  --accordion-search-panel-border: var(--ui-border);
  /* 枠色：既存の ui-border を活用 */
  --accordion-search-panel-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  /* 影（薄め） */

  /* オーバーレイの濃度（弱めに） */
  --search-overlay-opacity: 0.06;
  /* 0.04〜0.08 くらいが「さりげない」 */

  /* ui-primary系のフォーカス影 */
  --settings-focus: rgba(37, 99, 235, 0.25);

  /* スピナー用の共通変数 */
  --score-spinner-size: 20px;
  /* スピナー直径 */
  --score-spinner-thick: 3px;
  /* 線の太さ */
  --score-spinner-base: #ccc;
  /* ベース色 */
  --score-spinner-accent: #0078d4;
  /* 強調色（Microsoft系ブルー例） */

}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", sans-serif;
  color: var(--ui-text);
  background: var(--ui-app-bg);
}

li {
  list-style-type: none;
}

a {
  text-decoration: none;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

table {
  border-collapse: collapse;
  border: none;
}

select:focus,
input:focus {
  transition: box-shadow .15s ease, border-color .15s ease;
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 2px var(--settings-focus);
}

/* ローディングアニメーション */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* スピナーの見た目 */
.spinner {
  width: 2rem;
  height: 2rem;
  border: 0.25rem solid #cccccc;
  /* 外枠色（薄め） */
  border-top-color: #0078d4;
  /* 強調色（例: Microsoftブルー） */
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ====== 状態用ユーティリティ ====== */
.is-loading {
  /* ローディング時に使う共通クラス */
}

.is-loaded {
  /* 完了時に使う共通クラス */
}

.page {
  position: relative;
  min-height: 100vh;
}

.page.is-loading::before,
.page.is-loading::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
}

/* 背景の薄暗幕 */
.page.is-loading::before {
  background: rgba(255, 255, 255, 0.85);
}

/* 中央にスピナー配置 */
.page.is-loading::after {
  display: grid;
  place-items: center;
}

/* 擬似要素にスピナーを描く（要素不要） */
.page.is-loading::after {
  --size: 48px;
  --thick: 6px;
  --base: #ccc;
  --accent: #0078d4;

  content: '';
  width: var(--size);
  height: var(--size);
  margin: auto;
  border: var(--thick) solid var(--base);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* 完了時はオーバーレイをフェードアウト */
.page.is-loaded::before,
.page.is-loaded::after {
  animation: fadeOut 200ms ease forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* -----------------------------------------------------------------------
   2) 固定ヘッダー／フッター
   ----------------------------------------------------------------------- */

.app-header,
.app-footer {
  position: fixed;
  left: 0;
  right: 0;
  background: #241717;
  color: #fff;
  z-index: 10000;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.app-header {
  top: 0;
  height: var(--ui-header-h);
}

.app-footer {
  bottom: 0;
  height: var(--ui-footer-h);
}

/* ヘッダー内レイアウト（PC：左右フレックス） */
.header-inner {
  height: 100%;
  width: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* 左側：ロゴ */
.header-left {
  display: flex;
  align-items: center;
  height: 100%;
}

.header-left a,
.header-left a img {
  height: 100%;
}

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

/* 右側：タイトル・アイコン・ユーザー（PCでは横並び） */
.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ページ名（バッジ風） */
.header-title {
  --title-bg: #6b7280;
  background: var(--title-bg);
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  line-height: 1;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-title-text {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .2px;
  white-space: nowrap;
}

/* アイコン群 */
.header-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, .18);
  background: transparent;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, transform 60ms ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .38);
}

.icon-btn:active {
  transform: translateY(0.5px);
}

.icon-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

/* 通知バッジ（既存踏襲） */
.icon-btn.notify.has-alert::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  background: #ff3b30;
  border: 2px solid #241717;
  /* ヘッダー背景色で縁取り */
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

/* ユーザー */
.header-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  margin-left: 4px;
  border-left: 1px solid rgba(255, 255, 255, .18);
}

.user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}

.user-name {
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .2px;
  white-space: nowrap;
}

.user-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.user-link:hover .user-name {
  text-decoration: underline;
}

/* ヘッダー直下の緑帯（ダークグリーン） */
.header-rockpaint {
  width: 100%;
  height: 20px;
  padding: 2px 6px 2px 0;
  background-color: var(--ui-dark-green);
  color: #ececec;
  position: fixed;
  top: var(--ui-header-h);
  text-align: right;
  align-items: center;
  z-index: 9998;
}

.header-rockpaint a {
  display: flex;
  justify-content: end;
  align-items: center;
  height: 100%;
}

.header-rockpaint a img {
  height: 11px;
}

/* ヘッダー直下の青帯（注意文表示場所） */
.header-comment {
  width: 100%;
  height: auto;
  padding: 2px 6px 2px 10px;
  background-color: var(--ui-blue);
  color: #ececec;
  position: fixed;
  top: var(--ui-header-h2);
  text-align: left;
  align-items: center;
  z-index: 9998;
  font-size: 12px;
}

/* ユーザーメニュー（ドロップダウン） */
.user-menu {
  position: absolute;
  top: var(--ui-header-h);
  right: 16px;
  background: #241717;
  color: #fff;
  border-radius: 8px;
  width: 200px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  z-index: 9999;
}

.user-menu.open {
  max-height: 300px;
  opacity: 1;
  z-index: 9999;
}

.user-menu ul {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}

.user-menu li {
  padding: 10px 16px;
}

.user-menu li a {
  color: #fff;
  text-decoration: none;
  display: block;
}

.user-menu li a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-menu hr {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin: 8px 0;
}

/* アカウントメニュー内モーダル */
.anchor-popover {
  position: fixed;
  z-index: 9999;
  width: 320px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
  padding: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 0px);
}

.anchor-popover[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.anchor-popover__arrow {
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 16px;
  height: 16px;
  background: #fff;
}

.anchor-popover.is-above .anchor-popover__arrow {
  top: auto;
  bottom: -8px;
  transform: translateX(-50%) rotate(225deg);
}

.anchor-popover__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.anchor-popover__title {
  font-size: 14px;
  margin: 0;
  color: #222;
}

.anchor-popover__close {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* 本文 */
.anchor-popover__body {
  font-size: 13px;
  line-height: 1.5;
  color: #222;
}

.anchor-popover__body .content p {
  margin: 6px 0;
}

/* aタグ（本文内リンク）のスタイル */
.anchor-popover__body a {
  color: #0b5fff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.anchor-popover__body a:hover {
  color: #0949c9;
}

.anchor-popover__body a:focus-visible {
  outline: 2px solid #83b3ff;
  outline-offset: 2px;
  border-radius: 2px;
}


/* =========================================
   ヘッダーレスポンシブ (tablet & mobile)
   ========================================= */

/* タブレット：少し圧縮 */
@media (max-width: 960px) {
  .header-inner {
    gap: 12px;
    padding: 0 12px;
  }

  .brand-logo {
    height: 26px;
  }

  .header-title {
    min-height: 26px;
    padding: 6px 10px;
    border-radius: 7px;
  }

  .header-title-text {
    font-size: 13px;
  }

  .header-title-text a:visited{
    color: #FFFFFF;
  }

  .header-icons {
    gap: 9px;
  }

  .icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
  }

  .icon-btn img {
    width: 17px;
    height: 17px;
  }

  .header-user {
    gap: 8px;
  }
}

/* タブレット縦～スマホ直前：さらに圧縮 */
@media (max-width: 820px) {
  .header-inner {
    gap: 10px;
    padding: 0 10px;
  }

  .brand-logo {
    height: 26px;
  }

  .header-title {
    min-height: 24px;
    padding: 4px 10px;
    border-radius: 6px;
  }

  .header-title-text {
    font-size: 13px;
    letter-spacing: .1px;
  }

  .header-icons {
    gap: 8px;
  }

  .icon-btn {
    width: 20px;
    height: 20px;
    border: none;
  }

  .icon-btn img {
    width: 16px;
    height: 16px;
  }

  .user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* スマホ：左＝ロゴ／右＝上下二段（上：ページ名、下：アイコン群＋ユーザー） */
@media (max-width: 560px) {

  .app-header {
    padding: 0;
    max-width: 100vw;
  }

  /* ヘッダー全体を 2カラムに分割 */
  .header-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    /* 左カラム：ロゴ ／ 右カラム：その他 */
    align-items: center;
    gap: 8px;
    padding: 0;
  }

  /* 左カラム：ロゴ */
  .header-left {
    grid-column: 1 / 2;
    display: flex;
    align-items: center;
    height: 100%;
  }

  /* 左カラム：ロゴ */
  .header-left img {
    height: var(--ui-header-h) !important;
    max-height: 70px;
  }

  .brand-logo {
    height: 24px;
  }

  /* 右側コンテナを2行のグリッドにし、下段は2列に分割 */
  .header-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 下段の左右を 1:1（必要なら比率調整可） */
    grid-template-rows: auto auto;
    /* 上：タイトル（高さは内容）、下：アイコン＋ユーザー */
    grid-template-areas:
      "title  title"
      "icons  user";
    align-items: center;
    column-gap: 8px;
    /* 下段左右の間隔 */
    row-gap: 6px;
    /* 上段と下段の間隔 */
    margin-left: auto;
    /* 既存の右寄せを維持したい場合（必要に応じて外す） */
  }

  /* 上段：タイトルをグリッドの1行目全面に */
  .header-title {
    grid-area: title;
  }

  /* 左下：アイコン群 */
  .header-icons {
    grid-area: icons;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    /* 既存のギャップ値（端末に応じて 8–10px） */
  }

  /* 右下：ユーザー */
  .header-user {
    grid-area: user;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 0px;
    /* 仕切り線を活かす場合の内側余白 */
    margin-left: 0px;
    border-left: 1px solid rgba(255, 255, 255, .18);
  }


  /* 下段を右端に寄せる（.header-right 内で2行目の並びを右寄せ） */
  .header-right>*:nth-child(n+2) {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
  }

  .user-avatar {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
  }

  /* ユーザー名は短縮表示 */
  .user-name {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10.5px;
  }

  /* 緑帯の微調整（任意） */
  .header-rockpaint {
    padding: 2px 6px;
    height: 16px;
    max-width: 100vw;
  }

  .header-rockpaint a img {
    height: 9px;
    margin: 1px;
  }

  /* ユーザーメニュー：スマホは右端にフィットさせる */
  .user-menu {
    right: 8px;
    width: 88vw;
    /* 端末幅に応じて広め */
    max-width: 360px;
    /* 上限 */
    border-radius: 10px;
  }

  .header-comment {
    top: calc(var(--ui-header-h2) - 5px);
  }
}

/* -----------------------------------------------------------------------
   3) サイドバー & アコーディオンサーチパネル
   ----------------------------------------------------------------------- */

.sidebar {
  position: fixed;
  left: var(--ui-gap);
  top: calc(var(--ui-header-h) + var(--ui-header-decor-h) + var(--ui-gap) + var(--header-comment-offset, 0px));
  bottom: calc(var(--ui-footer-h) + var(--ui-gap));
  width: var(--ui-sidebar-width);
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: 3px 5px 5px #ececec;
  padding: 8px;
  overflow: auto;
  z-index: 900;
}

/* メインレイアウトの余白調整（既存維持） */
.layout {
  display: block;
  margin-left: calc(var(--ui-sidebar-width) + var(--ui-gap) + 1vw);
  margin-right: 1vw;
  min-height: 100vh;
  padding-top: calc(var(--ui-header-h) + var(--ui-header-decor-h) + var(--ui-gap) + var(--header-comment-offset, 0px));
  padding-bottom: calc(var(--ui-footer-h) + var(--ui-gap));
}

/* サイドメニューの縦配置 */
.side-menu {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 上側メニュー（リスト） */
.side-menu .menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 各項目コンテナ（アイコン＋ラベル） */
.menu-li,
.settings-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
}

/* 検索の「下」にだけ仕切り線（対象要素に .with-separator-bottom を付与） */
.with-separator-bottom {
  position: relative;
  padding-bottom: 16px;
  /* 線の分だけ余白 */
}

.with-separator-bottom::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 1px;
  background: var(--ui-border);
}

/* 設定の「上」にだけ仕切り線（対象要素に .with-separator-top を付与） */
.with-separator-top {
  position: relative;
  margin-top: 8px;
  padding-top: 16px;
  /* 線の分だけ余白 */
}

.with-separator-top::before {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 0;
  height: 1px;
  background: var(--ui-border);
}

/* 設定を最下部へ押し下げるスペーサ */
.side-menu .spacer {
  flex: 1 1 auto;
}

/* --- リンク範囲はアイコンのみ --- */
/* アイコン用の aタグ（ホバーやフォーカスもここだけに適用） */
.menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--ui-bg);
  padding: 4px;
  text-decoration: none;
  color: inherit;
  transition: background 120ms ease, border-color 120ms ease, transform 60ms ease;
  /* アイコンのクリック領域を明確に */
  min-width: 48px;
  min-height: 48px;
}

.menu-link:hover {
  background: #d7eeff;
  /* 枠色を変える場合は border を付与。背景のみで十分なら省略可 */
  /* border: 1px solid #dbeafe; */
}

.menu-link:active {
  transform: translateY(0.5px);
}

.menu-link:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

/* 選択中状態が必要な場合（アイコン枠に適用） */
.menu-link.activ {
  background-color: #eeeeee;
  pointer-events: none;
}

.menu-link.activ .menu-icon {
  opacity: 0.4;
}

/* アイコン画像 */
.menu-icon {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* --- ラベルは飾り（クリック不可） --- */
.menu-label {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  /* 最大2行表示 */
  overflow: hidden;
  text-align: center;
  font-size: 11px;
  line-height: 1.2;
  color: var(--ui-muted);
  padding: 0 4px;
  /* 2行分の高さを確保（1.2em * 2 行 = 2.4em） */
  min-height: calc(1.2em * 2);
  max-width: 100%;
  word-break: break-word;
  /* ラベルのクリックやホバー反応を完全に無効化（任意） */
  pointer-events: none;
  user-select: text;
  /* 文言は選択できると親切。選択不可にしたい場合は 'none' */
}

/* --- 互換性のための無効化（以前の .menu-item を完全にリセット） --- */
.menu-item {
  all: unset;
  /* all: unset は強力なので、親由来のフォントやカラー継承は自然に残ります */
}

/* 以前の :hover / :focus スタイルが残っていても影響しないように保険 */
.menu-item:hover,
.menu-item:focus,
a.menu-item.activ,
a.menu-item.activ .menu-icon {
  all: unset;
}

/* ===========================================
   Sidebar – 上部横向きバー（820px / 560px）
   =========================================== */

@media (max-width: 820px) {

  .sidebar {
    position: fixed;
    top: calc(var(--ui-header-h) + var(--ui-header-decor-h) - 5px + var(--header-comment-offset, 0px));
    left: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: auto;
    padding: 6px 8px;
    border-radius: 0;
    box-shadow: none;
    z-index: 980;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--ui-bg);
    border: 1px solid var(--ui-border);
    transform: none;
  }

  .side-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    height: 52px;
    width: 100%;
  }

  .side-menu .menu-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .side-menu .settings-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 4px;
    margin-left: auto;
  }

  .menu-li {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 4px;
  }

  .menu-link {
    min-width: 44px;
    min-height: 44px;
    padding: 6px;
    border-radius: 10px;
  }

  .menu-icon {
    width: 28px;
    height: 28px;
  }

  .with-separator-bottom,
  .with-separator-top {
    margin: 0;
    padding: 0;
  }

  .with-separator-bottom::after,
  .with-separator-top::before {
    content: none;
  }

  /* --- ① 縦線：検索の左／設定の右 --- */
  .side-menu .menu-list,
  .side-menu .menu-list .menu-li,
  .side-menu .settings-block {
    position: relative;
    min-width: 60px;
  }

  .side-menu .menu-list .li--search::before {
    content: "";
    position: absolute;
    right: -6px;
    top: 4px;
    bottom: 0;
    width: 1px;
    background: var(--ui-border);
  }

  .side-menu .settings-block::after {
    content: "";
    position: absolute;
    left: -6px;
    top: 4px;
    bottom: 0;
    width: 1px;
    background: var(--ui-border);
  }

  /* --- ② ラベルの固定高を解除（1行省略記号にする案） --- */
  .menu-label {
    display: block;
    /* -webkit-box を解除 */
    -webkit-line-clamp: initial;
    -webkit-box-orient: initial;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 0;
    /* 固定化を解除 */
    height: auto;
    font-size: 11px;
    line-height: 1.2;
    padding: 0 4px;
  }

  /* 本文：上部余白（必要なら） */
  .layout {
    margin-left: max(0px, 1vw);
    padding-top: calc(var(--ui-header-h) + var(--ui-header-decor-h) + var(--ui-gap) + 56px + var(--header-comment-offset, 0px));
  }
}

@media (max-width: 560px) {
  .sidebar {
    padding: 0.2rem;
    max-width: 100vw;
  }

  .side-menu {
    gap: 6px;
  }

  .side-menu .menu-list {
    gap: 0px;
  }

  .menu-link {
    min-width: 40px;
    min-height: 40px;
    padding: 0.1rem;
  }

  .menu-icon {
    width: 26px;
    height: 26px;
  }

  /* 縦線の位置を微調整（内側へ） */
  .side-menu .menu-list .li--search::before {
    right: -4px;
    top: 4px;
  }

  .side-menu .settings-block::after {
    right: auto;
    ;
    left: -4px;
    top: 4px;

  }

  /* ラベル調整 */
  .menu-label {
    font-size: 10px;
    padding: 0;
  }

  /* 本文の押し下げ量も少し詰める（横バーが低くなる想定） */
  .layout {
    padding-top: calc(var(--ui-header-h) + var(--ui-header-decor-h) + var(--ui-gap) + 0px + var(--header-comment-offset, 0px));
    margin: 0;
  }
}


/* -----------------------------------------------------------------------
  アコーディオン検索パネル（サイドバーの右隣にスライドイン）
   ----------------------------------------------------------------------- */

/* 検索パネル用トークン（既存 :root にマージしてもOK） */
:root {
  --accordion-search-panel-width: 420px;
  /* パネル幅（必要に応じて調整） */
  --accordion-search-panel-bg: #ffffff;
  /* 背景色 */
  --accordion-search-panel-border: var(--ui-border);
  /* 枠色：既存の ui-border を活用 */
  --accordion-search-panel-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  /* 影（控えめ） */
  --search-overlay-opacity: 0.06;
  /* オーバーレイ濃度（薄め） */
}

/* 検索パネル：左→右にスライドイン。サイドバーの右隣に出す。 */
.accordion-search-panel {
  position: fixed;
  top: calc(var(--ui-header-h) + var(--ui-header-decor-h) + var(--ui-gap));
  bottom: calc(var(--ui-footer-h) + var(--ui-gap));
  left: calc(var(--ui-gap) + var(--ui-sidebar-width) + var(--ui-gap));
  /* サイドバーの右側起点 */
  width: var(--accordion-search-panel-width);
  background: var(--accordion-search-panel-bg);
  border: 1px solid var(--accordion-search-panel-border);
  border-radius: var(--ui-radius);
  box-shadow: var(--accordion-search-panel-shadow);
  display: flex;
  flex-direction: column;
  z-index: 950;
  /* サイドバー(900)より上、ヘッダー(1000)より下でもOK */

  /* 初期：パネル自身の幅ぶん左にオフスクリーン（画面外） */
  transform: translateX(calc(-100% - var(--ui-gap)));
  opacity: 0;
  pointer-events: none;

  transition: transform 240ms ease, opacity 180ms ease;
}

/* 開いた状態 */
.accordion-search-panel.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

/* パネルヘッダー（タイトル + ×） */
.accordion-search-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--accordion-search-panel-border);
}

.accordion-search-panel__title {
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.accordion-search-panel__close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  cursor: pointer;
}

.accordion-search-panel__close:hover {
  background: #eef2ff;
}

/* パネル本文（スクロール） */
.accordion-search-panel__body {
  padding: 12px;
  /* overflow: auto; */
}

/* 背景オーバーレイ（薄く。ぼかし無し） */
.accordion-search-panel__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, var(--search-overlay-opacity));
  z-index: 940;
  /* パネルの下、サイドバーの上にかける */
}

/* 全体ラッパー（必要なら余白調整） */
.accordion-search-area {
  /* padding: 4px; ← 必要なら調整 */
}

/* 各セクション（.form / .account）共通のレイアウト：2列グリッド */
.accordion-search-area dl {
  display: grid;
  grid-template-columns: var(--label-w) minmax(0, 1fr);
  row-gap: calc(4px + var(--row-gap-up));
  margin: 0;
}

/* 左ラベル（dt） */
.accordion-search-area dt {
  grid-column: 1;
  align-self: center;
  font-size: 12px;
  color: #374151;
  line-height: 1.3;
  word-break: break-word;
}

/* 右入力（dd） */
.accordion-search-area dd {
  grid-column: 2;
  margin: 0 12px 0 0;
}

/* 文字サイズ */
.accordion-search-area dd label {
  font-size: 12px;
}

/* 前半（.form）と後半（.account）の区切り線 */
.accordion-search-area .form {
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--divider-color);
}

/* 入力ラッパー（selectbox） */
.accordion-search-area label.selectbox {
  width: 100%;
  display: inline-block;
  position: relative;
}

/* 入力フィールド（select / text） */
.accordion-search-area label.selectbox select,
.accordion-search-area input[type="text"],
.accordion-search-area input[list] {
  width: 100%;
  height: var(--field-h);
  padding: 6px 10px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}

/* フォーカス時の装飾 */
.accordion-search-area .selectbox select:focus,
.accordion-search-area input[type="text"]:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, .25);
}

/* カラーコード：ラジオ選択肢（次行に表示） */
.accordion-search-area dd.colorcode .match {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 8px;
}

.accordion-search-area dd.colorcode .match label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

/* 測色データ：入力欄の幅調整 */
.accordion-search-area .account dd.wide {
  width: var(--field-w);
  max-width: 100%;
}

/* 測色データ：候補リストの配置基準 */
.accordion-search-area .joblists {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 測色データの更新ボタン用 */
.joblist_label {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.joblist_label .jobreload {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.joblist_label .jobreload:hover {
  opacity: 0.7;
}

/* 候補リスト（初期は display:none） */
.accordion-search-area .dropdown_joblists {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
  padding: 6px;
  list-style: none;
  margin: 0;
  max-height: 260px;
  overflow: auto;
  z-index: 1100;
  display: none;
}

.accordion-search-area .dropdown_joblists.is-open {
  display: block;
}

/* 候補項目（li） */
.accordion-search-area .dropdown_joblist {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease;
}

.accordion-search-area .dropdown_joblist:hover {
  background: #f3f4f6;
}

/* 色チップ（samplecolor） */
.accordion-search-area .dropdown_joblist .samplecolor {
  width: 40px;
  height: 50px;
  border: 1px solid #d1d5db;
  border-radius: 3px;
}

/* 測色データ：スウォッチ付きセレクトボックス（専用） */
.accordion-search-area .color-swatch-selectbox {
  position: relative;
  display: inline-block;
}

/* 入力欄：白背景・黒文字・左パディング */
.accordion-search-area .color-swatch-selectbox #jobname {
  background: #ffffff !important;
  color: #111827 !important;
  padding-left: 60px;
  width: 100%;
}

/* スウォッチ本体（左の四角） */
.accordion-search-area .color-swatch-selectbox .color-swatch {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 40px;
  height: 35px;
  transform: translateY(-50%);
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: transparent;
}

/* 未選択時のスウォッチ（斜線パターン） */
.accordion-search-area .color-swatch-selectbox.no-color .color-swatch {
  background: repeating-linear-gradient(45deg,
      #f3f4f6, #f3f4f6 4px,
      #e5e7eb 4px, #e5e7eb 8px);
}

/* 選択済みフラグ（入力は白黒維持） */
.accordion-search-area #jobname.has-color {
  text-shadow: none;
  border-color: #d1d5db;
  box-shadow: none;
}

/* 送信ボタンエリア */
.accordion-search-area .btnArea {
  margin: 24px auto;
  display: flex;
  justify-content: center;
}

.accordion-search-area .btnArea .btn-search {
  margin: 0 auto;
}


/* =========================================================
  アコーディオンサーチ モバイル専用オーバーレイ
   ブレークポイント：820px & 560px
   ========================================================= */

/* ▼ 820px 以下：上からスライド／全幅・ほぼ全高（PC定義は温存） */
@media (max-width: 820px) {
  .accordion-search-panel {
    left: 0;
    right: 0;
    width: 100%;
    top: calc(var(--ui-header-h) + var(--ui-header-decor-h) + 60px);
    bottom: calc(var(--ui-footer-h) + var(--ui-gap));
    /* 端末に合わせて微調整可 */

    /* X方向スライドを解除して、Y方向へ切り替え（PCはtranslateXのまま） */
    transform: translateY(-100%);
    /* 初期状態：画面外（上） */
    opacity: 0;
    pointer-events: none;

    /* デザインは既存を尊重。角丸は下側のみ（任意） */
    border-radius: 0 0 var(--ui-radius) var(--ui-radius);

    /* アニメーション */
    transition: transform 260ms ease, opacity 180ms ease;
    z-index: 950;
    /* ヘッダーより下に出したい場合。上に重ねるなら 1001 へ */
  }

  /* 開いた状態（クラスは既存と同じ） */
  .accordion-search-panel.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    bottom: auto;
  }

  /* オーバーレイは全画面に（PC定義は維持） */
  .accordion-search-panel__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, var(--search-overlay-opacity));
    z-index: 940;
    /* パネルの一段下 */
  }

  /* ヘッダーと本文の内側パディングは少し詰める（任意） */
  .accordion-search-panel__header {
    padding: 10px 12px;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 1;
  }

  .accordion-search-panel__body {
    padding: 10px 12px;
    overflow: auto;
  }

  /* フォームのグリッドは 2 列維持（スマホで 1 列にするのは 560px 以下で） */
  .accordion-search-area dl {
    grid-template-columns: var(--label-w) minmax(0, 1fr);
    row-gap: calc(6px + var(--row-gap-up));
  }
}

/* ▼ 560px 以下：更に密度を詰め、フォームは 1 カラム */
@media (max-width: 560px) {
  .accordion-search-panel__header {
    padding: 5px 10px;
  }

  .accordion-search-panel__body {
    padding: 8px 10px;
    font-size: 90%;
  }

  .accordion-search-area dl {
    /* grid-template-columns: 1fr; */
  }

  .accordion-search-area dt {
    /* grid-column: 1; */
    font-size: 0.75rem;
  }

  .accordion-search-area dd {
    /* grid-column: 1; */
    margin: 0;
  }

  /* 入力の高さ・ボタンのレイアウトも少し詰める（任意） */
  .accordion-search-area label.selectbox select,
  .accordion-search-area input[type="text"],
  .accordion-search-area input[list] {
    height: calc(var(--field-h) * 0.85) !important;
    font-size: 0.7rem;
  }

  .accordion-search-area .btnArea {
    margin: 16px auto;
  }

  .accordion-search-area #jobname.has-color {
    height: calc(var(--field-h) 38px * 0.85);
  }

  .accordion-search-area .color-swatch-selectbox .color-swatch {
    height: 24px;
  }

  .btn-search {
    width: 100%;
    padding: 0.4rem !important;
    margin-top: 1rem !important;
  }
}


/* -----------------------------------------------------------------------
   4) 共有コンポーネント（カード／ボトムナビ／トースト）
   ----------------------------------------------------------------------- */
.table-wrap {
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  overflow: hidden;
}

.bottom-nav {
  position: fixed;
  right: 16px;
  bottom: 0;
  z-index: 11000;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bn-bg);
  border-radius: 12px;
}

.bn-item {
  width: 72px;
  padding: 6px;
  border-radius: 10px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #fff;
  transition: background 120ms ease, transform 60ms ease;
}

.bn-item:hover {
  background: var(--bn-hover);
}

.bn-item:active {
  transform: translateY(0.5px);
}

.bn-item.filter-active .bn-icon {
  position: relative;
  /* 疑似要素の基準 */
}


.bn-item.filter-active {
  position: relative;
}

.filter-line {
  position: absolute;
  top: 35%;
  left: 50%;
  width: 70%;
  height: 4px;
  background-color: rgb(201, 201, 201);
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0;
  /* 初期は非表示 */
  pointer-events: none;
  border-radius: 2px;
}

.bn-item.filter-active .filter-line {
  opacity: 1;
  /* フィルターONで表示 */
}


.bn-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
}

.bn-label {
  font-size: 11px;
  line-height: 1.2;
  color: #fff;
  text-align: center;
  white-space: nowrap;
}

.selection-toast {
  position: fixed;
  right: 16px;
  bottom: calc(var(--ui-footer-h) + 16px);
  background: var(--ui-primary);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  font-size: 13px;
  z-index: 1200;
}

.selection-toast[hidden] {
  display: none !important;
}

/* ▼ 560px 以下：更に密度を詰め、フォームは 1 カラム */
@media (max-width: 560px) {
  .bottom-nav {
    right: 0;
    border-radius: 0;
    gap: 0;
    padding: 6px;
    width: 100vw;
    justify-content: space-around;
  }

  .bn-icon {
    width: 28px;
    height: 28px;
  }

  .bn-label {
    font-size: 10px;
  }
}

/* =======================================================================
   ログイン画面
   ======================================================================= */

/* 言語ボタン */
.lang {
  margin-top: calc(var(--ui-header-h) + var(--ui-header-decor-h) + var(--ui-gap));
  margin-right: 30px;
  display: flex;
  justify-content: end;
  position: relative;
  z-index: 10;
}

.lang button {
  border: none;
  display: flex;
  align-items: center;
  font-size: 124%;
  padding: 0;
  background: none;
  cursor: pointer;
}

.lang button img {
  height: 24px;
  margin-right: 4px;
}

.lang ul {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);

  /* 閉じ状態 */
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
}

/* 開き状態 */
.lang ul.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s;
}

.lang ul li button {
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
}

.lang ul li button:hover {
  background: #f5f7fa;
}


/* メイン画面 */
.loginlayout {
  margin-left: 1vw;
  padding-top: 0;
  position: relative;
}

.loginlayout .contents {
  font-size: 0.8rem;
}


/* グローバルナビ（カード風） */
#globalNavi {
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  padding: 12px;
}

#globalNavi ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#globalNavi li {
  margin: 0 0 8px;
}

#globalNavi a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ui-text);
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}

#globalNavi a:hover {
  background: #d7eeff;
  border-color: #dbeafe;
}

/* サイド領域 */
div.loginlayout div.blockSide {
  position: absolute;
  width: 240px;
  left: 50px;
}

.loginlayout #globalNavi a {
  border: none;
}

.blockSide .icnMenu {
  display: none;
}

/* ログインブロック */
.home .block {
  width: 100%;
  max-width: 600px;
  border: 1px solid #ddd;
  border-radius: 16px;
  background: #fff;
  padding: 24px 16px;
  margin: 0 auto 32px;
}

.home .block h2 {
  text-align: center;
}

.home .block.menu p {
  font-size: 139%;
  text-align: center;
  margin: 24px 0 0 0;
  line-height: 1.5;
}

.home .block.menu p a {
  display: block;
  background: #242880;
  color: #fff;
  border-radius: 50px;
  padding: 8px;
}

.home .block.login li {
  font-size: 124%;
  margin: 24px 0 0 0;
}

input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=tel],
input[type=time],
textarea {
  width: 100%;
  border: 1px solid #ddd;
  padding: 4px 8px;
  font-family: "Noto Sans JP", sans-serif;
  border-radius: 8px;
}

.loginlayout .block ul {
  padding-left: 0;
}

select,
input,
button,
textarea {
  font: 99% arial, helvetica, clean, sans-serif;
  cursor: pointer;
}

.amount select {
  vertical-align: middle;
  padding: 4px auto;
  border: 1px solid #ddd;
  padding: 4px 8px;
  font-family: "Noto Sans JP", sans-serif;
}

.home .block.login li input[type=text] {
  background: url(../img/icnAccount2.svg) no-repeat 8px 50%;
  background-size: 18px auto;
  padding: 8px 8px 8px 32px;
  border-radius: 8px;
}

.home .block.login li.password-field {
  position: relative;
}

.home .block.login li.password-field input {
  background: url(../img/icnPassword.svg) no-repeat 8px 50%;
  background-size: 16px auto;
  padding: 8px 8px 8px 32px;
  border-radius: 8px;
}


/* ボタンが右に被る分、入力の右余白を確保 */
.password-field input[type="password"],
.password-field input[type="text"] {
  width: 100%;
  box-sizing: border-box;
  padding-right: 2.75rem;
  /* アイコン分 + 余白 */
  font-size: 16px;
}

/* 目アイコンのボタンを右上に重ねる */
.password-field .toggle-visibility {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 8px;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* 画像サイズ */
.password-field .icon-visibility {
  width: 18px;
  height: 18px;
  display: block;
  opacity: 0.4;
}

.home .block.login .helpArea {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.home .block.login .btnArea input {
  width: 100%;
}

.home .block.login a {
  color: #242880;
  align-items: center;
  display: flex;
}

.home .block.login a img {
  height: 14px;
  margin-right: 2px;
}

.btnArea input[type=button],
.btnArea input[type=submit],
.btnArea input[type=reset],
.btnArea button {
  -webkit-appearance: none;
}

.btnArea li input,
.btnArea li button {
  width: 100%;
  background: #005E47;
  color: #fff;
  border: none;
  padding: 12px 36px;
  cursor: pointer;
  -webkit-transition: all 0.2s ease-in-out;
  -moz-transition: all 0.2s ease-in-out;
  -o-transition: all 0.2s ease-in-out;
  transition: all 0.2s ease-in-out;
  border-radius: 50px;
  color: #fff;
}

.btnArea li input:disabled {
  background: #6c6c6c;
}

.loginlayout .btnArea {
  margin-left: 0;
}

.loginlayout .btnArea>ul {
  padding-left: 0;
}

/* ログイン時のモーダルウィンドウ */
:root {
  /* エラーメッセージ */
  --ui-danger: #c62828;
}

/* ベースの <dialog> 外観 */
dialog {
  border: none;
  padding: 0;
  width: min(560px, 92vw);
  max-width: 560px;
  background: var(--ui-bg);
  color: var(--ui-text);
  border-radius: var(--ui-radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
  animation: modal-pop .18s ease-out;
}

/* 背景オーバーレイ（ダークグリーンの“ごく薄い”トーン） */
dialog::backdrop {
  background: rgba(1, 94, 75, var(--search-overlay-opacity, 0.06));
  /* 既存の overlay 設定があればそれを尊重 */
  backdrop-filter: blur(1px);
}

/* コンテナ */
.modal {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ヘッダー：細いダークグリーンのアクセント＋見出し */
.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ui-border);
  background: var(--ui-bg);
}

.modal-header .badge {
  inline-size: 8px;
  block-size: 24px;
  border-radius: 4px;
  background: var(--ui-dark-green);
}

.modal-title {
  margin: 0;
  font-weight: 700;
  font-size: 1rem;
  color: var(--ui-text);
}

/* 本文領域：控えめな余白とグリッド */
.modal-body {
  padding: 16px 18px;
  display: grid;
  gap: 10px;
  background: var(--ui-bg);
}

/* フッター：右寄せボタン群 */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--ui-border);
  background: var(--ui-bg);
}

.modal .msg.error {
  color: var(--ui-danger);
}

.modal .msg.success {
  color: var(--ui-dark-green);
}

/* 入力フィールド（モーダル限定） */
.modal .field {
  display: grid;
  gap: 6px;
}

.modal .field label {
  font-size: 0.9rem;
  color: var(--ui-text);
}

.modal .field input[type="text"],
.modal .field input[type="password"],
.modal .field input[type="email"],
.modal .field input[type="number"] {
  height: var(--field-h-up);
  padding: 0 12px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-bg);
  color: var(--ui-text);
  outline: none;
  transition: box-shadow .2s, border-color .2s;
  width: 100%;
}

.modal .field input:focus {
  border-color: var(--ui-dark-green);
  box-shadow: 0 0 0 3px rgba(1, 94, 75, 0.14);
}

/* ボタン（モーダル限定の見た目） */
.modal .btn {
  appearance: none;
  border-radius: var(--ui-radius);
  height: var(--field-h-up);
  padding: 0 14px;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  border: 1px solid var(--ui-border);
  background: var(--ui-bg);
  color: var(--ui-text);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.modal .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.modal .btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* 主要ボタン：ダークグリーン */
.modal .btn-primary {
  background: var(--ui-dark-green);
  color: var(--ui-dark-green-ink);
  border-color: var(--ui-dark-green);
}

.modal .btn-primary:hover {
  filter: brightness(0.98);
}

/* 代替（ゴースト）ボタン：枠線のみダークグリーン */
.modal .btn-ghost {
  background: var(--ui-bg);
  color: var(--ui-dark-green);
  border-color: var(--ui-dark-green);
}

/* アニメーション */
@keyframes modal-pop {
  from {
    transform: translateY(4px) scale(.98);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}


/* ログイン画面のレスポンシブ対応 */
@media screen and (max-width: 1200px) {
  .home .block {
    max-width: 400px;
  }
}

@media screen and (max-width: 960px) {
  div.loginlayout div.blockSide {
    left: 0;
    width: 200px;
  }



}

@media screen and (max-width: 820px) {

  /* メイン画面 */
  .loginlayout {
    padding-top: 0px;
  }

  .blockSide #globalNavi {
    overflow: scroll;
    z-index: 100;
    background: #fff;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    border-radius: 0 0 16px 0;
  }

  .blockSide {
    position: fixed;
    left: -240px;
    /* 初期位置（非表示） */
  }

  /* アクティブ時にスライドイン */
  .blockSide.active {
    animation: slideIn 0.5s forwards;
    z-index: 999;
  }

  /* クローズ時にスライドアウト */
  .blockSide.close {
    animation: slideOut 0.5s forwards;
  }

  div.loginlayout div.blockSide {
    top: 0px;
  }



  /* スライドインのアニメーション */
  @keyframes slideIn {
    from {
      left: -200px;
    }

    to {
      left: 0px;
    }
  }

  /* スライドアウトのアニメーション */
  @keyframes slideOut {
    from {
      left: 0px;
    }

    to {
      left: -200px;
    }
  }

  .blockSide .icnMenu {
    display: block;
    width: 40px;
    height: 40px;
    position: absolute;
    top: calc(var(--ui-header-h) + var(--ui-header-decor-h) + var(--ui-gap) - 100px);
    right: -39px;
  }

  .blockSide .icnMenu button {
    background: #fff;
    border-radius: 0 8px 8px 0;
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-left: none;
  }

  .blockSide .icnMenu img {
    width: 32px;
    transition: transform 0.3s ease;
    transform-origin: center center;
  }

  /* アクティブ時に左右反転（右向き→左向き） */
  .blockSide.active .icnMenu img {
    transform: scaleX(-1);
  }

  /* クローズ時（または通常時）は元に戻す */
  .blockSide.close .icnMenu img {
    transform: none;
  }
}

@media screen and (max-width: 580px) {

  div.loginlayout div.blockSide {
    top: -3.5rem;
  }

  /* languageボタン */
  .lang button {
    font-size: 90%;
  }

  .lang button img {
    width: 18px;
  }

  /* 検索画面各種文字サイズ */
  #globalNavi a,
  .home .block h2,
  .home .block.menu p a {
    font-size: 0.85rem;
  }

  .home .block {
    margin: 1rem auto;
    padding: 1rem;
  }

  .home .block.menu p a {
    width: 50vw;
    margin: 0 auto;
  }

  .home .block.login li input {
    font-size: 0.75rem;
  }

  form .btnArea {
    margin-top: 0;
  }
}

/* =======================================================================
   5) 検索結果（index）
   ======================================================================= */

/* ---- 列幅トークン（ヘッダーと本文を完全同期） ---- */
:root {
  --col-check: 40px;
  /* 選択列（ボタン） */
  --col-swatch: 96px;
  /* 色見本列 */
  --col-meta: 1fr;
  /* 中央のカラーデータ列（KV） */
  /* --col-score: var(--tbl-score-w, 160px); */
  --col-score: 0.3fr;
  /* スコア列（左右共通） */
}

/* ===== テーブル土台（幅統一・セル余白ゼロ） ===== */
.palette-table {
  width: 100%;
  table-layout: fixed;
  border-spacing: 0;
}

.palette-table td,
.palette-table th {
  padding: 0;
  box-sizing: border-box;
}

.palette-table td {
  min-width: 36px;
  vertical-align: top;
  font-size: 14px;
}

.palette-table td.productnumber {
  text-align: center;
  position: relative;
}



/* ===== sticky ヘッダー：1セル＋グリッド ===== */
.palette-head .head-row .head-cell {
  background: #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.summary-head {
  padding: 0;
  border: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
  border-bottom: none;
}

.summary-head__grid {
  display: grid;
  grid-template-columns: var(--col-check) var(--col-swatch) var(--col-meta) var(--col-score) var(--col-score);
  align-items: stretch;
  gap: 0;
  padding: 0;
}

/* ヘッダーセル */
.summary-head__grid>* {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  font-weight: 700;
  font-size: 12px;
  color: #333;
  border-right: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.summary-head__grid>*:last-child {
  border-right: none;
}

/* ヘッダーの配置 */
.head-empty {
  grid-column: 1 / 2;
}

.head-swatch {
  grid-column: 2 / 3;
}

.head-meta {
  grid-column: 3 / 4;
}

.head-score {
  grid-column: 4 / span 2;
}

/* ===== サマリー本文（section をセル全幅で、PC：縦3マス） ===== */
.summary-row>.summary-cell {
  padding: 0;
}

.color-summary {
  display: grid;
  /* 固定＋可変（メタは1fr、スコアはminmaxで最小幅確保） */
  grid-template-columns:
    var(--col-check) var(--col-swatch) minmax(0, 1fr) minmax(60px, var(--col-score)) minmax(60px, var(--col-score));
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "checkbox swatch meta    score1 score2"
    "checkbox swatch meta    score1 score2"
    "checkbox swatch meta    score1 score2";
  gap: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;

}

/* ブロック割り当て（本文側） */

.summary__checkbox {
  grid-area: checkbox;
  align-self: stretch;
  position: relative;
  border: 1px solid var(--tbl-grid, var(--ui-border));
  border-right: none;
}

.colorbox[data-datatype="2"] .summary__checkbox {
  background: linear-gradient(to right, #0000FF 10%, #FFFFFF 10%);
}

.summary__swatch {
  grid-area: swatch;
  align-self: stretch;
}

.summary__meta {
  grid-area: meta;
  align-self: stretch;

  align-self: stretch !important;
  height: 100%;

}

.score--rock {
  grid-area: score1;
  align-self: stretch;
}

.score--ccm {
  grid-area: score2;
  align-self: stretch;
}

.summary__checkbox .vcenter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  /* 垂直中央 */
  justify-content: center;
  /* 水平中央 */
  pointer-events: none;

}

.summary__checkbox .vcenter>* {
  pointer-events: auto;
}

/* 計算後のスコア表示 */
.summary__score .score-middle {
  color: #FF9800;
}

.summary__score .score-high {
  color: #009900;
}

.summary__score .score-law {
  color: #F44348;
}

.jobtop-score .score-middle {
  color: #FF9800;
}

.jobtop-score .score-high {
  color: #009900;
}

.jobtop-score .score-law {
  color: #F44348;
}

/* ボタンサイズと見栄え（参考・任意） */
.select-btn {
  --size: 28px;
  width: var(--size);
  height: var(--size);
  border: 1px solid var(--ui-primary-border, #1e40af);
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.select-btn[aria-pressed="true"] {
  background: var(--ui-primary, #2563eb);
}

.select-btn[aria-pressed="true"]::before {
  content: "✓";
  color: #fff;
  font-size: 14px;
  position: relative;
  top: -1px;
}

tbody.obj.active {
  outline: 2px solid var(--tbl-active);
  outline-offset: -2px;
}


/* ===== 色見本（2色並び、枠は表トーン、中央寄せ） ===== */
.summary__swatch {
  position: relative;
  min-height: 88px;
  margin: 0;
  border: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
  border-radius: 0;
}

.summary__swatch .vcenter {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  padding: 2px 8px;
}

.summary__swatch .vcenter>* {
  pointer-events: auto;
}

.swatches {
  --swatches-h: 84%;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  height: var(--swatches-h);
  width: 100%;
  gap: 0;
}

.swatch {
  flex: 1 1 0;
  height: 100%;
  width: auto;
  background: var(--swatch, #ddd);
  border: none;
}

/* ===== 基本情報（KV：キー全面グレー／値は右端） ===== */
.summary__meta {
  padding: 0;
}

.kv {
  display: grid;
  grid-auto-rows: minmax(36px, auto);
  gap: 0;
  /* 行間ゼロ */
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.kv__item {
  display: grid;
  grid-template-columns: 82px auto;
  align-items: stretch;
  /* min-height: 40px; */
  background: transparent;
  border-top: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.kv__label {
  background: var(--tbl-key-bg, #f3f4f6);
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: bold;
  line-height: 1.2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 6px;
  border-right: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.kv__value {
  background: #fff;
  color: var(--ui-text, #241717);
  font-size: 14px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  overflow-wrap: anywhere;
  border-right: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

/*当面の表示サイズ*/
.kv__value.color_samples {
    font-size: 11px;
}
.kv__item--wide {
  grid-column: span 2;
}

/* 見出しコメント（HBC/NTK の“下”の KV 行） → テーブル幅いっぱい */
.kv__item.kv__item--headline {
  grid-column: 1 / -1;
  border-bottom: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.kv__item.kv__item--headline .kv__value {
  justify-content: flex-start;
  text-align: left;
  /* border-right: none; */
}

.noscore_item {
  /* display: none; */
}

.noscore .noscore_item {
  display: grid;
}

.noscore .kv__item--wide {
  grid-column: span 1;
}

.noscore .score,
.noscore .summary-head__grid>*:last-child {
  display: none;
}


/* ===== スコア（ラベル全面グレー＋値中央） ===== */

.score {
  border: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
  border-left: none;
  background: #fff;
  border-radius: 0;
  padding: 0;
  display: grid;
  grid-template-rows: 50% 50%;
  align-content: stretch;
  gap: 0;
}

.noscore .score,
.noscore .summary-head__grid>*:last-child {
  display: none;
}

.noscore .summary-head__grid {
  grid-template-columns: var(--col-check) var(--col-swatch) var(--col-meta);
}

.noscore .color-summary {
  display: grid;
  grid-template-columns: var(--col-check) var(--col-swatch) minmax(0, 1fr);
}

.score__label {
  background: var(--tbl-key-bg);
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: bold;
  line-height: 1.2;
  padding: 0 6px;
  border-bottom: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score__value {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  font-weight: 800;
  font-size: clamp(18px, 2.0vw, 24px);
  color: #111827;
}

/* —— 値要素にクラス付与する場合（同等の見た目） —— */
.score__value.is-scoreloading {
  opacity: 0.6;
}

.score__value.is-scoreloading::after {
  content: '';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;

  width: var(--score-spinner-size);
  height: var(--score-spinner-size);
  margin: auto;
  border: var(--score-spinner-thick) solid var(--score-spinner-base);
  border-top-color: var(--score-spinner-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.score__value.is-scoreloaded::after {
  content: none;
}

/* ===== アコーディオン（開閉領域：幅差なし） ===== */
.hidden-row[hidden] {
  display: none;
}

/* モバイル用のカラーデータはPCでは空に */
.mobile-color-summary {
  display: none;
}

.acc-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding: 0;
  transition: max-height .28s ease, opacity .28s ease, padding .28s ease;
  width: 100%;
  box-sizing: border-box;
}

.hidden-row.open .acc-body {
  max-height: 1600px;
  opacity: 1;
  padding: 5px;
}

.acc-body th,
.acc-body td {
  border-bottom: 2px solid #ccc;
  padding: 6px;
  border-collapse: collapse;
}


/* PC/タブレット（2カラム） */
.acc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  grid-template-areas:
    "left rightTop"
    "left rightBottom";
}

/* 各アイテムをエリアに割り当て */
.acc-left {
  grid-area: left;
}

.acc-right-top {
  grid-area: rightTop;
}

.acc-right-bottom {
  grid-area: rightBottom;
  display: grid;
  grid-template-columns: minmax(285px, 1fr) auto;
  gap: 8px;
  align-self: start;
}

.acc-panel {
  background: var(--ui-bg, #fff);
  border: 1px solid var(--ui-border, #e5e7eb);
  border-radius: 0;
  padding: 8px;
}

.acc-graph {
  min-height: 160px;
}

.graph-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 4px;
}

.data-switcher {
  width: 48%;
  display: flex;
  justify-content: space-around;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px #6b7280 solid;
}

.data-switcher>div {
  cursor: pointer;
}

.amountmenu.flexmenu.CL1 {
  display: flex;
  justify-content: end;
}

.amountmenu.flexmenu.CL2 {
  display: flex;
  justify-content: end;
}

.amount {
  padding: 4px;
  text-align: center;
  border-bottom: 2px solid #333;
  margin-bottom: 8px;
}

input.shorttext {
  width: 64px;
}

.cl-btns {
  display: flex;
  width: 100%;
}

.cl-btns>div {
  background-color: #1d4ed8;
  color: #dbeafe;
  padding: 6px 12px;
  margin: 0 6px;
  cursor: pointer;
  transition: 0.3s;
}

.cl-btns>div:hover {
  opacity: 0.8;
}

.cl-btns>div.autocolorbtn {
  background-color: #FFFFFF;
  margin-left: auto;
}

.cl-btns>div.notSelectlayer {
  background-color: #EEEEFF;
  color: #333;
}

.notSelecttype {
  color: #BBBBBB;
}

.mixingtable {
  margin: 15px auto;
}

.mixingtable td {
  vertical-align: middle;
}

table.deltagridtable {
  width: 100%;
  margin-top: 10px;
}

/*  初期は非表示 */
.acc-panel.acc-left>.notice-message {
  display: none;
}

/*  .productnumber.replaced がテーブル内にある場合のみ表示 */
.acc-panel.acc-left:has(.inner-table .productnumber.replaced)>.notice-message {
  display: block;
}

/* 見た目（薄赤） */
.acc-panel.acc-left>.notice-message {
  margin-top: 5px;
  padding: 5px 8px;
  border-radius: 8px;
  background-color: #fff3f3;
  color: #7a1f1f;
  border: 1px solid #f3b5b5;
  font-size: 0.85rem;
  line-height: 1.6;
}

/* コメント領域 */
.pair {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 8px;
}

.pair .key,
.acc-panel .key {
  background: var(--tbl-key-bg);
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  max-width: 100px;
  text-align: center;
}

/* グラフの見出しはPC版では非表示 */
.acc-graph .key {
  display: none;
}

/* グラフエリア */
.acc-panel.acc-graph1 {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

select.deltaGraph {
  width: 60%;
  height: 28px;
}

.dataGraphIcon {
  display: flex;
  width: 100%;
  padding-top: 6px;
}

.dataGraphIcon>p {
  margin: 0;
  padding-right: 20px;
}

canvas.deltaABgraph {
  /* margin-top: 10px; */
}

.deltaZoom {
  width: auto;
  padding-left: 12px;
  font-size: 18px;
}

.acc-graph {
  min-height: 180px;
}

select.deltaGrid {
  width: 60%;
  height: 28px;
}

@media (max-width: 820px) {
  .deltaZoom {
    order: 1;
    padding-top: 6px;
  }

  .dataGraphIcon {
    width: 75%;
  }
}




/* =======================================================================
   ▼ モバイル／タブレット（このセクション内に一括定義）
   ======================================================================= */

/* ==== 1200px 未満：見本とスコアを少し詰める ==== */
@media (max-width: 1200px) {
  :root {
    --col-swatch: 80px;
    --col-score: 150px;
  }

  .score__value {
    font-size: clamp(17px, 1.8vw, 22px);
    min-height: 58px;
  }
}

/* ==== 960px 未満：さらに詰める（PCレイアウト維持） ==== */
@media (max-width: 960px) {
  :root {
    --col-swatch: 80px;
    --col-score: 70px;
  }

  .kv {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
  }

  .kv__item {
    grid-template-columns: 50px auto;
  }

  .score__value {
    font-size: clamp(16px, 1.9vw, 20px);
    min-height: 54px;
  }
}

/* ========== モバイル（820px未満） ========== */
@media (max-width: 820px) {

  main.content {
    padding-top: 50px;
  }

  /* 下段（2行目）に固定配置 */
  .color-summary .score--rock {
    grid-row: 2;
    /* 2段目 */
    grid-column: 1 / 2;
    /* 左列（1列目） */
    grid-area: auto !important;
  }

  .color-summary .score--ccm {
    grid-row: 2;
    /* 2段目 */
    grid-column: 2 / 4;
    /* 右側（2〜3列目を占有） */
    grid-area: auto !important;
  }

  /* 親の obj は 2列グリッド（左=チェック+見本／右=本文） */
  .palette-table thead {
    display: none;
  }

  .palette-table tbody.obj {
    margin: 8px 0;
    border: 1px solid var(--ui-border, #ddd);
    border-radius: 0;
    background: var(--ui-bg, #fff);
  }

  .palette-table td,
  .palette-table th {
    border: 0;
    padding: 5px;
  }

  /* サマリー行とアコーディオン行は“縦積み・全幅” */
  .palette-table tbody.obj .summary-row .summary-cell,
  .palette-table tbody.obj .hidden-row .cell {
    grid-column: 1 / -1;
  }

  .palette-table tbody.obj .summary-row {
    order: 1;
  }

  .palette-table tbody.obj .hidden-row {
    order: 2;
  }

  /* ▼ サマリー内部を 3列×2段に再構成 */
  .color-summary,
  .noscore .color-summary,
  .joblist .color-summary {
    display: grid;
    grid-template-columns: 0.2fr 0.7fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas: none;
    gap: 6px 8px;
    padding: 8px;
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  }

  /* --- 1段目（横並び3列） --- */
  .summary__checkbox {
    grid-column: 1;
    grid-row: 1;
    align-self: anchor-center;
    border: none;
  }

  .summary__swatch {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
  }

  .summary__meta {
    grid-column: 3;
    grid-row: 1;
    align-self: stretch;
  }

  /* カラーデータ（KV）：キー全面グレー／値右端、2カラム */
  .kv {
    display: grid;
    grid-template-columns: 42% 58%;
    /* 左:キー／右:値 */
    grid-auto-rows: minmax(36px, auto);
    gap: 0;
  }

  .kv__item {
    display: contents;
  }

  .kv__label {
    background: var(--tbl-key-bg, #f3f4f6);
    color: #374151;
    font-size: 12px;
    padding: 6px 8px;
    border: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
    border-right: 0;
  }

  .kv__value {
    background: #fff;
    color: var(--ui-text, #241717);
    font-size: 14px;
    padding: 6px 8px;
    border: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
    text-align: right;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    overflow-wrap: anywhere;
  }

  /* モバイル版で非表示になる要素 */
  .kv__item--defer .kv__label,
  .kv__item--defer .kv__value {
    display: none !important;
  }

  /* --- 2段目（スコア）：左2枠=ロック、右1枠=CCM --- */
  .score--ccm {
    grid-column: 3;
    grid-row: 2;
  }

  /* 色の高さを指定 */
  .palette-table .swatches {
    max-height: 100px;
  }

  /* スコアの見た目（モバイル用） */
  .score {
    border: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
    background: #fff;
    display: grid;
    overflow: hidden;
    grid-template-rows: auto 1fr;
  }

  .summary__score.score.score--rock {
    grid-column: 1 / span 2 !important;
    grid-row: 2;
    grid-area: auto;
    /* align-self: none; */
  }

  /* モバイル用のカラーデータを表示(4列グリッド) */
  .mobile-color-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(44px, auto);
    padding: 8px;
  }

  /* 共通カード基礎（見出し+中身の縦積み／内側整形は後述） */
  .mobile-color-summary .kv {
    display: contents;
  }

  /* =============== 1) 色名：見出し1 + 中身3 =============== */
  .mobile-color-summary .kv--name .kv__label {
    grid-column: 1 / span 1;
  }

  .mobile-color-summary .kv--name .kv__value {
    grid-column: 2 / span 3;
  }

  /* =============== 2) NTK NO. & HBC：各 見出し1 + 中身1 =============== */
  /* 左側：NTK（2列ブロック） */
  .mobile-color-summary .kv--ntk .kv__label {
    grid-column: 1 / span 1;
    font-weight: 600;
  }

  .mobile-color-summary .kv--ntk .kv__value {
    grid-column: 2 / span 1;
  }

  /* 右側：HBC（2列ブロック） */
  .mobile-color-summary .kv--hbc .kv__label {
    grid-column: 3 / span 1;
    font-weight: 600;
  }

  .mobile-color-summary .kv--hbc .kv__value {
    grid-column: 4 / span 1;
  }

  /* =============== 3) 見出しコメント：横4列・同一コンテナ =============== */
  .mobile-color-summary .kv--headline {
    display: block;
    grid-column: 1 / -1;
    border: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
    padding: 12px 12px 14px;
  }

  .mobile-color-summary .kv--headline .kv__paragraph {
    margin: 0;
    line-height: 1.6;
    word-break: break-word;
    /* 日本語長文の折返し */
    /* 長文対応と余白調整（縦3+αに伸びる） */
  }

  .mobile-color-summary .kv--headline .kv__headingword {
    background: var(--tbl-key-bg);
    color: var(--ui-muted);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
  }

  /* アコーディオングラフのモバイル版 */
  .acc-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "left"
      "rightTop"
      "rightBottom";
  }

  .graph-header {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  /* データ種類 */
  .graph-header>.data-switcher {
    width: 100%;
    order: 1;
    margin-bottom: 14px;
  }

  /* CLボタン */
  .graph-header>.cl-btns {
    width: auto;
    order: 2;
    margin-bottom: 14px;
  }

  /* セレクトメニュー */
  .graph-header>.amountmenu.flexmenu.CL1 {
    width: 100%;
    order: 3;
  }

  .graph-header>.amountmenu.flexmenu.CL2 {
    width: 100%;
    order: 3;
  }

  .graph-header>.amountmenu.flexmenu.CL1>.amount {
    width: calc(100% / 3);
  }

  .graph-header>.amountmenu.flexmenu.CL2>.amount {
    width: calc(100% / 3);
  }

  /* 入力欄を横いっぱいに広げる */
  .graph-header>.amountmenu.flexmenu.CL1>.amount>input.shorttext,
  .graph-header>.amountmenu.flexmenu.CL1>.amount>select.unitdisplay,
  .graph-header>.amountmenu.flexmenu.CL1>.amount>select.amountdisplay {
    width: 100%;
  }

  /* 入力欄を横いっぱいに広げる */
  .graph-header>.amountmenu.flexmenu.CL2>.amount>input.shorttext,
  .graph-header>.amountmenu.flexmenu.CL2>.amount>select.unitdisplay,
  .graph-header>.amountmenu.flexmenu.CL2>.amount>select.amountdisplay {
    width: 100%;
  }

  /* 開閉ボタンはモバイル用のため非表示 */
  .acc-panel .close-btn {
    display: none;
  }

  /* テーブル見出しのサイズ変更 */
  table.mixingtable th {
    font-size: 0.8rem;
    border-bottom: 1px solid #ccc;
  }


  /* グラフコンテナを縦並び */
  .acc-right-bottom {
    grid-template-columns: auto;
  }

  /* モバイルではグラフの順番入れ替え */
  .acc-panel.acc-graph1 {
    justify-content: space-between;
    order: 2;
    min-height: 0;
    position: relative;
  }

  .acc-panel.acc-graph2 {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    min-height: 0;
    order: 1;
    position: relative;
  }

  /* モバイルでは見出しを表示 */
  .acc-panel .key {
    display: inline;
    width: 100px;
    text-align: center;
  }

  table.deltagridtable td {
    border: #ded 1px solid;
    text-align: center;
    padding: 6px;
  }

  /* コメントパネル：ヘッダ＋本文も同一flex内で管理 */
  .acc-panel.acc-right-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    align-content: flex-start;
    gap: 8px;
    position: relative;
  }

  /* コメントの内側コンテナ（.pair）を上詰めで安定化 */
  .acc-panel.acc-right-top .pair {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    min-height: 0;
    width: 100%;
  }

  /* ヘッダ要素（key／close-btn） */
  .acc-panel.acc-right-top .key,
  .acc-panel.acc-right-top .close-btn {
    flex: 0 0 auto;
    align-self: flex-start;
  }

  .acc-panel .close-btn {
    position: absolute;
    right: 9px;
    top: 9px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid #cfd7e6;
    background: #f5f7fb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .acc-panel .close-btn::before {
    content: '▾';
    font-size: 16px;
    color: #3a4b6a;
  }

  .acc-panel .close-btn[aria-expanded="false"]::before {
    content: '▸';
  }

  /* 本文（.val.acc-body）— 2行目フル幅の開閉対象 */
  .acc-panel .acc-body {
    /* コメントでは .val.acc-body が本文にあたる */
    order: 2;
    flex: 1 0 100%;
    min-height: 0;
    /* ←高さ計算の邪魔になる最小高を無効化 */
    overflow: hidden;
    transition: height .24s ease, opacity .18s ease;
    opacity: 1;
  }

  /* セレクトメニューのサイズ調整 */
  select.deltaGrid,
  select.deltaGraph {
    width: 45%;
    margin-right: 40px;
    height: 22px;
    margin-top: 1%;
  }

  .acc-body.close {
    height: 0;
    overflow: hidden;
    opacity: 0;
    transition: height .24s ease, opacity .18s ease;
  }

  .acc-body {
    transition: height .24s ease, opacity .18s ease;
  }

}

@media (max-width: 560px) {
  .kv {
    grid-template-columns: 48% 52%;
  }

  .kv__label,
  .kv__value {
    font-size: 0.65rem;
  }

  .score__label {
    font-size: 0.7rem;
    padding: 0.15rem;
  }

  .score__value {
    min-height: 2.5rem;
  }

  .acc-panel,
  .mobile-color-summary .kv--headline {
    padding: 0.25rem;
  }

  .mobile-color-summary {
    grid-auto-rows: minmax(28px, auto);
  }

  .mobile-color-summary .kv--headline .kv__headingword,
  .mobile-color-summary .kv--headline .kv__paragraph {
    font-size: 0.7rem;
    padding: 0.2rem;
  }

  .graph-header {
    font-size: 0.75rem;
  }

  table.mixingtable th,
  table.mixingtable td,
  .acc-panel.acc-right-top .key,
  .hidden-row.open .acc-body,
  table.deltagridtable td {
    font-size: 0.7rem;
  }

}



/* ーーーーーーーーーーーーー */
/* ジョブリスト用 */
/* ーーーーーーーーーーーーー */

/* ===== ジョブ画面専用（ページ名前空間） ===== */
main.joblist {
  --col-check: 36px;
  --col-swatch: 96px;
  --col-meta: 1fr;
  --col-job: 280px;
  /* 右端はジョブ列 */
}

/* ヘッダーを 3 ブロック（スウォッチ／メタ／ジョブ）に */
.joblist .summary-head__grid {
  display: grid;
  grid-template-columns: var(--col-check) var(--col-swatch) var(--col-meta) var(--col-job);
  gap: 0;
  padding: 0;
  align-items: stretch;
}

.joblist .head-empty {
  grid-column: 1 / 2;
}

.joblist .head-swatch {
  grid-column: 2 / 3;
}

.joblist .head-meta {
  grid-column: 3 / 4;
}

.joblist .head-job {
  grid-column: 4 / 5;
}

.joblist .summary-head__grid>* {

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  font-weight: 700;
  font-size: 12px;
  color: #333;
  border-right: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
  white-space: nowr
}

.joblist .summary-head__grid>*:last-child {
  border-right: none;
}

.joblist .summary-head__grid .head-score {
  display: none !important;
}

/* 本文 4 列（チェック／見本／メタ／ジョブ） */
.joblist .color-summary {
  display: grid;
  grid-template-columns: var(--col-check) var(--col-swatch) var(--col-meta) var(--col-job);
  grid-template-areas:
    "checkbox swatch meta job"
    "checkbox swatch meta job"
    "checkbox swatch meta job";
  gap: 0;
  padding: 0;
}

/* 右端はジョブ情報のエリア */
.joblist .summary__job {
  grid-area: job;
  border: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
  border-left: none;
  padding-left: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ジョブ情報のpタブ調整 */
.joblist .summary__job>div>p {
  margin: 0;
}

/* ===== カラーデータ（KV）を“横 3 列”へ ===== */
.joblist .summary__meta .kv {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  /* ← 3列 */
  grid-auto-rows: minmax(36px, auto);
  gap: 0;
  border-bottom: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.joblist .summary__meta .kv__item {
  display: grid;
  grid-template-columns: 42% 58%;
  align-items: stretch;
  min-height: 40px;
  border-top: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
  border-right: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.joblist .summary__meta .kv__label {
  background: var(--tbl-key-bg, #f3f4f6);
  color: #374151;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 6px;
  border-right: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.joblist .summary__meta .kv__value {
  background: #fff;
  color: var(--ui-text, #241717);
  font-size: 14px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  overflow-wrap: anywhere;
}

/* 幅を取りたい項目（例：色名）は 2 枠分に展開可能 */
.joblist .summary__meta .kv__item--wide {
  grid-column: span 2;
}

.joblist figure.summary__swatch {
  min-height: auto;
}

/* ===== 右端：ジョブ情報コンポーネント（2行） ===== */
.joblist .job-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  border: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
  background: #fff;
}

.joblist .job-table th,
.joblist .job-table td {
  padding: 6px 8px;
  font-size: 14px;
  border-bottom: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.joblist .job-table tr:last-child th,
.joblist .job-table tr:last-child td {
  border-bottom: none;
}

.joblist .job-label {
  width: 42%;
  background: var(--tbl-key-bg, #f3f4f6);
  color: #374151;
  text-align: left;
  font-weight: 700;
  border-right: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.joblist .job-value {
  color: var(--ui-text, #241717);
  text-align: right;
}

.joblist .job-no,
.maidatalist .maidata-no {
  color: #c62828;
  font-weight: 700;
}

.joblist .mobile-job-no-block {
  display: none;
}

/* =========================
   joblist アコーディオン右上（3カラム）
   ========================= */
.joblist .acc-right-top {
  padding: 10px;
  display: flex;
  align-items: center;
}

.joblist .jobtop-grid {
  display: grid;
  grid-template-columns: 82px minmax(150px, 300px) 1fr;
  grid-template-rows: auto auto;
  gap: 10px 12px;
  align-items: start;
  width: 100%;
}

/* キー列（左） */
.joblist .jobtop-key {
  display: grid;
  grid-auto-rows: minmax(36px, auto);
  gap: 10px;
}

.joblist .jobtop-key__item {
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  padding: 10px 8px;
  white-space: nowrap;
}

/* バリュー列（中央） */
.joblist .jobtop-val {
  display: grid;
  grid-auto-rows: minmax(36px, auto);
  gap: 10px;
}

.joblist .jobtop-val__item {
  display: flex;
  align-items: center;
}

.joblist label.selectbox {
  width: 100%;
  height: 100%;
}

/* 既存 selectbox の見た目は流用。必要なら微調整 */
.joblist .jobtop-val__item .selectbox select,
.joblist .jobtop-val__item .selectbox .job {
  width: 100%;
  height: var(--field-h);
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}

.joblist .dropdown_joblists {
  display: none;
}

.joblist .dropdown_joblists.is-open {
  display: block;
}

input#jobname {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  height: 100%;
  width: 100%;
}

/* スコア列（右） */
.joblist .jobtop-score {
  display: grid;
  grid-template-rows: auto 1fr;
  border: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
  background: #fff;
}

.joblist .jobtop-score__label {
  background: var(--tbl-key-bg, #f3f4f6);
  color: var(--ui-muted, #6b7280);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 6px 8px;
  border-bottom: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.joblist .jobtop-score__value {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(18px, 2.0vw, 24px);
  /* color: var(--ok, #16A34A); */
  /* 緑強調 */
  min-height: 56px;
}

.joblist .color-swatch-selectbox .color-swatch {
  width: 60px;
  height: 30px
}


/* ===== 中間幅のチューニング（任意） ===== */
@media (max-width: 1200px) {
  .joblist :root {
    --col-job: 240px;
  }
}

@media (max-width: 960px) {
  .joblist :root {
    --col-swatch: 80px;
    --col-job: 200px;
  }

  .joblist .summary__meta .kv {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
}

/* ===== モバイル ===== */
@media (max-width: 820px) {

  /* モバイル用のテーブル調整 */
  .joblist .summary-head__grid {
    display: none;
  }

  .joblist .palette-table thead {
    /* display: contents; */
  }

  /* 閉じた状態 */
  .joblist .palette-table tbody.obj tr.hidden-row {
    display: none;
  }

  /* 開いた状態 */
  .joblist .palette-table tbody.obj tr.hidden-row.open {
    display: contents;
  }

  .joblist .palette-table tbody.obj {
    display: grid;
    grid-template-columns: 88px 1fr;
    grid-auto-rows: auto;
    grid-auto-flow: row;
    gap: 0;
    padding: 0;
    margin: 8px 0;
    border: none;
    background: var(--ui-bg, #fff);
  }

  .joblist .summary__job {
    border-left: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
  }

  .joblist .palette-table tbody.obj tr {
    display: contents;
  }

  /* joblist内　モバイルカラーtable */
  .joblist .palette-table th {
    font-size: 0.8rem;
    border-bottom: 1px solid #ccc;
  }

  .joblist .palette-table>tbody>tr>td.mobile-color-cell {
    width: 100vw;
  }

  .joblist .palette-table .summary-row .summary-cell,
  .joblist .palette-table .hidden-row .cell {
    grid-column: 1 / -1;
    width: 100vw;
  }

  .joblist .palette-table .summary-row {
    order: 1;
  }

  .joblist .palette-table .hidden-row {
    order: 2;
  }

  .joblist .color-summary {
    display: grid;
    grid-template-columns: 0.2fr 0.7fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "checkbox swatch meta"
      "job      job    job";
    gap: 6px 8px;
    padding: 8px;
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  }

  /* モバイル KV は縦型 2 カラム（キー全面グレー／値右端） */
  .joblist .summary__meta .kv {
    grid-template-columns: 42% 58%;
    grid-auto-rows: minmax(36px, auto);
  }

  .joblist .summary__meta .kv__item {
    display: contents;
  }

  .joblist .jobtop-grid {
    grid-template-rows: auto auto auto;
    gap: 8px 10px;
  }

  .joblist .jobtop-key {
    grid-column: 1 / 2;
  }

  .joblist .jobtop-val {
    grid-column: 2 / 3;
  }

  .joblist .jobtop-score {
    grid-column: 1 / -1;
    grid-row: 3 / 4;
    margin-top: 0.6rem;
  }

  .joblist .jobtop-score__value {
    font-size: clamp(17px, 3.2vw, 21px);
    min-height: 52px;
  }

  /* モバイル向けにジョブNoの位置調整 */
  .joblist section.color-summary>.summary__job {
    display: none;
  }

  .joblist .mobile-job-no-block {
    display: flex;
    justify-content: space-around;
    grid-column: 1 / -1;
    text-align: center;
    margin-bottom: 10px;
  }


  .joblist label.selectbox,

  .joblist .color-swatch-selectbox #jobname {
    width: 100%;
    height: 100%;
  }

  .joblist .mobile-job-no-block>div>p {
    margin: 0;
  }

  /* 隠し領域内のテーブル定義を調整 */
  .joblist table.deltagridtable.acc-body tr,
  .joblist table.inner-table.palette-table.mixingtable.mixingcorrecttable tr,
  .joblist table.inner-table.palette-table.mixingtable.mixingoriginaltable tr {
    display: table-row;
  }

  .joblist table tr.data-row input,
  .joblist table tr.data-row td,
  .joblist table tr.data-row th {
    max-width: 96px;
  }

  .joblist tr.row-sep td:focus .row-insert {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1.04);
  }

  .joblist .acc-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      "right-top"
      "left"
      "right-bottom";
  }

  .joblist .acc-left {
    grid-area: left;
  }

  .joblist .acc-right-top {
    grid-area: right-top;
  }

  .joblist .acc-right-bottom {
    grid-area: right-bottom;
  }

}

/* ===== モバイル ===== */
@media (max-width: 580px) {

  /* モバイル用のテーブル調整 */
  .joblist .summary__meta .kv__label,
  .joblist .summary__meta .kv__value {
    font-size: 0.65rem;
  }

  .maidata-no {
    font-size: 0.7rem;
  }

  .mydatalist.joblist section.color-summary>.summary__job {
    font-size: 0.8rem;
  }

  .joblist .summary__meta .kv__value {
    font-size: 0.8rem;
  }

  .joblist .summary__meta .kv {
    grid-auto-rows: minmax(28px, auto);
    padding: 0.2rem;
  }

  /* スコア領域 */
  .joblist .jobtop-score__label {
    padding: 0.3rem;
  }

  .joblist .jobtop-score__value {
    min-height: 2.2rem;
  }

  /* デバイス入力欄 */
  .joblist .jobtop-val__item .selectbox select {
    font-size: 0.7rem;
  }

  .acc-panel .key {
    font-size: 0.7rem;
  }

}

/* ーーーーーーーーーーーーー */
/* マイデータリスト用 */
/* ーーーーーーーーーーーーー */

.mydatalist .acc-grid {
  display: grid;
  grid-template-columns: auto;
  /* grid-template-rows: max-content minmax(250px, 250px); */
  gap: 5px;
}

.mydatalist.joblist section.color-summary>.summary__job {
  display: block;
}

/* -----------------------------------------------------------------------
   6) マイデータ新規作成用
   ----------------------------------------------------------------------- */

/* 変数（必要に応じて微調整可能） */
.mydata-create {
  --gap: 0.5rem;
  --left-col: 25%;
  --center-col: 50%;
  --right-col: 25%;
  --center-top: 30%;
  --center-bottom: 70%;
  --right-top: 40%;
  --right-bottom: 60%;
}

/* メイングリッド */
.mydata-create .my-data-grid {
  display: grid;
  grid-template-columns: 2.5fr 4.5fr 3fr;
  /* 左20%／中央45%／右35%（例） */
  /* 行は1段にしておく（上下は各列の中で分割） */
  grid-auto-rows: auto;
  grid-template-areas: "left center right";
  gap: var(--gap);
  align-items: stretch;
}

/* 各エリア割り当て */

/* 左はそのまま単独ボックス */
.mydata-create .area-left {
  grid-area: left;
}

/* 中央列：②③を上下分割（比率は任意で変更OK） */
.mydata-create .center-col {
  grid-area: center;
  display: grid;
  grid-template-rows: 1.5fr 3.5fr;
  gap: var(--gap);
  min-height: 0;
}

.mydata-create .center-col>.area-center-top {
  grid-row: 1;
}

.mydata-create .center-col>.area-center-bottom {
  grid-row: 2;
}

/* 右列：④⑤を上下分割（現状維持：40%/60%など） */
.mydata-create .right-col {
  grid-area: right;
  display: grid;
  grid-template-rows: 2fr 3fr;
  gap: var(--gap);
  min-height: 0;
}

.mydata-create .right-col>.area-right-top {
  grid-row: 1;
}

.mydata-create .right-col>.area-right-bottom {
  grid-row: 2;
}


/* 共通ボックス調整 */
.mydata-create .filter-block,
.mydata-create .swatch-block,
.mydata-create .comment-block {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 8px;
  padding: 0.75rem;
  min-width: 0;
  min-height: 0;
}

.mydata-create .filter-block .selectbox::after,
.mydata-create .filter-block .selectbox::before {
  display: none;
}

.mydata-create .cl-btns {
  width: auto;
}

/* ① 左フォーム：6列（ラベル＋入力）を縦積み */
.mydata-create .table-scroll {
  max-height: 360px;
  overflow: auto;
  block-size: auto;
}

/* テーブルは幅に合わせて縮む＋セル折り返し調整 */
.mydata-create table {
  table-layout: auto;
  width: 100%;
}

.mydata-create .filter-form .field {
  display: grid;
  grid-template-columns: 1.5fr 3fr;
  /* ラベル/入力の比率 */
  align-items: center;
  gap: 0.2rem;
  padding-bottom: 12px;
}

.mydata-create .filter-form label {
  font-size: 0.8rem;
  color: #374151;
}

.mydata-create .filter-form input,
.mydata-create .filter-form select {
  inline-size: 100%;
  padding: 0.5rem 0.2rem !important;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.7rem;
}

/* HBC用 */
.mydata-create .filter-form .select-pair {
  display: flex;
  justify-content: space-between;
  gap: 0.2rem;
}

.mydata-create .filter-form .select-pair label:first-of-type {
  min-width: 55px;
}

.mydata-create .filter-form .select-pair label:last-of-type {
  width: calc(100% - 55px);
  min-width: 60px;
}



/* ② 測色選択の左右レイアウト   /* 左:見本カラー / 右:操作領域 */
.mydata-create .swatch-block {
  display: grid;
  grid-template-columns: 1fr 3fr;
  grid-template-rows: auto;
  grid-auto-flow: row;
  gap: 0.75rem;
  align-items: center;
}

/* 子の配置を明示（列／行） */
.mydata-create .swatch-block>figure {
  grid-column: 1;
  grid-row: 1;

}

.mydata-create .swatch-block>.jobtop-val {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 0.75rem;
}

.mydata-create .swatch-block>.jobtop-val .form-label {
  width: 25%;
  display: inline-flex;
  align-items: center;
  font-size: 0.85rem;
}

.mydata-create .jobreload {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.mydata-create .jobreload:hover {
  opacity: 0.7;
}


.mydata-create .summary__swatch {
  border: none;
}

.mydata-create .summary__swatch .vcenter {
  flex-direction: column;
}

.mydata-create .summary__swatch .vcenter .swatches {
  width: 100%;
  max-width: 90px;
  max-height: 90px;
}

.mydata-create .swatch-block label.selectbox {
  width: 72% !important;
}

.mydata-create .swatch-block label.selectbox select,
.mydata-create .swatch-block input[type="text"] {
  width: calc(var(--field-w) - 50px) !important;
  width: 100% !important;
  height: var(--field-h);
  padding: 6px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}

/* 疑似セレクトボックス内のカラー調整 */
.mydata-create .joblists {
  width: auto;
  position: relative;
}

.mydata-create .color-swatch-selectbox #jobname {
  padding-left: 55px;
}

.mydata-create .color-swatch-selectbox .color-swatch {
  width: 35px;
}

.mydata-create .dropdown_joblists.is-open {
  display: block;
}

.mydata-create .dropdown_joblists {
  display: none;
}

/* テーブルの体裁 */
.mydata-create .center-col>.area-center-bottom table.inner-table.palette-table {
  border-collapse: collapse;
  inline-size: 100%;
}

/* スクロールバー分の余白 */
.mydata-create .center-col>.area-center-bottom .table-scroll {
  padding-inline-end: 14px;
  margin-top: 24px;
}

.mydata-create .center-col>.area-center-bottom .table-scroll>table.inner-table {
  margin-top: 0;
}

/* 行追加用のブロックセル */
.mydata-create tr.row-sep td {
  border-left: solid 1px rgb(229, 231, 235);
  border-right: solid 1px rgb(229, 231, 235);
}

.mydata-create .center-col>.area-center-bottom table.inner-table.palette-table tbody tr td:last-of-type,
.mydata-create .center-col>.area-center-bottom table.inner-table.palette-table tbody tr th:last-child {
  position: relative;
  text-align: right;
}

.mydata-create td.userate.numericcell {
  padding-right: 0.6rem;
}


/* Xボタン（絶対配置で上下中央＆右寄せ） */
.mydata-create .center-col>.area-center-bottom table.inner-table.palette-table tbody tr>td:last-child .row-delete,
.mydata-create .center-col>.area-center-bottom table.inner-table.palette-table tbody tr>th:last-child .row-delete {
  position: absolute;
  top: 50%;
  right: -14px;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  line-height: 24px;
}

.mydata-create th,
.mydata-create td {
  border: 1px solid #e5e7eb;
  padding: 0.45rem;
  white-space: normal;
  font-size: 0.9rem;
}

/* 削除ボタン分右側を空けるなら */
/* .mydata-create .data-row td:last-of-type {
  padding-right: 1.5rem;
} */

.mydata-create .palette-table td.productnumber,
.mydata-create td.userate {
  text-align: center;
  max-width: 110px;
}

.mydata-create th {
  background: #f7f7fb;
  font-weight: 600;
  font-size: 0.9rem;
}

.mydata-create .numericcell {
  text-align: right;
}


/* ④ デルタヘッダ */
.mydata-create .delta-header {
  margin-block-end: 0.5rem;
}

.mydata-create .delta-header select {
  padding: 0rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.mydata-create .pair {
  grid-template-columns: auto;
  grid-template-rows: 30px auto;
  gap: 8px;
  width: 100%;
  height: 100%;
}

.mydata-create .pair .key {
  width: 64px;
}

.mydata-create .pair .val {
  width: 100%;
}

.mydata-create .pair .val textarea {
  width: 100%;
  height: 100%;
}


/* モバイル（≤820px）：縦積みへ */
@media (max-width: 820px) {
  .mydata-create .my-data-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "left"
      "center"
      "right";
    font-size: 0.8rem;
  }

  .mydata-create .center-col,
  .mydata-create .right-col {
    grid-template-rows: auto auto;
    /* 上下2段の縦積み */
  }


  /* モバイルでのボックス余白調整 */
  .mydata-create .filter-block,
  .mydata-create .swatch-block,
  .mydata-create .comment-block {
    padding: 0.75rem;
  }

  /* モバイル版の順番調整 */
  .mydata-create .center-col>.area-center-top {
    grid-row: 2;
  }

  .mydata-create .center-col>.area-center-bottom {
    grid-row: 1;
  }

  .mydata-create .swatch-block {
    grid-template-columns: 1fr 3fr;
  }

  .mydata-create .swatch-block>.jobtop-val .form-label {
    width: 30%;
  }

  .mydata-create .swatch-block label.selectbox {
    width: 66% !important;
  }

  .mydata-create .delta-header select {
    height: 30px;
  }

  /* モバイル版のグラフ文字サイズ */
  .mydata-create th,
  .mydata-create td {
    font-size: 0.8rem;
  }

}


/* -----------------------------------------------------------------------
   エディット画面専用
   ----------------------------------------------------------------------- */

.edit .acc-body {
  max-height: 100%;
  opacity: 100;
  padding: 0;
  width: 100%;
  overflow: visible;
}

.edit .acc-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
  gap: 5px;
}

.edit .acc-grid>.acc-panel {
  overflow: hidden;
}

.edit .acc-body th,
.acc-body td {
  border: none;
}


/* ========= 横スクロール用ラッパ ========= */

/* iOSの慣性スクロールに対応し、横方向だけスクロールさせる */


.edit .table-scroll {
  /* レイアウトの基本 */
  display: block;
  box-sizing: border-box;
  /* パディング・ボーダー込みで計算 */
  inline-size: 100%;
  /* 配置されたコンテナ幅ぴったり */
  max-inline-size: 100%;
  /* 子が大きくても容器は広がらない */

  /* スクロール動作 */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;

  /* 親から nowrap が来ても折り返せるように */
  white-space: normal;

  /* 親が flex のとき「内容幅に合わせて伸びる」のを抑える保険 */
  flex: 0 0 auto;
}

/* ========= テーブル側の最小幅確保 ========= */
/* テーブル自体を極端に潰さないための最小幅。必要に応じて数値調整可 */
.edit table.inner-table.palette-table.mixingtable.mixingoriginaltable {
  min-width: 720px;
  table-layout: auto;
}

/* ベース */
.edit table.inner-table.palette-table.mixingtable.mixingoriginaltable {
  table-layout: auto;
  padding-right: 30px;
}

.edit table.inner-table.palette-table.mixingtable.mixingoriginaltable thead th,
.edit table.inner-table.palette-table.mixingtable.mixingoriginaltable tbody td {
  border: none;
  padding: 5px;
}

.edit table.inner-table.palette-table.mixingtable.mixingoriginaltable tbody tr.data-row:hover td {
  background: #fcfcfc;
}

/* 列幅ヒント */
.col-no {
  width: 12ch;
}

.col-name {
  width: 28ch;
}

.col-percent {
  width: 10ch;
}

.col-gram {
  width: 12ch;
}

.col-edit-percent {
  width: 16ch;
}

.col-edit-gram {
  width: 16ch;
}

.col-actions {
  width: 3ch;
}

/* 操作列はコンパクト */

/* 入力欄 */
.mix-edit-input {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  font-size: 0.95rem;
  border: 1px solid #c9c9c9;
  border-radius: 6px;
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
  min-width: 8ch;
}

.mix-edit-input:focus-visible {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* 操作セル内で右寄せ */
.cell-actions {
  text-align: right;
}

/* 赤い丸 × ボタン */
.row-delete {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #ef4444;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  transition: transform 100ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.row-delete:hover {
  transform: scale(1.04);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.row-delete:active {
  transform: scale(0.98);
}

.row-delete:focus-visible {
  outline: 2px solid rgba(239, 68, 68, 0.5);
  outline-offset: 2px;
}

/* 行間の挿入ライン（＋） */
tr.row-sep td {
  border: none;
  padding: 6px 0;
  position: relative;
}

.sep-line {
  display: block;
  width: 100%;
  border-bottom: 1px dashed #a7a7a7;
}

.row-insert {
  position: absolute;
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #ff8a00;
  color: #fff;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-in-out, transform 120ms ease-in-out;
}

tr.row-sep td:hover .row-insert {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1.04);
}

.row-insert:focus-visible {
  opacity: 1;
  pointer-events: auto;
  outline: 2px solid rgba(255, 138, 0, 0.65);
  outline-offset: 2px;
}

.row-insert.__force-visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}


/* --- 1) 行内の中央揃え（横方向） --- */
/* データ行のセル内テキスト・子要素を中央寄せ */
tr.data-row>td {
  text-align: center;
  /* 横方向中央 */
  vertical-align: middle;
  /* 縦方向中央（既定の保険） */
}

tr.data-row>td.numericcell {
  text-align: right;
  padding-right: 30px !important;
}

/* 入力欄のテキストも中央揃えにする */
tr.data-row .mix-edit-input {
  text-align: center;
  /* 入力フィールド内の文字を中央に */
  /* 幅が広すぎる場合は抑えたいときに（任意）
     max-width: 18ch; margin: 0 auto; */
}

tr.data-row .mix-edit-numericinput {
  text-align: right !important;
  padding-right: 10px;
}

/* --- 2) 操作セル（削除ボタン）だけは右寄せにしたい場合（任意） ---
   「すべて中央」がご希望ならこのブロックは削除してください。*/
tr.data-row>td.cell-actions {
  text-align: right;
}

/* --- 3) 削除ボタンの表示制御（ホバー時のみ表示） --- */
/* 通常は非表示・クリック不可にしておく */
tr.data-row .row-delete {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-in-out, transform 100ms ease;
}

/* 行ホバー時に表示（クリック可） */
tr.data-row:hover .row-delete {
  opacity: 1;
  pointer-events: auto;
}

/* キーボードでボタンにフォーカスが来たら必ず見える（アクセシビリティ） */
tr.data-row .row-delete:focus-visible {
  opacity: 1;
  pointer-events: auto;
  outline: 2px solid rgba(239, 68, 68, 0.5);
  outline-offset: 2px;
}

/* ホバー時のわずかなアニメーション（任意） */
tr.data-row:hover .row-delete:hover {
  transform: scale(1.04);
}

/* --- 4) 行間の挿入ボタン（[+]）はそのままの仕様を維持（既存CSS） ---
   もし行ホバー時に [+] も見せたいなら以下を追加（任意） */
/*
tr.data-row:hover + tr.row-sep .row-insert {
  opacity: 1;
  pointer-events: auto;
}
*/


/* 保存・キャンセルボタンの配置 */
.table-actions-bottom {
  margin: 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  /* 右寄せ */
}

/* 丸ボタン共通 */
.table-actions-bottom button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

/* 保存（✔）ボタン：緑 */
.btn-save {
  background-color: #22c55e;
  /* 緑 */
}

.btn-save:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* キャンセル（×）ボタン：赤 */
.btn-cancel {
  background-color: #ef4444;
  /* 赤 */
}

.btn-cancel:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* ========= 行ホバー時だけ削除ボタンを表示（既存仕様維持） ========= */
/* デスクトップでは hover、キーボード操作時は focus-visible で表示 */
tr.data-row .row-delete {
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-in-out, transform 100ms ease;
}

tr.data-row:hover .row-delete,
tr.data-row:focus .row-delete {
  opacity: 1;
  pointer-events: auto;
}

tr.data-row .row-delete:focus-visible {
  opacity: 1;
  pointer-events: auto;
  outline: 2px solid rgba(239, 68, 68, 0.5);
  outline-offset: 2px;
}

/* ========= 行間の挿入ライン（＋）も既存仕様のまま ========= */
tr.row-sep td {
  border: none;
  padding: 6px 0;
  position: relative;
}

.sep-line {
  display: block;
  width: 100%;
  border-bottom: 1px dashed #a7a7a7;
}

.row-insert {
  position: absolute;
  left: 0px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: #ff8a00;
  color: #fff;
  font-weight: 700;
  line-height: 26px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease-in-out, transform 120ms ease-in-out;
}

tr.row-sep td:hover .row-insert {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1.04);
}

.row-insert:focus-visible {
  opacity: 1;
  pointer-events: auto;
  outline: 2px solid rgba(255, 138, 0, 0.65);
  outline-offset: 2px;
}

.row-insert.__force-visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* ========= 保存・キャンセルボタンの位置はそのまま ========= */
.table-actions-bottom {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.table-actions-bottom .btn-save,
.table-actions-bottom .btn-cancel {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.table-actions-bottom .btn-save {
  background-color: #22c55e;
}

.table-actions-bottom .btn-save:hover {
  transform: scale(1.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.table-actions-bottom .btn-cancel {
  background-color: #ef4444;
}



/* ========= モバイル特化の微調整 ========= */
@media (max-width: 820px) {

  .edit .acc-panel {
    width: 98%;
  }

  .edit table.inner-table.palette-table.mixingoriginaltable {
    min-width: 680px;
  }

  /* colgroupの列幅ヒントは解除 */
  col {
    width: auto !important;
  }

  /* CL1/CL2とも行はテーブル行として扱う（display:contents の打消し） */
  table#tblCL1 tr,
  table#tblCL2 tr {
    display: table-row !important;
  }


  /* 見出し・セルのパディングをやや詰める */
  .edit table.inner-table.palette-table.mixingoriginaltable th,
  .edit table.inner-table.palette-table.mixingoriginaltable td {
    padding: 6px 8px;
  }

  /* テーブル最小幅を少し緩める（端末に合わせて調整） */
  .edit table.inner-table.palette-table.mixingoriginaltable {
    min-width: 680px;
  }

  /* 原色名が長い場合に省略表示（CL1/CL2の2列目） */
  .CL1 td:nth-child(2),
  .CL2 td:nth-child(2) {
    /* white-space: nowrap; */
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


/* -----------------------------------------------------------------------
   塗料種変更専用
   ----------------------------------------------------------------------- */

main.colormix {
  width: calc(100vw - 20px);
  max-width: 1200px;
  margin: auto auto;
}

.colormix .table-wrap {
  padding: 48px;
}

.colormix tr#acc-1,
.colormix .mobile-color-summary {
  display: grid;
}

.colormix .kv {
  display: contents;
}

.colormix .kv__label {
  justify-content: center;
}

/* 専用borderの引き直し */
.colormix .kv__label,
.colormix .kv__value {
  border-top: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
  border-right: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.colormix .mobile-color-summary .kv:nth-child(odd) .kv__label {
  border-left: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}

.colormix .kv.kv--headline {
  border: 1px solid var(--tbl-grid, var(--ui-border, #e5e7eb));
}


.colormix .mobile-color-summary {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(44px, auto);
  padding: 8px;
}

/* 隠し行ではなく常時表示 */
.colormix .acc-body {
  opacity: 100;
  max-height: 100%;
}

/* 見出しコメント用 */
.colormix .kv.kv--headline {
  grid-column: 1 / -1;
  display: block;
  padding: 12px;
}

.colormix .mobile-color-summary .kv--headline .kv__headingword {
  background: var(--tbl-key-bg);
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.colormix .acc-grid {
  display: block;
}

/* グラフのヘッダーを横並びに調整 */
.colormix .graph-header {
  justify-content: space-around;
  align-items: center;
}

.colormix .cl-btns {
  width: auto;
}

.colormix input.shorttext,
.colormix .amountmenu select {
  width: 100px;
}

/* 原色No */
.colormix th.productnumber,
.colormix td.productnumber {
  width: 15%;
}

/* 配合 */
.colormix th.useweight,
.colormix th.userate,
.colormix th.usevolume,
.colormix td.useweight,
.colormix td.userate,
.colormix td.usevolume {
  width: 20%;
  text-align: right;
}

/* 原色名を余り分で広めに確保 */
.colormix th.productname,
.colormix td.productname {
  width: auto;
}

/* 印刷ボタン */
.printbtn-area {
  display: flex;
  justify-content: flex-end;
  padding: 0 2vw;
}

.colormix button#printbtn {
  all: unset;
  cursor: pointer;
  background-color: #1d4ed8;
  color: #dbeafe;
  padding: 12px 24px;
  margin: 20px 6px;
  cursor: pointer;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: 0.3s;
}

/* アイコンサイズ */
.btn-print .icon {
  width: 18px;
  height: 18px;
}

.colormix button#printbtn:hover {
  opacity: 0.7;
}

/* 印刷ウィンドウ用設定 */
@media print {

  /* 印刷ボタンや画面専用UIは印刷しない */
  .printbtn-area,
  .btn-print {
    display: none !important;
  }

  /* デフォルトでは改ページなし */
  .page-print-line {
    break-after: auto;
    page-break-after: auto;
  }

  /* 直後に .page-print-line が続く場合のみ、改ページを入れる */
  .page-print-line:has(+ .page-print-line) {
    break-after: page;
    page-break-after: always;
  }

}

/* ========= モバイル特化の微調整 ========= */
@media (max-width: 820px) {

  /* PC版用の余白解除 */
  .colormix .table-wrap {
    padding: 0px;
  }

  /* 見出しコメント用調整 */
  .colormix .kv {
    /* display: block; */
  }

  .colormix .kv__label,
  .colormix .kv__value {
    border-left: none;
    border-bottom: none;
  }

  .colormix .graph-header {
    flex-direction: row;
    align-items: flex-end;
  }

  .colormix .cl-btns {
    order: 1;
    width: 30%;
  }

  .colormix .amount {
    order: 2;
    width: 60%;
    border-bottom: none;
  }

  .colormix label.selectbox {
    width: 200px;
  }

  .colormix .selectbox select {
    width: 200px;
  }
  
  @media print {
	  .colormix .selectbox select {
	    font-size: 11px;
            padding-right: 0px;
	  }
	.selectbox::after {
	  content: none;
	  display: none;
	}
  }
}


/* -----------------------------------------------------------------------
   6) 検索前画面（search.html）専用
   ----------------------------------------------------------------------- */

/* =========================================
   右メイン領域：#globalNavi / .searchArea
   ========================================= */

/* PC（既存）：2カラム */
.main-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--ui-gap);
}

/* サイド領域 */
.layout.search .blockSide {
  position: relative;
  width: 250px;
  top: 0px;
  left: 0;
}

/* 上段フォーム（dl.form）：左 dt / 右 dd の2列（行にゆとり） */
.searchArea dl.form {
  display: grid;
  grid-template-columns: var(--label-w) 1fr;
  column-gap: 12px;
  row-gap: var(--row-gap-up);
  align-items: start;
  /* ← これで dt は dd の「先頭」に合わせて左に付く */
}

.searchArea dl.form>dt {
  font-weight: 700;
  color: var(--ui-text);
  line-height: var(--field-h-up);
  min-height: var(--field-h-up);
  display: flex;
  align-items: center;
  padding: 5px 0;
}

.searchArea dl.form>dd {
  margin-inline-start: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-block: var(--row-pad-block);
}

/* 下段（dl.account）：4列グリッド（デバイス｜DB／コート｜G／測色フル） */
.searchArea dl.account {
  display: grid;
  grid-template-columns: var(--label-w) var(--field-w) var(--label-w) var(--field-w);
  column-gap: 12px;
  row-gap: var(--row-gap-up);
  align-items: center;
}

.searchArea dl.account>dt {
  font-weight: 700;
  color: var(--ui-text);
  line-height: var(--field-h-up);
}

.searchArea dl.account>dt.database-label {
  margin-left: var(--account-gap-strong, 20px);
}

.searchArea dl.account>dd {
  margin-inline-start: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding-block: var(--row-pad-block);
}

/* 測色にロードアニメを追加 */
.readcolor_search.is-colorloading {
  opacity: 0.6;
  position: relative;
  pointer-events: none;
  cursor: wait;
}

.readcolor_search.is-colorloading::after {
  content: '';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;

  width: var(--score-spinner-size);
  height: var(--score-spinner-size);
  margin: auto;
  border: var(--score-spinner-thick) solid var(--score-spinner-base);
  border-top-color: var(--score-spinner-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ロード完了 */
.readcolor_search.is-colorloaded::after {
  content: none;
}

/* メイン入力（select / input[list] / 測色表示欄） */
.searchArea dl.form>dd .selectbox select,
.searchArea dl.form>dd .selectbox input[list],
.searchArea dl.form>dd .selectbox .job,
.searchArea dl.account>dd .selectbox select,
.searchArea dl.account>dd .selectbox input[list],
.searchArea dl.account>dd .selectbox .job {
  width: var(--field-w);
  height: var(--field-h-up);
  box-sizing: border-box;
  border: none;
  border-radius: 10px;
}

/* 付帯要素（ヘルプ／一致条件）の高さ揃え */
.searchArea .maker,
.searchArea .match,
.searchArea .database {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--field-h-up);
}

/* ▼右端緑帯＋白い▼（label.selectbox の疑似要素で描画） */
.selectbox {
  position: relative;
  display: inline-block;
}

.selectbox::after {
  content: "";
  position: absolute;
  height: 100%;
  top: 0px;
  bottom: 1px;
  right: 1px;
  width: var(--select-accent-w);
  background: var(--ui-dark-green);
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
  pointer-events: none;
  z-index: 0;
}

.selectbox::before {
  --chev-w: 8px;
  --chev-h: 6px;
  content: "";
  position: absolute;
  top: 50%;
  right: calc(1px + (var(--select-accent-w) / 2) - (var(--chev-w) / 2));
  transform: translateY(-45%);
  width: 0;
  height: 0;
  border-left: calc(var(--chev-w)/2) solid transparent;
  border-right: calc(var(--chev-w)/2) solid transparent;
  border-top: var(--chev-h) solid #fff;
  pointer-events: none;
  z-index: 1;
}

/* 入力テキストが帯と重ならないよう、右側に十分な余白 */
.selectbox select,
.selectbox input[list],
.joblists .job {
  padding-right: max(40px, calc(var(--select-accent-w) + 0px));
}


/* アコーディオン枠 */
.account-accordion {
  border-top: 1px solid var(--divider-color);
  margin-top: 24px;
  padding-top: 24px;
}

/* summary をボタン風に */
.account-accordion__summary {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 10px 0;
  list-style: none;
  /* Safari 対策 */
}

.account-accordion__title {
  font-weight: 800;
  color: var(--ui-text);
  font-size: 15px;
}

/* ▼アイコン風（開閉で回転） */
.account-accordion__chevron::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ui-text);
  border-bottom: 2px solid var(--ui-text);
  transform: rotate(45deg);
  transition: transform 160ms ease;
  margin-left: 6px;
}

.account-accordion[open] .account-accordion__chevron::before {
  transform: rotate(-135deg);
  /* 開いている時は上向きに */
}

/* 染色データ回り */
.joblists {
  position: absolute;
  width: var(--field-w);
  /* 例：288px */
  max-width: 100%;
  /* 狭い画面での崩れ防止 */
}

/* 通常は必ず非表示（他所の display:block !important を潰すための強制リセット） */
.searchArea dd .dropdown_joblists {
  display: none !important;
}

/* 開いた時だけ表示（親 .joblists に open が付いた時に開く） */
.searchArea dd .joblists.open .dropdown_joblists {
  display: block !important;
}

/* ドロップダウン */
.dropdown_joblists {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid var(--ui-border);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
  padding: 6px;
  margin: 0;
  list-style: none;
  font-size: 13px;
  min-width: 240px;
  max-height: 260px;
  overflow: auto;
  z-index: 1100;
}

.dropdown_joblist {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease;
  min-height: 40px;
}

.dropdown_joblist:hover {
  background: rgba(37, 99, 235, .06);
}

.dropdown_joblist .samplecolor {
  width: 60px;
  height: 40px;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .06) inset;
  flex: 0 0 auto;
}

.dropdown_joblist .jobname {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.4;
  color: inherit;
  white-space: normal;
  overflow: visible;
}

/* スウォッチ付きセレクトボックス（測色データ専用） */
.color-swatch-selectbox {
  position: relative;
  display: inline-block;
}

.color-swatch-selectbox #jobname {
  background: #ffffff !important;
  color: #111827 !important;
  padding-left: 85px;
  width: var(--field-w);
  height: var(--field-h-up);
}

.color-swatch-selectbox .color-swatch {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 70px;
  height: 35px;
  transform: translateY(-50%);
  border-radius: 4px;
  border: 1px solid #d1d5db;
  background: transparent;
}

.color-swatch-selectbox.no-color .color-swatch {
  background: repeating-linear-gradient(45deg, #f3f4f6, #f3f4f6 4px, #e5e7eb 4px, #e5e7eb 8px);
}

/* 状態フラグ */
#jobname.has-color {
  text-shadow: none;
  border-color: #d1d5db;
  box-shadow: none;
}

/* 検索ボタン */
.btnArea {
  margin-top: 50px;
  margin-left: 20px;
  display: block;
}

.btn-search {
  --btn-bg: var(--ui-dark-green);
  --btn-bg-2: #2D6A58;
  --btn-ink: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: calc(var(--label-w) + var(--field-w) - 24px);
  /* 見出し＋入力から端を少しカット */
  padding: 12px 18px;
  color: var(--btn-ink);
  font-weight: 800;
  letter-spacing: .25px;
  font-size: 15px;
  background-image: linear-gradient(180deg, var(--btn-bg-2), var(--btn-bg));
  border: 1px solid #1f4c3f;
  border-radius: 12px;
  box-shadow: 2px 4px 12px rgba(39, 92, 76, .30);
  cursor: pointer;
  transition: transform 80ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.btn-search:hover {
  filter: brightness(1.03);
}

.btn-search:active {
  transform: translateY(0.5px);
}

.btn-search:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}


/* ===========================
   レスポンシブ：820px / 560px
   =========================== */


@media (max-width: 820px) {

  /* ページ：#globalNavi と .searchArea を縦並びに */
  .main-grid {
    grid-template-columns: 1fr;
    /* 1カラム化 */
    gap: calc(var(--ui-gap) * 0.9);
  }

  /* サイド領域 */
  .layout.search .blockSide {
    position: absolute;
    width: 200px;
    top: 140px;
    left: 0;
  }

  /* account：基本は 2 カラム（ラベル｜入力）*/
  .searchArea dl.account {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr);
    column-gap: 10px;
    row-gap: calc(var(--row-gap-up) + 8px);
    /* 並びを名前で定義（database を最後へ回す） */
    grid-template-areas:
      "device-label  device-field"
      "coat-label    coat-field"
      "measure-label measure-field"
      "database-label database-field";
  }

  /* 各ペアのエリア割当 */
  .searchArea dl.account>dt.device-label {
    grid-area: device-label;
  }

  .searchArea dl.account>dd.device-field {
    grid-area: device-field;
  }

  .searchArea dl.account>dt.coat-label {
    grid-area: coat-label;
  }

  .searchArea dl.account>dd.coat-field {
    grid-area: coat-field;
    overflow: hidden;
  }

  .searchArea dl.account>dt.measure-label {
    grid-area: measure-label;
  }

  .searchArea dl.account>dd.measure-field {
    grid-area: measure-field;
    overflow: hidden;
  }

  .searchArea dl.account>dt.database-label {
    grid-area: database-label;
    margin-left: 0;
  }

  .searchArea dl.account>dd.database-field {
    grid-area: database-field;
  }

  /* 測色は右列いっぱい（既存の .wide を活かしてもOK） */
  .searchArea dl.account>dd.wide {
    grid-column: 2 / -1;
  }

  .searchArea dl.account>dd,
  .searchArea dl.account>dd.device-field {
    justify-content: flex-end;
  }

  /* サイド領域 */
  .layout .blockSide {
    position: absolute;
    width: 240px;
    top: 70px;
    z-index: 999;
  }

  .searchArea {
    margin: 96px auto auto auto;
    max-width: 600px;
    width: 90vw;
    font-size: 0.9rem;
  }

  .searchArea dl.form {
    grid-template-columns: var(--label-w) 1fr;
    column-gap: 10px;
    row-gap: calc(var(--row-gap-up) - 2px);
  }

  .searchArea dl.form>dd {
    gap: 8px;
    padding-block: calc(var(--row-pad-block) - 2px);
    justify-content: flex-end;
  }

  .searchArea dl.account>dd.wide {
    grid-column: 2 / -1;
  }

  /* アコーディオン配置 */
  .account-accordion__summary {
    margin: 0 auto 5vw 1vw;
  }

  .none_class {
    display: none;
  }

  /* 右いっぱい（測色など） */
  .dropdown_joblists {
    min-width: 220px;
  }

  /* ボタンは中央寄せ（任意） */
  .btnArea {
    margin-top: 34px;
    margin-left: 0;
    display: flex;
    justify-content: center;
  }

  .btn-search {
    width: min(480px, 100%);
    border-radius: 32px;
  }
}


/*　モバイル */
@media (max-width: 560px) {

  details.settings-section {
    font-size: 0.7rem;
  }

  .searchArea {
    /* width: 95vw; */
  }

  .searchArea dl.form {
    display: grid;
    grid-template-columns: auto minmax(220px, 1fr);
    column-gap: 10px;
    /* row-gap: calc(var(--row-gap-up) + 12px); */
    justify-content: center;
  }

  .searchArea dl.form>dt,
  .searchArea dl.account>dt {
    grid-column: 1;
    line-height: 1.3;
    text-align: left;
    font-size: 0.8rem;
  }

  .searchArea dl.form>dd {
    grid-column: 2;
    padding-block: calc(var(--row-pad-block) - 4px);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 0.7rem;
  }

  /* .searchArea dl.form>dd .selectbox select,
  .searchArea dl.form>dd .selectbox input[list],
  .searchArea dl.form>dd .selectbox .job,
  .searchArea dl.account>dd .selectbox select,
  .searchArea dl.account>dd .selectbox input[list],
  .searchArea .color-swatch-selectbox #jobname {
    width: 55vw;
  } */

  /* 入力パーツのモバイル幅最適化（張り付き防止） */
  .searchArea dl.form>dd .selectbox select,
  .searchArea dl.form>dd .selectbox input[list],
  .searchArea dl.form>dd .selectbox .job,
  .searchArea dl.account>dd.device-field,
  .searchArea dl.account>dd .selectbox select,
  .searchArea .color-swatch-selectbox #jobname {
    width: min(55vw, 250px);
    justify-self: end;
    height: 2rem;
    font-size: 0.7rem;
  }

  /* ドロップダウンの最小幅も控えめに */
  .dropdown_joblists {
    min-width: 200px;
  }

  /* 検索ボタン */
  .btn-search {
    width: 240px;
  }

  .color-swatch-selectbox .color-swatch {
    width: 35px;
    height: 20px;
    left: 5px;
  }

  .color-swatch-selectbox #jobname {
    padding-left: 45px;
  }
}

/* =========================================================
7) 設定画面 
========================================================= */

/* パネル（フォーム外枠） */
.settings-panel {
  background: var(--ui-bg);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: clip;
}

/* コンテナ（main内のレイアウト） */
.container {
  /* max-width: 1080px; */
  margin: 20px auto 80px;
  padding-top: calc(var(--ui-header-h) + var(--ui-header-decor-h));
  margin-left: calc(var(--ui-sidebar-width) + var(--ui-gap) + 1vw);
  margin-right: 1vw;

}

/* アコーディオン区分（<details>） */
details.settings-section {
  padding: 8px 20px;
  margin: 20px;
  border: 1px solid var(--ui-border, #e5e7eb);
}

/* 区分ヘッダー（<summary>） */
summary.section-summary {
  list-style: none;
  /* デフォルト三角を隠す */
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--ui-gap, 16px);
  padding: 16px 0;
  font-weight: 700;
  font-size: 16px;
  color: var(--ui-text);
  user-select: none;
  outline: none;
}

/* 開閉アイコン */
summary.section-summary::after {
  content: "▸";
  font-size: 16px;
  color: var(--ui-muted);
  transition: transform .2s ease, color .2s ease;
}

details[open]>summary.section-summary::after {
  transform: rotate(90deg);
  color: var(--ui-primary);
}

/* 見出し直下の区分説明（さりげないグレー） */
.section-desc {
  color: var(--ui-muted);
  font-size: 12px;
  margin: 0;
  font-weight: 400;
}

/* キーボードフォーカス視認性 */
summary.section-summary:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--settings-focus);
  border-radius: var(--ui-radius);
}

/* 区分コンテンツ */
.section-body {
  padding: 8px 20px 20px;
}

/* 行（左：項目ラベル＋説明／右：入力） */
.setting-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 4fr;
  gap: 8px;
  align-items: center;
  padding: 12px 0;
}

/* ラベル側（項目名＋説明span） */
.setting-label {
  display: flex;
  flex-direction: column;
  gap: var(--row-gap-up, 4px);
}

.setting-label-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ui-text);
}

/* 項目下の説明は“グレー”に */
.setting-label-desc {
  font-size: 12px;
  color: var(--ui-muted);
  line-height: 1.5;
}

/* 入力側 */
.setting-control {
  display: flex;
  flex-direction: column;
  gap: var(--row-gap-up, 8px);
  min-width: var(--field-w, 288px);
}

/* 入力共通（テキスト・数字） */
.input {
  width: 100%;
  height: var(--field-h, 38px);
  padding: 0 12px;
  font-size: 14px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-bg);
  color: var(--ui-text);
  transition: box-shadow .15s ease, border-color .15s ease;
}


/* セレクトボックス */
.select {
  width: 100%;
  height: var(--field-h, 38px);
  padding: 0 12px;
  font-size: 14px;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  background: var(--ui-bg);
  color: var(--ui-text);
  transition: box-shadow .15s ease, border-color .15s ease;
}

.select:focus {
  outline: none;
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 4px var(--settings-focus);
}

.select[disabled] {
  background: var(--tbl-key-bg, #f3f4f6);
  color: var(--ui-muted);
  cursor: not-allowed;
}

/* フッターアクション（保存／キャンセル） */
.panel-footer {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.80));
  border-top: 1px solid var(--ui-border);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--ui-gap, 16px);
}

/* ボタン */
.btn {
  appearance: none;
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius);
  height: var(--ui-footer-h, 44px);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ui-text);
  background: var(--ui-bg);
  cursor: pointer;
  transition: transform .06s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--ui-primary);
  color: #fff;
  border-color: var(--ui-primary-border);
}

.btn-primary:hover {
  background: var(--ui-primary-hover);
}

.btn-outline:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* レスポンシブ：モバイルは1カラム */
@media (max-width: 820px) {

  /* モバイルは項目と内容が１カラム */
  .setting-row {
    grid-template-columns: 1fr;
  }

  /* サイドナビ分の位置調整 */
  .container {
    margin-left: 0;
    margin-right: 0;
    padding-top: calc(var(--ui-header-h) + var(--ui-header-decor-h) + 40px);
  }

  /* 横幅いっぱいに領域確保 */
  .setting-control {
    max-width: 100%;
  }

  /* 見出し直下の区分説明（さりげないグレー） */
  .section-desc {
    max-width: 65vw;
  }

  .section-body {
    padding: 0 0;
  }

  details.settings-section {
    margin: 0px;

  }
}



/* -----------------------------------------------------------------------
   8) パスワード再設定/アカウント作成画面
   ----------------------------------------------------------------------- */

main.account_setting {
  margin: 20px auto;
}

/* コンテナ（main内のレイアウト） */
.account_setting.container {
  max-width: 1080px;
}

/* タイトル部分 */
.account_setting .account_setting_title {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-bottom: 1px solid var(--ui-border);
  background: var(--ui-bg);
}

.account_setting .account_setting_title span.badge {
  inline-size: 8px;
  block-size: 27px;
  border-radius: 4px;
  background: var(--ui-dark-green);
}

/* タイトル部分 */
.account_setting .account_setting_title h1 {
  font-size: 20px;
}

.account_setting .settings-panel {
  padding: 0 20px;
}

p.page-desc {
  padding-bottom: 20px;
}

/* 入力NG時のメッセージ */
.account_setting div#formErrors {
  color: #c62828;
  padding-bottom: 20px;
}

/* 入力NG時のメッセージ */
.account_setting div#formErrors>p {
  margin: 0;
  font-weight: 600;
}

.account_setting div#formErrors>ul {
  margin: 0;
}

.account_setting .is-invalid {
  background-color: #ffdcdc;
}

/* 入力領域のベース */
.account_setting .setting-row {
  grid-template-columns: minmax(300px, 1fr) 4fr;
  align-items: flex-start;
  padding: 16px 0;
}

.account_setting .setting-control {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
}

.account_setting.accountcreate input[type=email] {
  width: 80%;
  margin-right: 10px;
}

/* 認証ボタン */
.account_setting button#btnEmailVerify {
  width: calc(20% - 10px);
  height: 38px;
  background-color: #dddddd;
  border: 1px solid #cfcfcf;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.06);
}

.account_setting button#btnEmailVerify:hover {
  background: #d7eeff;
  border: 1px solid #97bad4;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.10),
    0 1px 3px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.account_setting button#btnEmailVerify:active {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transform: translateY(0);
}

/* 4桁認証画面 */
.account_setting .otp-group {
  display: flex;
  width: 70%;
  margin: 0 auto;
}

.account_setting .otp-group input.otp-input {
  width: 100%;
  border-radius: 0px;
  margin: 4px;
  border: 1px solid var(--ui-text);
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
}

/* メッセージ表示 */
.account_setting div#emailStatus {
  margin-top: 10px;
  font-size: 14px;
}

/* Xボタン */
.account_setting button.btn-cancel {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  font-size: 16px;
  margin-right: 6px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

/* OKボタン */
.account_setting button.btn-save {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  font-size: 16px;
  margin-right: 6px;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.account_setting a.btn.btn-primary {
  display: flex;
  align-items: center;
}

/* パスワード再設定画面 */
.account_setting .setting-control.password-field {
  position: relative;

}


@media (max-width: 820px) {

  /* モバイル版の余白調整 */
  main.account_setting {
    padding-top: calc(var(--ui-header-h) + var(--ui-header-decor-h) + 0px);
  }

  .account_setting .setting-row {
    grid-template-columns: 1fr;
  }

  /* メール認証ボタンのサイズ調整 */
  .account_setting.accountcreate input[type=email] {
    width: 65%;
  }

  .account_setting button#btnEmailVerify {
    width: calc(35% - 10px);
    font-size: 0.8rem;
  }
}

/* 設定画面モバイル版 */
@media (max-width: 560px) {

  details.settings-section {
    padding: 1rem;
  }

  summary.section-summary {
    font-size: 0.8rem;
    gap: 0.5rem;
  }

  .setting-label-title {
    font-size: 0.8rem;
  }

  .setting-row {
    gap: 0.1rem;
  }
}


/* =========================================================
   サブページ
   ========================================================= */
/* ---- 共通レイアウト ---- */
.rcmd-subpage .page-section {
  max-width: 800px;
  margin: 120px auto;
  padding: 0 20px;
}

.rcmd-subpage .red-title {
  color: #c80000;
  font-size: 1.6rem;
  margin-bottom: 30px;
}

/* ==== 1) 更新履歴ページ ==== */
.rcmd-subpage .info-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rcmd-subpage .info-item {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 15px;
}

.rcmd-subpage .info-date {
  width: 120px;
  font-weight: bold;
  color: #92907f;
}

.rcmd-subpage .info-content h2 {
  margin: 0 0 5px;
  font-size: 1.1rem;
}

.rcmd-subpage .info-content p {
  margin: 0;
}

/* ==== 2) ヘルプページ ==== */
.rcmd-subpage .help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.rcmd-subpage .help-list li,
.rcmd-subpage .manual-list li {
  margin-bottom: 10px;
}

.rcmd-subpage .help-list a,
.rcmd-subpage .manual-list a {
  color: #0066cc;
  text-decoration: underline;
}

/* モバイル レイアウト */
@media (max-width: 768px) {
  .rcmd-subpage .help-grid {
    grid-template-columns: 1fr;
  }
}

/*モーダル本体の指定 + モーダル外側の背景の指定*/
.autocolormodal{
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	text-align: center;
	padding: 40px 20px;
	overflow: auto;
	opacity: 0;
	visibility: hidden;
	transition: .3s;
    box-sizing: border-box;
}
/*モーダル本体の擬似要素の指定*/
.autocolormodal:before{
	content: "";
	display: inline-block;
	vertical-align: middle;
	height: 100%;
}
/*モーダル本体に「active」クラス付与した時のスタイル*/
.autocolormodal.active{
	opacity: 1;
	visibility: visible;
}
/*モーダル枠の指定*/
.autocolormodal-body{
	position: relative;
	display: inline-block;
	vertical-align: middle;
	max-width: 500px;
	width: 90%;
        border: 1px;
}
/*モーダルを閉じるボタンの指定*/
.autocolormodal-close{
	position: absolute;
	display: flex;
    align-items: center;
    justify-content: center;
	top: -20px;
	right: -20px;
	width: 20px;
	height: 20px;
	font-size: 20px;
	color: #000000;
	cursor: pointer;
}
/*モーダル内のコンテンツの指定*/
.autocolormodal-content{
	background: #dddddd;
	text-align: left;
	padding: 30px;
}

/* =========================================================
   汎用
   ========================================================= */
.warningmessage {
  color: #FF0000 !important;
}

td.numericcell {
  text-align: right;
}

td.columncell {
  text-align: center;
}

.summary__score .score-val {
  background: #C9FDC1;
}

.paging a.pagenumber {
  text-decoration: none;
  color: #FFFFFF;
}

.paging a.pagenumber:link {
  color: #FFFFFF;
}

.paging a.pagenumber:visited {
  color: #FFFFFF;
}

.paging a.pagenumber:hover {
  color: #FFFFFF;
}

/* おきかえ君用 */
td.replace::after,
td.replaced::after {
    content: "";
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-size: contain;
  background-repeat: no-repeat;
}

td.replace::after {
    background-image: url(/assetsuser/img/replacer_down.png);
}

td.replaced::after {
    background-image: url(/assetsuser/img/replacer_up.png);
}

/* タブレット用 */
@media (max-width: 960px) {
  .palette-table td.productnumber {
    padding-right: 12px;
}

  td.replace::after,
  td.replaced::after {
    width: 28px;
    height: 28px;
  }
}

/* edgeでパスワード表示ボタンが自動的に出てしまう対応 */
input::-ms-reveal {
    display: none;
}