* {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans JP",
    sans-serif;
  margin: 0;
  background: #f7f7f7;
  color: #111;
}

.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 16px;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  margin-bottom: 16px;
}

h1 {
  font-size: 20px;
  margin: 0 0 12px;
}

h2 {
  font-size: 18px;
  margin: 0 0 10px;
}

h3 {
  font-size: 14px;
  margin: 16px 0 8px;
}

.akafuto{
  font-size: 14px;
  font-weight:bold;
  color:#FF0000;
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.row > div {
  flex: 1;
  min-width: 220px;
}

label {
  display: block;
  font-size: 12px;
  color: #444;
  margin: 0 0 6px;
}

/* 入力 + クリアボタン */
.input-wrap {
  position: relative;
}

input[type="text"] {
  width: 100%;
  font-size: 18px;
  padding: 12px;
  padding-right: 44px; /* クリアボタン分 */
  border: 1px solid #ddd;
  border-radius: 10px;
}

.clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 16px;
  color: #444;
}

.input-wrap.has-value .clear-btn {
  display: flex;
}

.clear-btn:active {
  transform: translateY(calc(-50% + 1px));
}

/* オプション枠 */
.opts {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.opt {
  background: #fafafa;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 10px;
  flex: 1;
  min-width: 220px;
}

.opt strong {
  display: block;
  font-size: 12px;
  color: #444;
  margin-bottom: 8px;
}

/* ラジオ横並び（税率用） */
.radio-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

/* ラジオを大きく */
.radio-row input[type="radio"] {
  width: 20px;
  height: 20px;
  transform: translateY(1px);
  accent-color: #111;
}

/* ラジオ行のラベル（余白リセット） */
.radio-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: #111;
}

/* opt内のメモ表示用 */
.opt-note {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
}

.opt-note-strong {
  font-size: 14px;
  color: #111;
  padding: 6px 0;
}

/* 結果枠 */
.result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #111;
  color: #fff;
}

.result .line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin: 8px 0;
}

.result .label {
  font-size: 13px;
  opacity: 0.9;
}

.result-input {
  width: min(260px, 55%);
  font-size: 18px;
  font-weight: 700;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: right;
}

.result-input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.25);
  outline-offset: 2px;
}

.result-input[readonly] {
  cursor: text;
}

.muted {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
  line-height: 1.6;
}

/* 2カラム */
.grid2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch; /* 高さ揃え */
  margin-bottom: 14px; /* 合計枠との間の余白 */
}

@media (min-width: 920px) {
  .grid2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* 左右カードの黒い結果枠位置を揃える */
.tool-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tool-card .result {
  margin-top: auto; /* 下寄せ */
}

/* 注記 */
.note {
  background: #fafafa;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  padding: 12px;
  font-size: 12px;
  color: #333;
  line-height: 1.7;
}

/* 広告枠 */
.ad-slot {
  padding: 10px;
  border: 1px dashed #bbb;
  border-radius: 10px;
  color: #666;
  font-size: 12px;
}

/* 説明コンテンツ */
.content p,
.content li {
  font-size: 13px;
  line-height: 1.9;
  color: #222;
}

.content ul {
  margin: 8px 0 8px 18px;
  padding: 0;
}

figure {
  margin: 12px 0;
  padding: 0;
}

.content img {
  max-width: 100%;
  height: auto;
  border: 1px solid #000;
  margin:8px 0;
}

code.kbd {
  background: #f2f2f2;
  border: 1px solid #e6e6e6;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
}

/* footer */
.footer {
  margin: 40px 0 20px;
  text-align: center;
}

.footer-link {
  font-size: 13px;
  color: #666;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
  color: #111;
}
