
/*
  文字色：darkgreen
  背景色（全体）: lightgreen
  背景色（個別）: mintcream
  背景色（個別）: mediumseagreen
 */

html, body {
  font-size: 16pt;
  font-family: "Baloo 2", "M PLUS Rounded 1c", "Segoe UI", sans-serif;
  zoom: 1;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  min-width: 20px;
  padding: 4px 10px;
  margin: 0 2px;
  border: 1px solid #222;
  border-radius: 3px;
  background-color: #d7d7d7;
  color: #222;
  font-size: 0.6em; /* 親サイズの70% */
  line-height: 1.2;
  cursor: pointer;
  /* ボタンに立体感を付ける影 */
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

button:active {
  background-color: #e7e7e7;
  /* 押下時は影を弱めて沈み込みを表現 */
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  transform: translateY(1px);
}

button:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

select {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  min-width: 28px;
  padding: 4px 10px;
  margin: 0 2px;
  border: 1px solid #666;
  border-radius: 3px;
  background-color: #f7f7f7;
  color: #111;
  font-size: 0.9em;
  line-height: 1.2;
}

/* iOSでもselect表示を中央寄せに見せるための共通パーツ */
.rhythmSelectWrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 0 4px;
  border: 1px solid #222;
  border-radius: 3px;
  background-color: #f7f7f7;
  color: #222;
  /* 画面内操作ボタンの見た目 */
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

/* iOS でも中央寄せに見せるための表示用ラベル */
.rhythmSelectLabel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  line-height: 1;
  color: inherit;
}

/* シンボル表示は少し小さめにする */
.rhythmSelectLabelSymbol {
  font-size: 0.7em;
}

/* コード表示も小さめにする */
.rhythmSelectLabelChord {
  font-size: 0.7em;
}

/* ネイティブ select は透明で上に載せて操作だけ残す */
.rhythmSelectInput {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
  background: transparent;
}

.rhythmSelectWrap:focus-within {
  outline: 2px solid #333;
  outline-offset: 2px;
}

body {
  margin: 0;
  background-color: lightgreen;
  text-align: center;
}

main {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, 800px);
  margin: 0 auto;
}

/* アプリ名ヘッダー */
header {
  margin-top: 3px;
  margin-bottom: 3px;
  padding: 3px;
  width: calc(100% - 6px);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  position: relative;

  font-size: 18pt;
  font-weight: 900;
  color: darkgreen;

  border: 0px solid green;
  border-radius: 3px;
  background-color: mintcream;
}

/* タイトル全体（2行構成） */
#title.titleStack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;             /* タイトル - サブタイトル間の隙間  */
  line-height: 1.0;
}

/* タイトル主文 */
.titleMain {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* タイトル副文 */
.titleSubtitle {
  font-size: 0.45em;
  font-weight: 50;
  letter-spacing: 0.02em;
  color: darkslategray
}

/* タイトル内のBアイコン */
.titleIcon {
  height: 0.8em; /* 文字サイズに合わせる */
  width: 0.8em; /* 正方形に揃える */
  vertical-align: middle; /* ベースライン調整 */
  transform: translateY(0.02em); /* アイコンと文字の見た目揃え */
}

/* 閉じるボタン */
#closePage {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 66px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.75em;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  background-color:mintcream;
  color: mediumseagreen;
  font-weight:bold;

  border: 3px solid mediumseagreen;
  border-radius: 999px;
}

/* 規約画面など左配置にしたい戻るボタン */
#closePage.headerBack {
  left: 6px;
  right: auto;
}

/* 設定画面のOKボタン */
#saveConfigBeat,
#saveConfigScore,
#saveCodeDiagram,
#saveShowScore,
#backShowScore,
#backEditMeasure {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-width: 66px;
  min-height: 28px;
  padding: 0 8px;
  font-size: 0.75em;
  line-height: 1.2;

  background-color: mintcream;
  color: mediumseagreen;
  font-weight: bold;

  border: 3px solid mediumseagreen;
  border-radius: 999px;
}

/* OKボタン */
.okConfig {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  line-height: 1.1;
}

.okConfig .navChevron {
  font-size: 1.1em;
  line-height: 1;
}

footer {
  margin-bottom:3px;
  padding:3px;
  width: calc(100% - 6px);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;

  font-size:9pt;

  border:0px solid green;
  border-radius: 3px;
  background-color: mintcream;
}

#beatPreference {
  margin-bottom:3px;
  padding:3px;
  width:calc(100%-6px);

  border:0px solid green;
  border-radius: 3px;
  background-color: mintcream;
}

/* 設定項目の区分タイトル */
.preferenceTitle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color:mediumseagreen;
  color:white;
  font-size:12pt;
  font-weight:normal;
  line-height: 1.2;
  margin-bottom:3px;
  border:0px solid black;
  border-radius: 3px;
}

.preferenceTitle.isDisabled {
  opacity: 0.5;
  pointer-events: none;
}

.preferenceExec {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 3px;
  background-color: mintcream;
  padding: 4px;
  border-radius: 3px;
}

.preferenceExec.isRow4 {
  grid-template-columns: 1fr 2fr 2fr 1fr;
}

.scoreToggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

/* コンパクトなトグルをconfigBeatのスライダー風に合わせる。 */
.scoreToggle input {
  -webkit-appearance: none;
  appearance: none;
  width: 55px;
  height: 20px;
  background: #d6efe0;
  border-radius: 999px;
  border: 1px solid #1e7a4f;
  position: relative;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.scoreToggle input::after {
  content: "OFF";
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  font-size: 0.7em;
  font-weight: 700;
  color: #1e7a4f;
  letter-spacing: 0.2px;
}

.scoreToggle input::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 4px;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: #1e7a4f;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.scoreToggle input:checked {
  background: #bfe8d5;
}

.scoreToggle input:checked::after {
  content: "ON";
  left: 6px;
  right: auto;
  color: #0f6a3d;
}

.scoreToggle input:checked::before {
  transform: translate(33px, -50%);
}

.scoreToggle input:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

.preferenceSummery.isDisabled {
  opacity: 0.5;
  pointer-events: none;
}

#mergeToggle::after {
  content: "OFF";
}

#mergeToggle:checked::after {
  content: "Merge";
}

.preferenceExec.isDisabled {
  opacity: 0.5;
  pointer-events: none;
}

.preferenceTitle .material-symbols-rounded {
  line-height: 1;
}

.preference {
  margin-bottom:3px;
  padding:3px;
  width:calc(100%-6px);

  border:0px solid green;
  border-radius: 3px;
  background-color: mintcream;

  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 10px;
  row-gap: 6px;
  align-items: center;
  text-align: left;
}

.preferenceSummery {
  margin-bottom:3px;
  padding:3px;
  width:calc(100%-6px);

  border:0px solid #cfcfcf;
  border-radius: 3px;
  background-color: mintcream;

  display: flex;
  align-items: center;
  gap: 10px;

  font-size: 0.65em;
  font-weight: normal;
}

.preferenceSummery .preferenceNow {
  flex: 1;
}

.preferenceSummery .preferenceValue {
  width: auto;
}

#preferenceRythm .preferenceSummery,
#preferenceRythm .preferenceExec {
  margin-bottom: 0;
}

#preferenceRythm {
  margin-bottom: 3px;
}

.mergeToggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
}

.mergeToggleLabel {
  font-size: 0.7em;
  font-weight: 700;
  color: #1e7a4f;
}
.preferenceNow {
  height:100%;
  border:1px solid darkgreen;
  border-radius: 3px;
}

.preferenceName {
  width: 100%;
  height: 100%;
  padding-right:5px;
  background-color:white;

  justify-self: end;

  border: 0px solid black;
  border-radius: 3px;
  text-align: right;
}

.preferenceValue {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 0px solid black;
  width: 100%;
  height: 100%;
  background-color:white;

  border-radius: 3px;
}


#tempo {
  display: inline-block;
  width: 40px;
  padding: 2px 4px;
  border: 1px solid #666;
  border-radius: 3px;
  background-color: white;
  text-align: center;
}

.bpmButton {
  width: 44px;
  text-align: center;
  padding:0px;
  padding-top:5px;
  padding-bottom:5px;
  margin:0px;
}

.bpmButtonGroup {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

#clicking {
  margin-bottom:3px;
  padding:3px;
  width:calc(100%-6px);

  border:0px solid green;
  border-radius: 3px;
  background-color: mintcream;
}

/* 規約画面のmainをヘッダー/フッターと同じ幅に揃える */
main.pageFrame {
  width: calc(100% - 6px); /* ヘッダー/フッターと同じ幅 */
  max-width: 800px; /* 最大幅 */
  margin-left: auto; /* 中央揃え */
  margin-right: auto; /* 中央揃え */
  margin-bottom: 3px;
  padding: 3px;
  border-radius: 3px;
  background-color: mintcream;
}

#playClicking {
  margin-bottom:3px;
  padding:3px;
  width:calc(100%-6px);

  border:0px solid green;
  border-radius: 3px;
  background-color: mintcream;
}

#showClick {
  margin-bottom: 3px;
  display: flex;
  gap: 2px;
  justify-content: center;
  align-items: center;
  border-radius: 3px;
  background-color: mintcream;
}

#clicking button {
  min-width: 90px;
}

#setClick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#setClick .material-symbols-rounded {
  line-height: 1;
}

.makeScoreButton {
  background-color: mintcream;
  color: #222;
  font-weight: bold;
  border: 1px solid #222;
  border-radius: 999px;
  min-height: 28px;
  padding: 4px 12px;
  font-size: 1.0em;
  width: 100%;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* ボタンに立体感を付ける影 */
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.makeScoreButton.navButton {
  background-color: mintcream;
  color: mediumseagreen;
  border: 3px solid mediumseagreen;
}

.makeScoreButton.makeScoreButtonCompact {
  width: auto;
  min-width: 90px;
  padding: 4px 10px;
}

.makeScoreButton:active {
  background-color: #d6efe0;
  /* 押下時は影を弱めて沈み込みを表現 */
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  transform: translateY(1px);
}

.chipButton {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 6px;
  min-height: 28px;
  min-width: 42px;
  border-radius: 3px;
  border: 1px solid #222;
  background-color: #f7f7f7;
  font-size: 0.85em;
  color: #222;
  user-select: none;
  cursor: pointer;
  /* ボタンに立体感を付ける影 */
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.chipButton .material-symbols-rounded {
  font-size: 1.5em;
  line-height: 1;
}

.chipButton .lang {
  font-size: 0.6em;
  line-height: 1;
  align-self: flex-end;
  padding-bottom: 1px;
}

.chipButton.isActive {
  background-color: #1e7a4f;
  border-color: #1e7a4f;
  color: #ffffff;
}

.chipButton:active {
  /* 押下時は影を弱めて沈み込みを表現 */
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  transform: translateY(1px);
}

.chipButton:focus-visible {
  outline: 2px solid #333;
  outline-offset: 2px;
}

#saveButtonContainer {
  margin-top:3px;
  margin-bottom:3px;
  padding:3px;
  width:calc(100%-6px);

  border:0px solid green;
  border-radius: 3px;

  display: flex;
  justify-content: center;
}








