.wrapper .block #inputBlock .table {
    width: 100%;
    display: table;
	word-break: normal;
}

.wrapper .block #inputBlock .thead {
    display: table-header-group;
}

.wrapper .block #inputBlock .thead .tr {
    display: table-row;
}

.wrapper .block #inputBlock .thead .th {
    display: table-cell;
    color: #fff;
    background-color: #333;
    font-size: 125%;
    font-weight: 700;
    line-height: 1.3;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 11px;
    padding-bottom: 11px;
    border-left: 2px solid #fff;
    border-bottom: 3px solid #fff;
}

.wrapper .block #inputBlock .tbody .td:first-child {
    border-left: none;
    width:25%;
}
.wrapper .block #inputBlock .tbody .td:nth-child(3) {
    border-left: none;
    width:35%;
}

.wrapper .block #inputBlock .disc{
	font-size:12px;
	line-height:1;
}
@media screen and (max-width: 480px) {
.wrapper .block #inputBlock .tbody .td:nth-child(3) {
    border-left: none;
    width:30%;
}
.wrapper .block #inputBlock .disc{
	font-size:11px;
	line-height:1;
}
}
.wrapper .block #inputBlock .tbody {
    display: table-row-group;
}

.wrapper .block #inputBlock .tbody .tr {
    display: table-row;
}

.wrapper .block #inputBlock .tbody .td {
    display: table-cell;
    font-weight: 700;
    line-height: 1.3;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 16px;
    padding-bottom: 16px;
    border-bottom: 3px solid #fff;
    vertical-align: middle;
}

.wrapper .block #inputBlock .tbody .e {
    background-color: #eee;
    font-size: 125%;
    text-align: center;
}

.wrapper .block #inputBlock .tbody .v {
    background-color: #f9f9f9;
    font-size: 117%;
}



.form_txt_s{
	width:50px!important;
}
.form_txt{
	width:120px;
}
.form_txt_l{
	width:140px!important;
}
.form_txt_xl{
	width:220px!important;
}

.size_s {
    min-width: 86px!important;
}








#outputBlock {
    background: #eff3f7;
}



.wrapper .block .table_panel {
    width: 100%;
    display: table;
	word-break: normal;
}

.wrapper .block .table_panel .tbody .td:first-child {
    border-left: none;
}

.wrapper .block .table_panel .tbody {
    display: table-row-group;
}

.wrapper .block .table_panel .tbody .tr {
    display: table-row;
}

.wrapper .block .table_panel .tbody .td {
    display: table-cell;
    width:33%;
    font-weight: 700;
    line-height: 1.3;
    padding-left: 6px;
    padding-right: 6px;
    padding-top: 8px;
    padding-bottom: 8px;
    vertical-align: middle;
    text-align: center;
    font-size: 117%;
    border-left: 2px solid #fff;
    border-bottom: 3px solid #fff;
    background-color: #eee;
}

@media screen and (max-width: 480px) {
	.wrapper .block .table_panel .tbody .tr-responsive {
		display: grid!important;
	}
	.wrapper .block .table_panel .tbody .td {
		width:100%;
	}
}

.label1 {
	font-weight: bold;
	font-size: 117%;
}
.label2 {
	font-size: 80%;
}
.value {
	font-weight: bold;
	color: #23ac38;
	font-size: 200%;
}
span.unit {
	font-size: 50%;
}
#inputBlock .value {
	font-weight: bold;
	color: #23ac38;
	font-size: 200%!Important;
	padding-left:16px!Important;
}
span.unit {
	font-size: 50%;
}


.input-active {
    border-left: 2px solid #4CAF50; /* 例: 緑色の太いボーダー */
}

.wrapper .block #inputBlock .tbody .v.input-active {
    background-color: #e8f5e9; /* 例: 薄い緑色の背景 */
}

i.contentsI {
    font-size: 120%;
    padding: 8px;
    border: 1px solid #dee2e6;
    background-color: #fff;
    border-radius: 6px;
}

#outputBlock .tr .value span span.date {
font-size:16px;
}

#outputBlock .tr .value span ul li {
font-size:16px;
    line-height: 1.2;
    padding: 4px 12px;
    color:#333!important;
    font-weight:normal;
}
#outputBlock .tr .value span ul li strong{
    font-weight:bold;
}

.log-formula {
}

.ln, .log10, .log {
    font-weight: bold; /* 太字 */
}

.sub {
    font-size: 0.6em; /* 下付き文字のサイズ調整 */
    vertical-align: super; /* 上に寄せる */
}
.sub_low {
    font-size: 0.6em; /* 下付き文字のサイズ調整 */
}
        .formula {
            display: flex;
            justify-content: center;
            align-items: center;
            margin: 20px 0;
            font-size: 24px;
        }
        .fraction {
            display: inline-block;
            vertical-align: middle;
            text-align: center;
        }
        .fraction > span {
            display: block;
            padding: 0;
        }
        .fraction .denominator {
            border-top: 1px solid #000;
        }
        .factorial {
            font-size: 18px;
          
        }
        
#inputBlock .check_wrap {
    width: 100%;
}

.wrapper .block #outputBlock .table {
    width: 100%;
    display: table;
}

.wrapper .block #outputBlock .tbody .td:first-child {
    border-left: none;
}

.wrapper .block #outputBlock .tbody {
    display: table-row-group;
}

.wrapper .block #outputBlock .tbody .tr {
    display: table-row;
}

.wrapper .block #outputBlock .tbody .td {
    display: table-cell;
    width:25%;
    font-weight: 700;
    line-height: 1.3;
    padding-left: 4px;
    padding-right: 4px;
    vertical-align: middle;
    text-align: center;
    font-size: 117%;
    border-left: 2px solid #fff;
    border-bottom: 3px solid #fff;
    background-color: #eee;
	height:80px;
}
.wrapper .block #outputBlock .tbody .v {
    background-color: #f9f9f9;
}




@media screen and (max-width: 480px) {
	.wrapper .block #outputBlock .tbody .tr-responsive {
		display: grid!important;
		grid-template-columns: 50% auto!important;
	}
	.wrapper .block #outputBlock .tbody .td {
		width:100%;
		padding-top: 20px;
	}
}

#main button {
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
}

#main button.active {
    background-color: #4CAF50;
    color: white;
}

.table_panel {
    margin-top: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 20px;
}


/* プルダウンの基本スタイル */
.wrapper .block #inputBlock select {
    width: 100%;
    font-size: 117%;
    font-weight: 700;
    line-height: 1.5;
    padding: 0 12px;
    border: 2px solid #333;
    background-color: #f9f9f9;
    color: #333;
    border-radius: 4px;
    box-shadow: none;
    outline: none;
    appearance: none; /* デフォルトのプルダウン矢印を非表示にする */
}

/* プルダウンのホバー効果 */
.wrapper .block #inputBlock select:hover {
    border-color: #23ac38;
    background-color: #e8f5e9;
}

/* プルダウン選択時の効果 */
.wrapper .block #inputBlock select:focus {
    border-color: #4CAF50;
    background-color: #e8f5e9;
    box-shadow: 0 0 4px rgba(76, 175, 80, 0.5);
}

/* プルダウン用の矢印の追加 */
.wrapper .block #inputBlock select::after {
    content: "▼";
    font-size: 0.8em;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* 矢印部分のクリックを無効化 */
}

.tab-table {
    width: 100%;
    display: contents;
}

/* タブボタンのスタイル */
.tab-button {
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 5px 5px 0 0;
    margin-right: 5px;
    transition: all 0.3s ease;
}

.tab-button.active {
    background-color: #4CAF50; /* アクティブタブの背景色 */
    color: #fff;
    border-color: #4CAF50;
}

.tab-button:hover {
    background-color: #e0e0e0;
}

/* タブコンテナ全体のスタイル */
.tab-container {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

/* タブコンテンツエリアのスタイル */
.tab-content {
    display: none;
    padding: 20px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    background-color: #fff;
}

.tab-content.active {
    display: block;
}

/* 入力フィールドスタイル */
.form_txt {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
    margin: 5px 0;
}

.unit-label {
    font-weight: bold;
    margin-left: 5px;
}

/* ドロップダウンのスタイル */
select#payoutFeeType {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #4CAF50;
    background-color: #e8f5e9;
    color: #4CAF50;
    border-radius: 5px;
    cursor: pointer;
    appearance: none;
}

select#payoutFeeType:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}
.new-explanation .table-left td {
    text-align: left;
  }
  
@media screen and (max-width: 600px) {
.wrapper .block #outputBlock .tbody .tr {
    display: flex;
    flex-direction: column;
}
}

.radio-group {
    display: flex;
    gap: 20px;
}
/* ラジオボタンとそのラベル全体を囲む */
.radio-group {
  display: flex;
  gap: 20px; /* ボタン間の余白 */
  align-items: center;
  flex-wrap: wrap;
  margin-top: 5px;
}

/* 個別のラジオボタンとラベル */
.radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1rem;
  cursor: pointer;
}
/* ====== 全体スコープ ====== */
#inputBlock, #outputBlock { box-sizing: border-box; }

/* —— 出題条件フォーム（2カラム整列） —— */
#inputBlock #ctrlWrap { padding: 8px 0; }
#inputBlock .hg-form {
  display: grid; gap: 12px;
  border: 1px solid #e6e9ef; border-radius: 12px; padding: 12px; background: #fff;
}
#inputBlock .hg-form .row {
  display: grid; gap: 10px;
  grid-template-columns: 140px 1fr;
  align-items: center;
}
#inputBlock .hg-form .label { font-weight: 600; color:#333; text-align: right; }
#inputBlock .hg-form .field { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }

/* 入力パーツ */
#inputBlock .form_txt, #inputBlock .form_sel {
  height: 36px; padding: 6px 10px; font-size: 14px; line-height: 1.45;
  border: 1px solid #cfd4dc; border-radius: 8px; background: #fff;
}
#inputBlock .form_txt_s { width: 76px; }
#inputBlock .form_txt_m { width: 240px; max-width: 100%; }
#inputBlock .form_sel { min-width: 84px; }

/* チップ型チェック：選択状態で色を変更（.active をJSで付与） */
#inputBlock .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid #cfd4dc; border-radius: 999px;
  background:#fff; cursor: pointer; user-select: none; font-size: 13px;
  transition: background .15s, border-color .15s, color .15s;
}
#inputBlock .chip input[type="checkbox"]{ width:16px; height:16px; }
#inputBlock .chip.active {
  background: #eef6ff; border-color: #84b9ff; color:#0b5fd7;
}

/* ボタン列 */
#inputBlock .btnbar { display:flex; flex-wrap: wrap; gap: 8px; }
#inputBlock .btn {
  padding: 8px 12px; border: 1px solid #cfd4dc; border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 14px;
}
#inputBlock .btn:hover { background: #f6f8fa; }
#inputBlock .notice { color:#666; font-size:12px; margin-top:6px; }

/* —— KPI / タイマー —— */
#outputBlock .kpi {
  display: grid; gap: 10px; margin-top: 6px;
  grid-template-columns: repeat(auto-fit, minmax(140px,1fr));
}
#outputBlock .kpi .card { border: 1px solid #e6e9ef; border-radius: 10px; padding: 10px 12px; background: #fafbfc; text-align: center; }
#outputBlock .kpi .label { color:#556; font-size: 12px; }
#outputBlock .kpi .val { font-size: 18px; font-weight: 700; }
#timerDisplay { font-weight: 700; font-variant-numeric: tabular-nums; }

/* —— グリッド（スクロール枠・演算子バッジ） —— */
#outputBlock .hg-grid-scroll{ overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid #e6e9ef; border-radius:10px; background:#fff; }
#outputBlock .grid-table { width:100%; min-width: 860px; border-collapse: collapse; table-layout: fixed; }
#outputBlock .grid-table th, #outputBlock .grid-table td { border:1px solid #e6e9ef; text-align:center; padding:6px; }
#outputBlock .grid-table th { font-size:14px; font-weight:600; color:#333; background:#f6f8fa; }
#outputBlock .grid-table td { height:46px; }
#outputBlock .cell-wrap { display:flex; align-items:center; justify-content:center; gap:6px; }
#outputBlock .op-badge {
  min-width: 4px; height: 22px; line-height: 22px;
  font-size: 18px; text-align: center;
  border-radius: 999px;  color:#1f3afe; 
}
#outputBlock .grid-input { width:72px; max-width:100%; text-align:center; font-size:16px; padding:8px 6px; border:1px solid #cfd4dc; border-radius:6px; }
#outputBlock .grid-input:focus { outline: 2px solid #8cc6ff; outline-offset: 0; }

/* 採点ハイライト */
#outputBlock .cell-correct { background: #e8f9e8 !important; }
#outputBlock .cell-wrong   { background: #ffe8e8 !important; }

/* レスポンシブ */
@media (max-width: 640px){
  #inputBlock .hg-form .row { grid-template-columns: 1fr; }
  #inputBlock .hg-form .label { text-align:left; }
}
/* ========== 追加：スマホ最適化（結果部分の高さ調整） ========== */
@media (max-width: 768px) {
  /* サイト側の flex 行を解除して縦積みに */
  #outputBlock .table_panel .tbody .tr {
    display: block !important;
  }
  #outputBlock .table_panel .tbody .td {
    display: block !important;
    width: 100% !important;
    padding: 8px 10px !important;
    height: auto !important;        /* 高さ固定を解除 */
    min-height: unset !important;
  }
  /* 見出しセル（左のグレー帯）をコンパクトに */
  #outputBlock .table_panel .tbody .td.e .label1 {
    font-size: 14px !important;
    padding: 8px 10px !important;
    line-height: 1.4 !important;
  }
  /* 値側（タイマー/カード）も高さ固定を解除 */
  #outputBlock .table_panel .tbody .td.v,
  #outputBlock .table_panel .tbody .td.v .value {
    height: auto !important;
    min-height: unset !important;
    padding: 10px !important;
  }

  /* タイマーの文字サイズを抑える */
  #timerDisplay {
    font-size: 22px !important;
  }

  /* KPIカード：2列グリッドにして詰める */
  #outputBlock .kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  #outputBlock .kpi .card {
    padding: 8px !important;
  }
  #outputBlock .kpi .label {
    font-size: 12px !important;
  }
  #outputBlock .kpi .val {
    font-size: 16px !important;
  }

  /* グリッド周りの余白を確保（下が窮屈になりがちなので） */
  #outputBlock .hg-grid-scroll {
    margin-top: 8px !important;
    margin-bottom: 12px !important;
  }
}

/* さらに狭い端末ではKPIを1列に */
@media (max-width: 420px) {
  #outputBlock .kpi {
    grid-template-columns: 1fr !important;
  }
}
