/* style.css — 坪↔平米↔畳 変換ツール */

.hero-tsubo {
  background: var(--primary);
}

.hero-glow-tsubo {
  position: absolute;
  top: -60px; right: -60px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(107,159,212,.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero-eyebrow-tsubo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(107,159,212,.12);
  border: 1px solid rgba(107,159,212,.3);
  color: var(--primary-mid);
  font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 14px;
  border-radius: var(--r-full);
  font-family: 'DM Mono', monospace;
  margin-bottom: 18px;
}

.em-tsubo { color: var(--primary-mid); font-style: normal; }

/* 畳種類選択 */
.tatami-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

@media (min-width: 500px) {
  .tatami-selector { grid-template-columns: 1fr 1fr; }
}

.tatami-btn {
  border: 2px solid var(--border);
  border-radius: var(--r);
  padding: 12px 10px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
  display: block;
  text-align: center;
  background: var(--white);
}

.tatami-btn:hover {
  border-color: #0891b2;
  background: #ecfeff;
}

.tatami-btn.tatami-btn input[type="radio"] { display: none; }

.tatami-check {
  position: absolute;
  top: 7px; right: 9px;
  color: #0891b2;
  font-weight: 700; font-size: 12px;
  opacity: 0;
  transition: opacity .15s;
}

.tatami-btn.selected .tatami-check { opacity: 1; }

.tatami-name {
  display: block;
  font-size: 13px; font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}

.tatami-size {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size:12px;
  color: #0891b2;
}

/* 変換パネル */
.convert-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 16px;
}

/* convert-panel: デフォルト1列（モバイル）、560px以上で5列 */
@media (min-width: 560px) {
  .convert-panel {
    grid-template-columns: 1fr;
  }
  .convert-arrow { transform: none;   text-align: center;
  transform: rotate(90deg);
}
}

.convert-unit { text-align: center; }

.unit-label {
  font-size: 13px; font-weight: 700;
  color: var(--ink2);
  margin-bottom: 8px;
  letter-spacing: .04em;
}

.unit-input {
  width: 100%;
  background: #f8fafc;
  border: 2px solid var(--border);
  border-radius: var(--r);
  color: var(--ink);
  font-size: 22px;
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  padding: 12px 14px;
  text-align: center;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}

.unit-input:focus {
  border-color: #0891b2;
  box-shadow: 0 0 0 3px rgba(8,145,178,.1);
  background: var(--white);
}

.unit-sub {
  font-family: 'DM Mono', monospace;
  font-size:12px;
  color: var(--ink3);
  margin-top: 6px;
}

.convert-arrow {
  font-size: 20px;
  color: var(--ink3);
  user-select: none;
}

/* 結果詳細 */
.result-detail {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  margin-bottom: 16px;
}

.detail-title {
  font-size: 13px; font-weight: 700;
  color: var(--ink2);
  margin-bottom: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

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

.detail-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px;
}

.detail-label {
  font-size: 11px; color: var(--ink3);
  margin-bottom: 5px;
}

.detail-val {
  font-family: 'DM Mono', monospace;
  font-size: 18px; font-weight: 500;
  color: #0891b2;
}

/* 早見表 */
.quick-table-wrapper {
  overflow-x: auto;
}

.quick-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.quick-table th {
  background: #f8fafc;
  padding: 10px 16px;
  text-align: right;
  font-weight: 700;
  color: var(--ink2);
  border-bottom: 2px solid var(--border);
}

.quick-table th:first-child { text-align: left; }

.quick-table td {
  padding: 10px 16px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-family: 'DM Mono', monospace;
  color: var(--ink);
}

.quick-table td:first-child {
  text-align: left;
  font-family: 'DM Mono', monospace;
  font-weight: 700;
  color: #0891b2;
}

.quick-table td:last-child {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  color: var(--ink3);
  text-align: left;
}

.quick-table tr:last-child td { border-bottom: none; }

.quick-table tr.highlight { background: #ecfeff; }

.tatami-type-note {
  font-size: 11px; color: var(--ink3);
  margin-top: 10px;
  text-align: right;
}