/* ============================================================
   PALETALT-K — style.css

   画面の骨格（100vhシェル・左右タブのパネル・設定行・セグメントボタン・
   キャンバス枠・トースト・折り返し）は /alt.css が持っている。
   ここに書くのは PALETALT にしかない部品だけ：
   ディザ操作の帯と、抽出したパレットの表示。
   ============================================================ */


/* ── ディザ操作（ビューツールバーの右端） ──
   1280px でツールバーが1段に収まるよう詰めてある。緩めると2段に折り返し、
   その分キャンバスの表示倍率が1段階下がることがある */
.dither-bar {
  display: flex; align-items: center; gap: 5px;
  flex-wrap: wrap; justify-content: flex-end; margin-left: auto;
}
.dither-bar .overlay-toggle { margin-left: 0; }

.dither-fine {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--font-body);
  font-size: 12px; line-height: 16px; color: var(--sub); letter-spacing: 1px;
  padding: 4px 6px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg); user-select: none;
}
.dither-fine input[type=range] { width: 60px; }
.dither-fine .dither-val { color: var(--text); min-width: 15px; text-align: right; }
.dither-fine.disabled { opacity: 0.4; pointer-events: none; }

/* ── 抽出したパレット ── */
.palette-block {
  width: 100%; display: flex; flex-direction: column; gap: 5px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--panel); padding: 8px;
}
.palette-head { display: flex; align-items: baseline; justify-content: space-between; }
.palette-title { font-family: var(--font-heading); font-size: 8px; line-height: 8px; letter-spacing: 2px; color: var(--accent); }
.palette-count { font-size: 12px; line-height: 16px; letter-spacing: 1px; color: var(--sub); }

.palette-strip {
  display: flex; flex-wrap: wrap; gap: 4px;
  padding: 6px; background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius);
}

.swatch {
  width: 76px; border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; cursor: pointer; background: var(--bg);
  transition: transform 0.1s, border-color 0.1s;
}
.swatch:hover { transform: translateY(-2px); border-color: var(--accent); }
.swatch-chip { height: 44px; display: block; }
.swatch-meta {
  display: flex; flex-direction: column; gap: 1px;
  padding: 3px 4px; border-top: 1px solid var(--border);
}
.swatch-hex { font-size: 12px; line-height: 16px; letter-spacing: 0; color: var(--text); }
.swatch-share { font-size: 12px; line-height: 16px; letter-spacing: 0; color: var(--sub); }

/* HEX ラベルを消したときは色チップだけの細い並びにする */
.palette-strip.nolabel .swatch { width: 44px; }
.palette-strip.nolabel .swatch-meta { display: none; }

.pal-hint { font-size: 12px; line-height: 16px; color: var(--sub); letter-spacing: 1px; }
