:root{ --base-bg:#464646 }

body{
  margin:0;
  background:var(--base-bg);
  color:#eee;
  font-family:sans-serif;
  user-select:none;
}

/* タイトルバー */
#titleBar{
  background:#000;
  color:#fff;
  padding:24px 0 24px;
  border-bottom:1px solid #333;
}
.titleContent{
  display:flex;
  justify-content:flex-start;
  align-items:center;
  padding:0 0 0 6px;
  gap:16px;
  max-width:1604px;
  margin:0 auto;
  width:100%;
  box-sizing:border-box;
}

.leftSection{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:2px;
  margin-left:0;
}
.titleGroup{
  display:flex;
  align-items:baseline;
  gap:8px;
}

#titleBar h1{
  margin:0;
  font-size:32px;
  font-weight:400;
  font-family:'Orbitron', monospace;
  letter-spacing:8px;
  flex-shrink:0;
  white-space:nowrap;
}

.version{
  font-size:12px;
  color:#999;
  font-family:monospace;
  font-weight:400;
  letter-spacing:1px;
  flex-shrink:0;
}

.controlsContainer{
  display:flex;
  align-items:center;
  gap:40px;
  flex-shrink:0;
}

.creator{
  color:#7bb3f0;
  text-decoration:none;
  font-size:12px;
  font-family:sans-serif;
  transition:color 0.3s;
  flex-shrink:0;
  margin:0;
}
.creator:hover{
  color:#9ac7f4;
  text-decoration:underline;
}

/* ファイルグループ（黒帯内） */
#fileGroup{display:flex;flex-direction:column;gap:8px}
.loaderRow{display:flex;align-items:center;gap:8px;min-width:320px}
.loaderRow label{font-size:13px;width:55px;text-align:right;color:#fff}
/* ファイル選択コンテナ */
.fileInputContainer {
  position: relative;
  width: 200px;
  display: flex;
  align-items: center;
}

.loaderRow input[type=file] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  z-index: 2;
}

.fileInputText {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  background: #333;
  color: #ccc;
  border: 1px solid #555;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.ctrlWrap{display:flex;align-items:center;gap:6px;width:200px}
.ctrlWrap span{font-size:13px;width:40px;text-align:right;white-space:nowrap;color:#fff}
.ctrlWrap input[type=range]{width:110px}

/* クリアボタン */
.clearBtn{
  width:24px;height:24px;margin-left:4px;padding:0;border:0;border-radius:4px;
  background:#666;color:#fff;font-weight:bold;cursor:pointer;line-height:24px;font-size:12px
}
.clearBtn:hover{background:#888}
.clearBtn:disabled{opacity:.4;cursor:default}

/* 再生／操作ボタン共通 */
.iconBtn{
  width:52px;height:52px;border:0;border-radius:6px;
  background:#ffa62a;color:#fff;cursor:pointer;
  display:flex;align-items:center;justify-content:center;transition:background .15s
}
/* 巻き戻し & 早送り → 黄緑 (#a1dc4a) */
#rewindBtn.iconBtn,
#ffwdBtn.iconBtn{
  background:#a1dc4a;
}
.iconBtn:hover{background:#e69524}
#rewindBtn.iconBtn:hover,
#ffwdBtn.iconBtn:hover{
  background:#8ec73d;   /* #a1dc4a を少し暗く */
}
.iconBtn:disabled{opacity:.4;cursor:default}
.iconBtn svg{fill:currentColor}
#btnGroup{display:flex;align-items:center;gap:10px}

/* 設定保存/読み込みボタン（黒帯内） */
#settingsGroup{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.settingsRow{
  display:flex;
  align-items:center;
  gap:8px;
}

#settingsGroup2{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-left:40px;
  padding:0;
  justify-content:center;
  align-items:flex-start;
  background:transparent;
}


.presetInput{
  width:200px;
  height:32px;
  padding:0 8px;
  border:1px solid #555;
  border-radius:4px;
  background:#333;
  color:#eee;
  font-size:12px;
  box-sizing:border-box;
}

.presetInput::placeholder{
  color:#888;
}

.presetSelect{
  width:200px;
  height:32px;
  padding:0 8px;
  border:1px solid #555;
  border-radius:4px;
  background:#333;
  color:#eee;
  font-size:12px;
  box-sizing:border-box;
}

.deleteBtn{
  background:#dc3545 !important;
}

/* プリセット設定の削除ボタンのみ非表示 */
#deleteBtn, #deleteBtn2 {
  display: none;
}

.deleteBtn:hover{
  background:#c82333 !important;
}

.deleteBtn.compact{
  margin-top:-1.5px;
}

.overwriteBtn{
  background:#28a745 !important;
}

.overwriteBtn:hover{
  background:#218838 !important;
}

.overwriteBtn.compact{
  margin-top:-1.5px;
}

.restoreBtn{
  background:#ffa62a !important;
}

.restoreBtn:hover{
  background:#e69524 !important;
}

.restoreBtn.compact{
  margin-top:-1.5px;
}

/* 下部パネル設定のボタン調整 */
#overwriteBtn2.compact{
  margin-top:-1px;
}

#restoreDeleteContainer2 .deleteBtn.compact{
  margin-top:-1px;
}

/* メインコンテンツエリア */
#mainContent{
  display:flex;
  justify-content:center;
  align-items:flex-start;
  gap:20px;
  padding:24px 0 0 0;
  margin:0 auto;
  max-width:1604px;
  width:100%;
  box-sizing:border-box;
}

/* キャンバスエリア */
#canvasArea{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0;
  order:2;
}

/* キャンバス */
#canvas{
  border:1px solid #555;
  background:rgb(127,127,127);
  width:1280px;height:720px;
  order:1;
}

/* 左側パネル（旧右側パネル） */
#rightPanel{
  display:flex;
  flex-direction:column;
  gap:0px;
  width:auto;
  padding:0;
  margin-top:0;
  order:1;
  background:transparent;
  border-radius:8px;
  position:relative;
}

#rightPanel .groupTitle{
  position:absolute;
  top:-12px;
  left:16px;
  background:transparent;
  padding:4px 12px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  margin:0;
}

/* クリエイター情報グループ */
.creatorInfoGroup{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:12px 16px;
  background:#3a3a3a;
  border-radius:8px;
  position:relative;
  margin-top:0;
  margin-bottom:16px;
}

.creatorInfoGroup .groupTitle{
  position:absolute;
  top:-12px;
  left:16px;
  background:transparent;
  padding:4px 12px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  margin:0;
}

/* 曲タイトル情報グループ */
.songTitleInfoGroup{
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:12px 16px;
  background:#3a3a3a;
  border-radius:8px;
  position:relative;
  margin-top:12px;
  margin-bottom:16px;
}

.songTitleInfoGroup .groupTitle{
  position:absolute;
  top:-12px;
  left:16px;
  background:transparent;
  padding:4px 12px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  margin:0;
}

.randomGroup, .centerLineGroup{
  display:flex;
  flex-direction:column;
  gap:16px;
  padding:12px 16px;
  background:#3a3a3a;
  border-radius:8px;
  position:relative;
  margin-top:12px;
  margin-bottom:16px;
}

.randomGroup .groupTitle, .centerLineGroup .groupTitle{
  position:absolute;
  top:-12px;
  left:16px;
  background:transparent;
  padding:4px 12px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  margin:0;
}

.randomGroup .card, .centerLineGroup .card{
  background:#3a3a3a;
}

/* クレジット設定グループ */
.creditSettingsGroup{
  display:flex;
  flex-direction:column;
  gap:10.5px;
  padding:12px 16px;
  background:#3a3a3a;
  border-radius:8px;
  position:relative;
  margin-top:12px;
  margin-bottom:16px;
}

.creditSettingsGroup .groupTitle{
  position:absolute;
  top:-12px;
  left:16px;
  background:transparent;
  padding:4px 12px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  margin:0;
}

/* 表示オプション */
.displayOptions{
  display:flex;
  flex-direction:row;
  gap:8px;
  margin-left:0px;
  justify-content:center;
}

.displayOptions .inline{
  font-size:12px;
  text-align:left;
  margin-bottom:2px !important;
}

.displayOptions .inline span{
  text-align:left;
  margin-left:0px;
}

/* displayOptions内のチェックボックス専用スタイル */
.displayOptions label.inline.checkbox-custom{
  position:relative;
  margin:6px 0 !important;
  display:flex;
  align-items:center;
  grid-template-columns:none !important;
}

.displayOptions label.inline.checkbox-custom input[type=checkbox]{
  position:static !important;
  left:auto !important;
  top:auto !important;
  transform:none !important;
  margin-right:0px;
}

/* キャンバスの順序 */
#canvas{
  order:2;
}

/* 右側パネル */
#leftPanel{
  display:flex;
  flex-direction:column;
  gap:16px;
  width:325px;
  padding-top:0;
  margin-top:0;
  order:3;
}

.rightCard{
  background:#3a3a3a;
  padding:8px 12px;
  border-radius:4px;
}

.rightCard h3{
  margin:0 0 8px;
  font-size:16px;
  text-align:center;
  border-bottom:1px solid #888;
  padding-bottom:4px;
  position:relative;
}

.rightCard label{
  font-size:12px;
  display:block;
  margin:6px 0;
  text-align:right;
}

.rightCard label:has(.rand){
  display:grid;
  grid-template-columns:110px 120px 45px 24px;
  gap:2px;
  align-items:center;
  text-align:right;
}

.rightCard label:has(.rand) span{
  justify-self:end;
}

.rightCard label:has(.rand) input[type=range]{
  width:120px;
}

.rightCard label:has(.rand) .rand{
  justify-self:center;
}

.rightCard label > *:not(span){
  display:block;
  margin-top:4px;
}

.rightCard label.inline{
  display:grid;
  align-items:center;
  grid-template-columns:70px 1fr;
  gap:6px;
  text-align:right;
  max-width:100%;
}

.rightCard label.inline > *:not(span){
  justify-self:stretch;
  margin-top:0;
}

.rightCard label.inline .imageUploadArea{
  justify-self:center;
}

.rightCard label.inline:has(.imageUploadArea){
  margin-top:8px;
}

.rightCard label.inline .colorSwatches{
  justify-self:start;
  display:grid;
}

.rightCard select,
.rightCard input[type=text]{
  width:100%;
  background:#333;
  color:#eee;
  border:1px solid #555;
  border-radius:2px;
  padding:4px;
  max-width:100%;
  box-sizing:border-box;
}

.rightCard label.inline select{
  width:100%;
  max-width:200px;
}

.rightCard input[type=text]{
  width:100%;
  max-width:200px;
}

.rightCard .rangeWrapper{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:4px;
}

.rightCard label.inline .rangeWrapper{
  margin-top:0;
}

.rightCard input[type=range]{
  width:100%;
  max-width:200px;
}

.rightCard label.inline input[type=range]{
  width:100%;
  max-width:220px;
}

.rightCard span{
  font-size:13px;
  color:#ccc;
  min-width:60px;
  text-align:right;
}

.rightCard label.inline span{
  min-width:30px;
}

.rightCard input[type=text]:disabled{
  background:#222;
  color:#666;
}

/* カラースウォッチ */
.colorSwatches{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:6px;
  max-width:140px;
}

.colorSwatch{
  width:20px;
  height:20px;
  border:2px solid #666;
  border-radius:3px;
  cursor:pointer;
  transition:border-color 0.2s;
}

.colorSwatch:hover{
  border-color:#aaa;
}

.colorSwatch.active{
  border-color:#fff;
  box-shadow:0 0 0 1px #333;
}

/* 設定ボタン */
.settingsBtn{
  width:55px;height:31px;border:0;border-radius:4px;
  background:#2d8cf0;color:#fff;cursor:pointer;font-size:12px;
  transition:background .15s;
  margin-top:1px;
}
.settingsBtn:hover{background:#5ba8f5}

.settingsBtn.compact{
  height:20px;
  font-size:11px;
  margin-top:-1.5px;
}

.buttonColumn{
  display:flex;
  flex-direction:column;
  gap:2px;
  height:31px;
  justify-content:flex-start;
  margin-top:-4px;
}


/* 下部パネル（カード類は横一列） */
#bottomPanel{
  display:flex;
  gap:16px;
  justify-content:center;
  margin:16px auto;
  padding:0 20px;
  max-width:1800px;
  width:100%;
  box-sizing:border-box;
}

/* 下部パネル二段目 */
#bottomPanel2{
  display:flex;
  gap:16px;
  justify-content:center;
  margin:16px auto;
  padding:0 20px;
  max-width:1800px;
  width:100%;
  box-sizing:border-box;
}

/* 下部パネル三段目 */
#bottomPanel3{
  display:flex;
  gap:16px;
  justify-content:center;
  margin:16px auto;
  padding:0 20px;
  max-width:1800px;
  width:100%;
  box-sizing:border-box;
}

/* キャンバス下のエリア */
#canvasBottomArea{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  margin:16px 0;
  padding:0;
  width:100%;
  box-sizing:border-box;
  order:2;
  gap:16px;
}

/* 上段設定行（背景設定と設定ボタンを横並び） */
.topSettingsRow{
  display:flex;
  align-items:center;
  gap:16px;
}

/* 左側設定エリア（背景設定とノート設定を縦並び） */
.leftSettingsArea{
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* 背景設定グループ */
.bgGroup{
  display:flex;
  flex-direction:row;
  gap:0;
  padding:12px 16px;
  background:#3a3a3a;
  border-radius:8px;
  position:relative;
  margin-top:12px;
  justify-content:flex-start;
  width:fit-content;
  max-width:980px;
}

.bgGroup .groupTitle{
  position:absolute;
  top:-12px;
  left:16px;
  background:transparent;
  padding:4px 12px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  margin:0;
}
.rowBreak{display:none}

.card{
  background:var(--base-bg);
  padding:8px 12px;
  border-radius:4px;
  width:301px;
  flex-shrink:0;
  margin:0;
}

/* 背景設定グループ */
.bgControls{
  display:flex;
  flex-direction:column;
  gap:8px;
  width:auto;
  margin-right:12px;
  justify-content:center;
  align-items:center;
  padding:0 16px;
}

.bgControls label{
  display:grid;
  grid-template-columns:70px 1fr;
  align-items:center;
  gap:8px;
  font-size:13px;
  text-align:right;
}

.bgControls select{
  width:130px;
  background:#333;
  color:#eee;
  border:1px solid #555;
  border-radius:2px;
  padding:4px;
  box-sizing:border-box;
}

.bgCards{
  display:flex;
  flex-direction:row;
  gap:8px;
}

.bgCards .card{
  width:304px !important;
  min-width:304px !important;
  max-width:304px !important;
  background:#3a3a3a;
  box-sizing:border-box !important;
}

/* 背景色カードを更に具体的に指定 */
div.bgGroup div.bgCards div.card{
  width:304px !important;
  min-width:304px !important;
  max-width:304px !important;
  box-sizing:border-box !important;
}

/* ノートの色カードも304px */
.noteGroup .card:first-child {
  width: 304px !important;
  max-width: 304px !important;
  min-width: 304px !important;
  box-sizing: border-box !important;
}


/* ノート設定グループ */
.noteGroup{
  display:grid;
  grid-template-columns: 304px 1fr;
  gap:0;
  padding:12px 16px;
  background:#3a3a3a;
  border-radius:8px;
  position:relative;
  margin-top:12px;
  margin-bottom:0px;
  width:1280px;
  box-sizing:border-box;
}

/* ノートの色カード（左カラム） */
.noteGroup .card:first-child {
  grid-column: 1;
  grid-row: 1;
}

/* 右カラム（その他の7つのカード） */
.noteGroup .rightCards {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 0;
  margin-left: 8px;
  margin-bottom: 0;
}

/* 右側カードの具体的な配置 */
.noteGroup .rightCards .card:nth-child(1) { /* ノートの配置 */
  grid-column: 1; grid-row: 1;
}
.noteGroup .rightCards .card:nth-child(2) { /* ノートの形状 */
  grid-column: 2; grid-row: 1;
}
.noteGroup .rightCards .card:nth-child(3) { /* ノートの影 */
  grid-column: 3; grid-row: 1;
}
.noteGroup .rightCards .card:nth-child(4) { /* ノートのバウンス */
  grid-column: 1 / 3; grid-row: 2;
  justify-self: center;
}
.noteGroup .rightCards .card:nth-child(5) { /* ノートの奥行き */
  grid-column: 2 / 4; grid-row: 2;
  justify-self: center;
}
.noteGroup .rightCards .card:nth-child(6) { /* ノートのフラッシュ */
  grid-column: 1 / 3; grid-row: 3;
  justify-self: center;
}
.noteGroup .rightCards .card:nth-child(7) { /* フラッシュのブラー */
  grid-column: 2 / 4; grid-row: 3;
  justify-self: center;
}

/* 一般的なカードスタイル */
.noteGroup .card {
  width: auto;
  max-width: 280px;
  padding: 8px 12px;
}

/* ノートの色カードは304pxに */
.noteGroup .card:first-child {
  width: 304px !important;
  max-width: 304px !important;
  min-width: 304px !important;
  box-sizing: border-box !important;
}

/* 特定のカードのh3要素の幅を280に設定 */
.noteGroup .card h3,
.bgGroup .card h3 {
  width: 280px;
}

/* 特定のカードのラベル要素の幅を280に設定 */
.noteGroup .card label,
.bgGroup .card label {
  width: 280px;
}

/* 特定のカードの幅を304に設定 */
.noteGroup .card:first-child,
.bgGroup .card {
  width: 304px !important;
  max-width: 304px !important;
}

.noteGroup .card{
  background:#3a3a3a;
}

.noteGroup .groupTitle{
  position:absolute;
  top:-12px;
  left:16px;
  background:transparent;
  padding:4px 12px;
  font-size:16px;
  font-weight:700;
  color:#fff;
  margin:0;
}
.card h3{margin:0 0 8px;font-size:16px;text-align:center;border-bottom:1px solid #888;padding-bottom:4px;position:relative}

.randomLabel{position:absolute;right:0;bottom:0;font-size:12px;color:#aaa;font-weight:normal}
.card label{font-size:13px;text-align:right;display:grid;gap:2px;margin:4px 0;grid-template-columns:90px 120px 45px 24px}
.card label span{justify-self:end;color:#ccc}
.card input[type=range]{width:120px}
.card .rand{justify-self:center}
.card label.inline{grid-template-columns:90px 1fr 45px}
.card label.inline input[type=checkbox]:not(.rand){justify-self:start}
/* チェックボックスを絶対配置で左寄せ */
.rightCard label.inline.checkbox-custom{
  position:relative;
  grid-template-columns:90px auto;
  margin-bottom:12px;
}
.rightCard label.inline.checkbox-custom input[type=checkbox]#creditDisplay{
  position:absolute !important;
  left:82px !important;
  top:40% !important;
  transform:translateY(-50%) !important;
  margin:0 !important;
}
.card label.inline .rangeWrapper{display:flex;align-items:center;gap:8px}
.card label.inline input[type=range]{width:120px}




/* スライダー色 */
input[type=range]{accent-color:#1a73e8 !important}

/* チェックボックス色（Edge対応） */
input[type=checkbox]{accent-color:#1a73e8 !important}
#bgR{accent-color:red   !important}
#bgG{accent-color:green !important}
#bgB{accent-color:blue  !important}
#bgR2{accent-color:red   !important}
#bgG2{accent-color:green !important}
#bgB2{accent-color:blue  !important}
#flashR{accent-color:red   !important}
#flashG{accent-color:green !important}
#flashB{accent-color:blue  !important}
#glowR{accent-color:red   !important}
#glowG{accent-color:green !important}
#glowB{accent-color:blue  !important}

/* 色合いスライダーのカスタムスタイル */
#hueBase {
  appearance: none;
  -webkit-appearance: none;
  height: 20px;
  border-radius: 10px;
  background: linear-gradient(to right, 
    hsl(0, 70%, 50%), 
    hsl(60, 70%, 50%), 
    hsl(120, 70%, 50%), 
    hsl(180, 70%, 50%), 
    hsl(240, 70%, 50%), 
    hsl(300, 70%, 50%), 
    hsl(360, 70%, 50%)
  );
  outline: none;
  cursor: pointer;
  border: none;
}

#hueBase::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#hueBase::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* 彩度スライダーのカスタムスタイル */
#saturation {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    hsl(180, 0%, 50%), 
    hsl(180, 100%, 50%)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#saturation::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#saturation::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* 明度スライダーのカスタムスタイル */
#lightness {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    hsl(180, 70%, 0%), 
    hsl(180, 70%, 50%), 
    hsl(180, 70%, 100%)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#lightness::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#lightness::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* フラッシュR（赤）スライダーのカスタムスタイル */
#flashR {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(0, 255, 255), 
    rgb(255, 255, 255)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#flashR::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#flashR::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* フラッシュG（緑）スライダーのカスタムスタイル */
#flashG {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(255, 0, 255), 
    rgb(255, 255, 255)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#flashG::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#flashG::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* フラッシュB（青）スライダーのカスタムスタイル */
#flashB {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(255, 255, 0), 
    rgb(255, 255, 255)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#flashB::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#flashB::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* ブラーR（赤）スライダーのカスタムスタイル */
#glowR {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(0, 255, 255), 
    rgb(255, 255, 255)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#glowR::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#glowR::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* ブラーG（緑）スライダーのカスタムスタイル */
#glowG {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(255, 0, 255), 
    rgb(255, 255, 255)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#glowG::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#glowG::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* ブラーB（青）スライダーのカスタムスタイル */
#glowB {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(255, 255, 0), 
    rgb(255, 255, 255)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#glowB::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#glowB::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* 背景色1 R（赤）スライダーのカスタムスタイル */
#bgR {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(0, 127, 127), 
    rgb(255, 127, 127)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#bgR::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#bgR::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* 背景色1 G（緑）スライダーのカスタムスタイル */
#bgG {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(127, 0, 127), 
    rgb(127, 255, 127)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#bgG::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#bgG::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* 背景色1 B（青）スライダーのカスタムスタイル */
#bgB {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(127, 127, 0), 
    rgb(127, 127, 255)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#bgB::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#bgB::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* 背景色2 R（赤）スライダーのカスタムスタイル */
#bgR2 {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(0, 64, 64), 
    rgb(255, 64, 64)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#bgR2::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#bgR2::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* 背景色2 G（緑）スライダーのカスタムスタイル */
#bgG2 {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(64, 0, 64), 
    rgb(64, 255, 64)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#bgG2::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#bgG2::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* 背景色2 B（青）スライダーのカスタムスタイル */
#bgB2 {
  appearance: none;
  -webkit-appearance: none;
  height: 16px;
  border-radius: 8px;
  background: linear-gradient(to right, 
    rgb(64, 64, 0), 
    rgb(64, 64, 255)
  );
  outline: none;
  cursor: pointer;
  border: none;
  position: relative;
}

#bgB2::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

#bgB2::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 3px solid #fff;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(0,0,0,0.2);
}

/* カラープレビュー */
.colorPreview {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  margin-right: 8px;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

/* 範囲スライダー */
.range-slider {
  position: relative;
  width: 120px;
  height: 20px;
  background: transparent;
  margin: 0;
  padding: 0;
}

.range-slider-track {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: #555;
  border-radius: 2px;
  width: 100%;
  left: 0;
}

.range-slider-range {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: #1a73e8;
  border-radius: 2px;
  z-index: 1;
}

.range-slider-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  z-index: 2;
}

.range-slider-thumb.min-thumb {
  background: #ff6b6b;
}

.range-slider-thumb.max-thumb {
  background: #4ecdc4;
}

/* 色相環のみのコントロール */
.hue-wheel-only {
  grid-template-columns: 90px 120px 45px 24px !important;
  align-items: center !important;
}

.hue-wheel-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 120px;
}

#testHueWheel {
  cursor: pointer;
  border-radius: 50%;
}

/* 画像アップロードエリア */
.imageUploadArea {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.imageFrame {
  width: 100px;
  height: 100px;
  border: 2px dashed #666;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #333;
  transition: border-color 0.3s, background-color 0.3s;
  position: relative;
  overflow: hidden;
}

.imageFrame:hover {
  border-color: #888;
  background: #444;
}

.uploadText {
  color: #aaa;
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
  padding: 8px;
}

.imageFrame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.clearImageBtn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  line-height: 1;
  z-index: 10;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.clearImageBtn:hover {
  background: rgba(0, 0, 0, 0.9);
}

/* ノート設定の縦に並んだカード同士の隙間 */
.noteGroup .card h3 + h3 {
  margin-top: 16px;
}

.noteGroup .card h3:not(:first-child) {
  margin-top: 16px;
  padding-top: 16px;
}

/* ノート設定グループの下部マージンを確実に削除 */
div.noteGroup {
  margin-bottom: 0 !important;
}

/* rightCardsの下部マージンを確実に削除 */
div.noteGroup div.rightCards {
  margin-bottom: 0 !important;
}
