/* ===== 詳細UI（mobile-first） ===== */

.d-title,
.d-line,
.d-block,
.d-back{
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* タイトル */
.d-title{
  margin: 14px auto 10px;
  padding: 0 12px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
}

/* 画像 */
.d-hero{
  max-width: 720px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  justify-content: center;
}

.d-hero-img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: 12px;
}

/* 基本行 */
.d-line{
  padding: 0 12px;
  margin: 10px auto 14px;
  font-size: 14px;
  line-height: 1.45;
}

/* ブロック */
.d-block{
  padding: 12px;
  margin: 10px auto;
  border-radius: 12px;
}

/* 見出し */
.d-h2{
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 800;
}

/* レベル枠 */
.d-level{
  border: 1px solid var(--border);
  padding: 10px;
  border-radius: 12px;
}

/* ボタン */
.d-btn{
  border: 1px solid var(--border);
  background: #fff;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* 入力 */
.d-input{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

/* ===== Lv行のレイアウト制御 ===== */
/* Lvボタン列：折り返しOK */
.d-level-row--wrap{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 10px;
}

/* Lv入力＋起源：横並び固定（折り返し禁止） */
.d-level-row--nowrap{
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

/* ▼ Lv入力：typeに依存せず下線＋11桁対応 */
#monster-level{
  width: 160px;
  height: 28px;
  padding: 0 4px;
  border: none;
  border-bottom: 2px solid var(--border);
  border-radius: 0;
  background: transparent;
  outline: none;
  font-size: 15px;
}

/* チェックボックス少し小さめ */
.d-input input[type="checkbox"]{
  width: 16px;
  height: 16px;
}

/* ===== dl（ステータス等） ===== */
.d-list{
  border: 1px solid var(--border);
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
}

.d-row{
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
}

.d-row:first-child{
  border-top: none;
}

.d-row dt{
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.85;
}

.d-row dd{
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

/* ドロップ横並び（収まらない場合は横スクロール） */
.d-bullets{
  display: flex;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.d-bullets li{
  white-space: nowrap;
}

/* 出現場所 */
.d-places{
  margin: 0;
}

/* 戻る */
.d-back{
  padding: 10px 12px 22px;
}

.d-back a{
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

/* PCは"見にくくならない程度" */
@media (min-width: 900px){
  .d-title{ font-size: 26px; }
  .d-line{ font-size: 15px; }
  .d-h2{ font-size: 17px; }
  .d-row{ grid-template-columns: 110px 1fr; }
  #monster-level{ width: 160px; height: 30px; }
}
