/* ===== iPad特化：大きいUI / タップしやすい / 横画面対応 ===== */
:root{
  --bg:#0b0c10;
  --panel:#11131a;
  --panel2:#0f1117;
  --text:#f3f4f6;
  --muted:#a7abb6;
  --line:#242838;
  --accent:#7dd3fc;
  --warn:#fbbf24;

  --radius:18px;
  --radius2:14px;
  --shadow: 0 10px 30px rgba(0,0,0,.28);
}

*{ box-sizing:border-box; -webkit-tap-highlight-color: transparent; }
html,body{ height:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
}

/* ===== Topbar ===== */
.topbar{
  position:sticky; top:0;
  background:rgba(10,11,16,.92);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--line);
  padding:14px 16px calc(12px + env(safe-area-inset-bottom)) 16px;
  z-index:20;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

.topbar__left{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.brand__title{ font-size:22px; font-weight:900; letter-spacing:.02em; }
.brand__sub{ font-size:12px; color:var(--muted); }

.topbar__right{
  margin-top:10px;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
}

/* Segmented control */
.seg{
  display:inline-flex;
  gap:2px;
  padding:4px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(255,255,255,.03);
}
.seg__btn{
  min-width:78px;
  padding:10px 14px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:var(--muted);
  font-size:15px;
  font-weight:800;
  cursor:pointer;
}
.seg__btn.is-active{
  color:var(--text);
  background:linear-gradient(180deg,#1b1f2d,#141827);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  border:1px solid rgba(125,211,252,.25);
}

/* Filters row */
.filters{
  margin-top:12px;
  display:flex;
  gap:10px;
  align-items:flex-end;
  flex-wrap:wrap;
}
.control{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:12px;
  color:var(--muted);
}
.control--grow{ flex: 1 1 340px; }

select,input{
  width:240px;
  padding:12px 14px;
  font-size:18px;               /* iPadで見やすい */
  border-radius:14px;
  border:1px solid var(--line);
  background:var(--panel);
  color:var(--text);
  outline:none;
}
input{ width:100%; min-width:320px; }

.btn{
  padding:12px 14px;
  font-size:18px;
  border-radius:14px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,#1b1f2d,#141827);
  color:var(--text);
  cursor:pointer;
  min-width:110px;
}
.btn--ghost{
  background:rgba(255,255,255,.03);
  min-width:auto;
  padding:10px 12px;
  font-size:16px;
}
.btn:active{ transform: translateY(1px); }

/* ===== Layout ===== */
.container{
  max-width: 1240px;
  margin:0 auto;
  padding:16px 14px 80px 14px;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.section{
  background:var(--panel2);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:14px;
  box-shadow: var(--shadow);
}
.section__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
  flex-wrap:wrap;
}
.section__title{
  margin:0;
  font-size:20px;
  font-weight:900;
}
.section__hint{
  font-size:12px;
  color:var(--muted);
}

/* ===== Cards & Tables ===== */
.card{
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  margin-bottom:14px;
}
.card__head{
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border-bottom:1px solid var(--line);
}
.card__title{ font-size:20px; font-weight:900; }
.badge{
  font-size:12px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  color:var(--muted);
  background:rgba(255,255,255,.03);
}

/* 横スクロール可能にして、列が多い比較表をiPadでも崩さない */
.tableWrap{
  overflow:auto;
  -webkit-overflow-scrolling: touch;
}

.table{
  width:100%;
  min-width: 860px;             /* iPadでも比較表が詰まりすぎない */
  border-collapse:separate;
  border-spacing:0;
}
.table th,.table td{
  border-bottom:1px solid var(--line);
  padding:14px 12px;
  vertical-align:top;
}
.table th{
  position:sticky;
  left:0;
  z-index:2;
  text-align:left;
  font-size:13px;
  color:var(--muted);
  font-weight:800;
  background:rgba(18,20,29,.98);
  border-right:1px solid var(--line);
  min-width: 160px;
}
.table thead th{
  top:0;
  z-index:3;
  background:rgba(18,20,29,.98);
}
.table td{
  font-size:18px;
  line-height:1.25;
  min-width: 170px;
}
.table tr:last-child th, .table tr:last-child td{ border-bottom:none; }

.price{
  font-size:22px;
  font-weight:900;
  letter-spacing:.02em;
}
.warn{
  display:inline-block;
  font-weight:900;
  color:var(--warn);
  border:1px solid rgba(251,191,36,.35);
  background:rgba(251,191,36,.08);
  padding:8px 10px;
  border-radius:12px;
  font-size:16px;
}

.smallNote{
  font-size:12px;
  color:var(--muted);
  opacity:.92;
}

/* ===== List (Other repair) ===== */
.list{
  padding:0;
  margin:0;
  list-style:none;
}
.list li{
  padding:14px 14px;
  border-bottom:1px solid var(--line);
  display:flex;
  gap:12px;
  align-items:flex-start;
  justify-content:space-between;
}
.list li:last-child{ border-bottom:none; }
.item__title{ font-weight:900; font-size:18px; }
.item__meta{ margin-top:6px; color:var(--muted); font-size:13px; line-height:1.25; }
.item__right{ text-align:right; min-width:170px; }

/* Floating button */
.fab{
  position:fixed;
  right:14px;
  bottom:14px;
  width:54px;
  height:54px;
  border-radius:999px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,#1b1f2d,#141827);
  color:var(--text);
  font-weight:900;
  font-size:20px;
  box-shadow: var(--shadow);
  cursor:pointer;
  z-index:30;
}
.fab:active{ transform: translateY(1px); }

/* iPad横画面：スペースを有効活用 */
@media (min-width: 1024px){
  .filters{ gap:12px; }
  select{ width:280px; }
}
