:root{
  /* 背景は柔らかめ、CTAは強め（押しやすい） */
  --bg: #f6fbf7;          /* 薄いグリーン系背景 */
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(2,6,23,.10);

  --radius: 16px;
  --shadow: 0 12px 26px rgba(2, 6, 23, .10);

  /* CTAカラー */
  --green: #14b86a;       /* メインボタン（緑） */
  --green2:#0e9f5a;
  --orange:#ff8a1f;       /* 強めアクセント（オレンジ） */
  --orange2:#f97316;

  /* ヘッダー帯 */
  --hero1:#14b86a;
  --hero2:#0e9f5a;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: -apple-system,BlinkMacSystemFont,"Helvetica Neue","Segoe UI",system-ui,Meiryo,sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

/* PCでもスマホ幅を中央に（要望どおり） */
.page{
  width: 100%;
  max-width: 480px;     /* スマホ幅の最大を固定 */
  margin: 0 auto;
  padding: 0;
}

/* ---------- HERO ---------- */
.hero{
  background: linear-gradient(135deg, var(--hero1), var(--hero2));
  color:#fff;
  padding: 18px 14px 16px;
}
.hero-inner{ max-width: 480px; margin:0 auto; }
.hero-pill{
  display:inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  font-size: 12px;
  font-weight: 900;
}
.hero-title{
  margin: 10px 0 6px;
  font-size: 20px;
  font-weight: 1000;
  letter-spacing: .02em;
}
.hero-sub{
  margin: 0;
  font-size: 13px;
  opacity: .95;
}
.hero-note{
  margin: 10px 0 0;
  font-size: 11px;
  opacity: .95;
  background: rgba(255,255,255,.14);
  border: 1px dashed rgba(255,255,255,.35);
  padding: 10px 10px;
  border-radius: 12px;
}

/* ---------- Sections ---------- */
.section{
  padding: 14px 0;
}
.section-title{
  margin: 0 14px 10px;
  font-size: 16px;
  font-weight: 1000;
}
.section-note{
  margin: 10px 14px 0;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Pick card ---------- */
.pick-card{
  margin: 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}
.pick-badge{
  position:absolute;
  top: 12px;
  left: 12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 1000;
  color:#fff;
  background: linear-gradient(135deg, var(--green), var(--green2));
  box-shadow: 0 8px 0 rgba(0,0,0,.12);
}

.pick-grid{
  display:grid;
  grid-template-columns: 1fr 1fr; /* 50/50 */
  gap: 12px;
  padding: 14px;
  padding-top: 54px; /* badge分 */
  align-items: start;
}

.pick-media img{
  width: 100%;
  aspect-ratio: 1 / 1;  /* 正方形 */
  object-fit: cover;
  display:block;
  border-radius: 0px;
  border: 1px solid rgba(2,6,23,.08);
  background:#f1f5f9;
}

.pick-name{
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 1000;
}
.pick-points{
  margin: 0 0 12px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
}
.pick-cta{
  display:grid;
  gap: 10px;
}
.mini-note{
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  padding: 12px 10px;
  border-radius: 14px;
  font-weight: 1000;
  text-decoration:none;
  border: 0;
  cursor:pointer;
  user-select:none;
}
.btn-primary{
  background: linear-gradient(135deg, var(--orange), var(--orange2));
  color:#fff;
  box-shadow: 0 8px 0 rgba(0,0,0,.18);
}
.btn-primary:active{ transform: translateY(1px); box-shadow: 0 7px 0 rgba(0,0,0,.18); }

.btn-secondary{
  background: #fff;
  color: #0f172a;
  border: 1px solid rgba(2,6,23,.12);
}
.btn-accent{
  background: linear-gradient(135deg, var(--green), var(--green2));
  color:#fff;
  box-shadow: 0 8px 0 rgba(0,0,0,.16);
}
.btn-accent:active{ transform: translateY(1px); box-shadow: 0 7px 0 rgba(0,0,0,.16); }

/* ---------- Top10 table (sticky left) ---------- */
.table-wrap{
  margin: 0;                 /* 横padding不要（要望） */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.rnk-table{
  width: max-content;        /* 右側はみ出てOK */
  border-collapse: separate;
  border-spacing: 0;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.rnk-table th,
.rnk-table td{
  padding: 10px 10px;
  font-size: 12px;
  border-bottom: 1px solid rgba(2,6,23,.08);
  border-right: 1px solid rgba(2,6,23,.08);
  white-space: nowrap;
  background: #fff;
  vertical-align: middle;
}
.rnk-table thead th{
  position: sticky;
  top: 0;
  z-index: 4;
  background: linear-gradient(135deg, var(--hero1), var(--hero2));
  color:#fff;
  font-weight: 1000;
}
.rnk-table thead th:last-child,
.rnk-table tbody td:last-child{ border-right:0; }

/* 左列固定 */
.rnk-table .th-left,
.rnk-table .td-left{
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fff;
}
.rnk-table .th-left{
  z-index: 6;
  background: linear-gradient(135deg, var(--hero1), var(--hero2));
  color:#fff;
}

/* 左セル（順位+画像 横並び → 下に名称） */
.sitecell{
  display:flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
}
.rank-media{
  display:flex;
  align-items:center;
  gap: 8px;
}
.rankpill{
  width: 54px;
  height: 30px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight: 1000;
  color:#fff;
  background: #f97316;
}
.siteimg{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(2,6,23,.10);
  background:#f1f5f9;
  display:block;
}
.sitename{
  font-weight: 1000;
  color: #0b3b9a;
  text-decoration: underline;
  font-size: 13px;
  line-height: 1.2;
}

.score{
  font-weight: 1000;
  color: #0f172a;
}
.open-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--orange), var(--orange2));
  color:#fff;
  font-weight: 1000;
  text-decoration:none;
  box-shadow: 0 6px 0 rgba(0,0,0,.16);
}
.open-btn:active{ transform: translateY(1px); box-shadow: 0 5px 0 rgba(0,0,0,.16); }

/* ---------- Diagnosis ---------- */
.diag-card{
  margin: 0 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px;
}
.diag-row{ margin-bottom: 12px; }
.diag-label{
  font-size: 12px;
  font-weight: 1000;
  margin-bottom: 6px;
  display:block;
}
.diag-select{
  width:100%;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(2,6,23,.12);
  background:#fff;
  font-weight: 800;
}
.diag-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.chip{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid rgba(2,6,23,.12);
  background:#fff;
  font-size: 12px;
  font-weight: 900;
}
.chip input{ transform: scale(1.15); }
.diag-result{
  margin-top: 12px;
  border-top: 1px dashed rgba(2,6,23,.16);
  padding-top: 12px;
}
.diag-empty{
  font-size: 12px;
  color: var(--muted);
}
.result-card{
  background:#fff;
  border: 1px solid rgba(2,6,23,.12);
  border-radius: 14px;
  padding: 12px;
}
.result-title{
  margin: 0 0 6px;
  font-weight: 1000;
}
.result-sub{
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Broker cards (10) ---------- */
.broker-list{
  display:grid;
  gap: 12px;
  padding: 0 14px 14px;
}
.broker-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.broker-head{
  display:flex;
  gap: 10px;
  padding: 12px;
  align-items:center;
  border-bottom: 1px solid rgba(2,6,23,.06);
}
.broker-head img{
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(2,6,23,.10);
  background:#f1f5f9;
}
.broker-title{
  margin:0;
  font-size: 14px;
  font-weight: 1000;
}
.broker-rank{
  margin-top: 4px;
  font-size: 12px;
  font-weight: 1000;
  color: var(--muted);
}
.broker-body{ padding: 12px; }
.broker-points{
  margin: 0 0 10px;
  padding-left: 18px;
  font-size: 12px;
  color: var(--muted);
}
.mini-table{
  width:100%;
  border-collapse: collapse;
  background:#fff;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid rgba(2,6,23,.10);
}
.mini-table th,
.mini-table td{
  padding: 8px 10px;
  font-size: 12px;
  border-bottom: 1px solid rgba(2,6,23,.06);
}
.mini-table th{
  width: 46%;
  text-align:left;
  background: rgba(20,184,106,.10);
}
.review{
  margin-top: 10px;
  padding: 10px;
  background: #fff;
  border: 1px dashed rgba(2,6,23,.14);
  border-radius: 12px;
  font-size: 12px;
  color: rgba(2,6,23,.78);
}

/* ---------- Footer ---------- */
.footer{
  padding: 18px 14px 22px;
  text-align:center;
  color: var(--muted);
}
.footer-note{
  margin: 6px 0 0;
  font-size: 11px;
}

/* スマホのまま使えるので、基本レスポンシブは不要 */