/* ===========================================================
   かぶ曜日 — Claude Design「案A まるポップ」の再現
   デザイントークンは docs/design/.../README.md の表を正とする
   =========================================================== */
:root {
  --bg: #f5ead8;              /* 背景（クリーム） */
  --card: #fbf4e4;            /* カード地 */
  --text: #201e1d;
  --n200: #efe2cc;
  --n300: #ddcfb6;
  --n500: #9c8f7c;
  --n600: #7f7566;
  --n700: #5e564b;
  --n800: #403a32;

  /* 青 = 安かった */
  --blue-bg: #e3ecf6;
  --blue-label: #3d6fa8;
  --blue-num: #2c5585;

  /* テラコッタ = 高かった */
  --acc100: #f7e6da;
  --acc500: #c67139;
  --acc600: #b5602f;
  --acc700: #a1542a;
  --acc800: #8a4722;

  /* セージ = 結論・検証 */
  --sage200: #e4e9d8;
  --sage300: #cdd6b5;
  --sage400: #a9b785;
  --sage500: #7a8a5e;
  --sage700: #5c6a45;
  --sage800: #485435;

  /* 注意の黄色 */
  --warn-bg: #fdf3d7;
  --warn-bd: #e8c65a;
  --warn-tx: #8a6a13;
  --warn-tx2: #6e5510;

  --sh-sm: 0 1px 3px rgba(60, 45, 25, .07);
  --sh-md: 0 3px 10px rgba(60, 45, 25, .10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Zen Maru Gothic', -apple-system, BlinkMacSystemFont,
               "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  font-weight: 500;
  background: var(--n200);
  color: var(--text);
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}

.sheet {
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg);
  min-height: 100vh;
}
@media (min-width: 460px) {
  .sheet { margin: 16px auto; border-radius: 28px; overflow: hidden; box-shadow: var(--sh-md); min-height: 0; }
}

/* ---------- ヘッダー ---------- */
.site-header { padding: 20px 20px 14px; display: flex; align-items: center; gap: 12px; justify-content: center; }
.site-header a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 12px; }
.clock {
  width: 52px; height: 52px; border-radius: 999px; flex: none;
  background: var(--card); border: 3px solid var(--sage500); position: relative;
}
.clock .hand-red, .clock .hand-blue, .clock .pin { position: absolute; left: 50%; top: 50%; border-radius: 3px; }
.clock .hand-red { width: 3px; height: 17px; background: var(--acc600); transform: translate(-50%, -100%) rotate(-90deg); transform-origin: bottom center; }
.clock .hand-blue { width: 3px; height: 13px; background: var(--blue-num); transform: translate(-50%, -100%) rotate(120deg); transform-origin: bottom center; }
.clock .pin { width: 7px; height: 7px; background: var(--text); border-radius: 999px; transform: translate(-50%, -50%); }
.site-title { font-weight: 900; font-size: 26px; line-height: 1.1; letter-spacing: -.01em; }
.site-title .small { font-size: 15px; }
.tagline { font-size: 11px; color: var(--n700); margin-top: 3px; font-weight: 500; }

/* ---------- 結論バナー ---------- */
.conclusion {
  margin: 0 16px; background: var(--sage200); border-radius: 20px;
  padding: 14px 18px; text-align: center;
}
.conclusion-label { font-size: 11px; font-weight: 900; color: var(--sage800); letter-spacing: .08em; }
.conclusion-body { font-size: 15px; font-weight: 900; margin-top: 4px; line-height: 1.6; }
.conclusion-body .up { color: var(--acc800); }
.conclusion-body .down { color: var(--blue-num); }

main { padding: 16px 16px 24px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- ピル・見出し ---------- */
.pill-row { display: flex; gap: 8px; justify-content: center; }
.asof-line { font-size: 11px; color: var(--n600); text-align: center; margin-top: 8px; line-height: 1.6; font-weight: 500; }
.pill {
  font-size: 12px; font-weight: 700; background: var(--bg);
  border: 2px solid var(--sage300); color: var(--sage800);
  border-radius: 999px; padding: 4px 14px;
}
.sector-head { font-size: 13px; font-weight: 700; color: var(--sage700); display: flex; align-items: center; gap: 8px; }
.sector-head::before { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--sage400); }
.sector-head.muted { color: var(--n500); }
.sector-head.muted::before { background: var(--n300); }

/* ---------- 銘柄カード（トップ・2列） ---------- */
.stock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stock-card {
  background: var(--card); border-radius: 18px; padding: 12px 13px;
  box-shadow: var(--sh-sm); text-decoration: none; color: inherit; display: block;
  transition: transform .1s, box-shadow .1s;
}
.stock-card:active { transform: translateY(1px); box-shadow: none; }
.stock-card-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.stock-card-name { font-weight: 700; font-size: 14px; }
.stock-card-code { font-size: 10px; color: var(--n600); }
.slots { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.slot { border-radius: 12px; padding: 7px 10px; }
.slot-label { display: block; font-size: 10px; font-weight: 700; }
.slot-main { display: block; font-size: 17px; font-weight: 900; line-height: 1.25; }
.slot-pct { display: block; font-size: 10px; font-weight: 700; line-height: 1.3; }
.stock-card-head, .slots, .stock-card-foot { display: flex; }
.slot.low { background: var(--blue-bg); }
.slot.low .slot-label { color: var(--blue-label); }
.slot.low .slot-main, .slot.low .slot-pct { color: var(--blue-num); }
.slot.high { background: var(--acc100); }
.slot.high .slot-label { color: var(--acc700); }
.slot.high .slot-main, .slot.high .slot-pct { color: var(--acc800); }
.stock-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 4px; }
.chip { font-size: 11px; font-weight: 700; background: var(--n200); color: var(--n700); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.chip.win { background: var(--sage200); color: var(--sage800); }
.chip.lose { background: var(--acc100); color: var(--acc800); }
.chip.even { background: var(--n200); color: var(--n800); }
.price-note { font-size: 10px; color: var(--n600); font-weight: 700; white-space: nowrap; }

.dashed-box {
  border: 2px dashed var(--n300); border-radius: 18px; padding: 14px;
  text-align: center; font-size: 12px; color: var(--n500); font-weight: 700;
}

/* ---------- 銘柄詳細 ---------- */
.back-bar { padding: 20px 20px 0; display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 16px; }
.back-bar a { text-decoration: none; color: inherit; display: flex; align-items: center; gap: 10px; }
.detail { padding: 20px; }
.detail h1 { font-weight: 900; font-size: 28px; line-height: 1.2; }
.detail-meta { font-size: 13px; color: var(--n600); margin-top: 2px; }
/* 株価は毎日変わるので「いつの値段か」を必ず添える */
.detail-meta .asof { font-size: 11.5px; white-space: nowrap; }

.detail-head { margin-bottom: 18px; }
.answer-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.answer { border-radius: 22px; padding: 18px 20px; }
.answer-label { font-size: 13px; font-weight: 700; }
.answer-main { font-size: 30px; font-weight: 900; margin-top: 4px; line-height: 1.2; }
.answer-main .pct { font-size: 17px; }
.answer.low { background: var(--blue-bg); }
.answer.low .answer-label { color: var(--blue-label); }
.answer.low .answer-main { color: var(--blue-num); }
.answer.high { background: var(--acc100); }
.answer.high .answer-label { color: var(--acc700); }
.answer.high .answer-main { color: var(--acc800); }
.period-note { font-size: 11px; color: var(--n600); margin-top: 10px; text-align: center; font-weight: 500; }

/* 情報ボックス */
.box { margin-top: 12px; border-radius: 20px; padding: 16px 18px; }
.box-title { font-weight: 900; font-size: 15px; }
.box-body { font-size: 13px; margin-top: 6px; line-height: 1.8; font-weight: 500; }
.box.sage { background: var(--card); border: 2px solid var(--sage300); }
.box.sage .box-body { color: var(--n800); }
.box.warn { background: var(--warn-bg); border: 2px solid var(--warn-bd); }
.box.warn .box-title { color: var(--warn-tx); }
.box.warn .box-body, .box.warn ul { color: var(--warn-tx2); }
.box.warn ul { font-size: 13px; margin: 6px 0 0 1.1em; line-height: 1.8; font-weight: 500; }
.box.warn li { margin-bottom: 5px; }
/* ほとんど差がなかったマスの注記。断定を避けるための箱なので目立たせすぎない */
.box.near { background: var(--card); border: 2px dashed var(--n300); }
.box.near .box-body { color: var(--n700); }
.box.near ul { font-size: 12.5px; margin: 8px 0 0 1.1em; line-height: 1.8; font-weight: 700; color: var(--n800); }
.finding-sub { font-size: 11px; color: var(--n600); margin-top: 8px; line-height: 1.6; font-weight: 500; }

/* 広告枠。統計と地続きに見えないよう、上に余白と区切り線を入れて切り離す */
.ad-slot { margin: 28px 0 4px; padding-top: 18px; border-top: 1px dashed var(--n300); }
.ad-label { font-size: 11px; font-weight: 900; color: var(--n600); letter-spacing: .1em; margin-bottom: 8px; }
.ad-body { display: block; }
.ad-note { font-size: 10.5px; color: var(--n600); margin-top: 8px; line-height: 1.7; font-weight: 500; }

/* 曜日グラフ */
.wd-chart { margin-top: 10px; }
.wd-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; font-weight: 700; }
.wd-name { width: 2.8em; flex: none; }
.wd-track { flex: 1; height: 15px; background: var(--n200); border-radius: 4px; position: relative; }
.wd-track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--n300); }
.wd-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; }
.wd-bar.minus { background: var(--blue-num); }
.wd-bar.plus { background: var(--acc500); }
.wd-val { width: 4.1em; flex: none; text-align: right; font-variant-numeric: tabular-nums; }
.wd-val.minus { color: var(--blue-num); }
.wd-val.plus { color: var(--acc800); }

/* ためした記録 */
.trades { margin-top: 22px; }
.trades-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.trades-head h2 { font-weight: 900; font-size: 17px; }
.trades-count { font-size: 12px; font-weight: 700; color: var(--sage700); white-space: nowrap; }
.trades-note { font-size: 12px; color: var(--n600); margin-top: 2px; }
.trade-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.trade {
  background: var(--card); border-radius: 20px; padding: 14px 18px;
  border: 2px dashed var(--sage300);
}
.trade-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.trade-nth { font-size: 12px; font-weight: 900; color: var(--n600); }
.trade-result { font-size: 20px; font-weight: 900; }
.trade-result.win { color: var(--sage700); }
.trade-result.lose { color: var(--acc800); }
.trade-leg { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 700; margin-top: 6px; gap: 8px; }
.trade-leg .buy { color: var(--blue-num); }
.trade-leg .sell { color: var(--acc800); }
.trade-comment { font-size: 12px; color: var(--n700); margin-top: 8px; line-height: 1.7; }
.trade-empty {
  background: var(--card); border: 2px dashed var(--n300); border-radius: 20px;
  padding: 18px; text-align: center; font-size: 12.5px; color: var(--n600); font-weight: 700;
}

/* ---------- 文章ページ ---------- */
.text-page { padding: 20px; font-size: 13.5px; }
.text-page h1 { font-size: 22px; font-weight: 900; margin-bottom: 10px; }
.text-page h2 { font-size: 15px; font-weight: 900; margin: 18px 0 6px; }
.text-page ul { margin-left: 1.2em; }
.text-page li { margin-bottom: 6px; }
.text-page p { margin-bottom: 8px; }
.text-page a { color: var(--acc700); }

/* ---------- 業種ナビ（PCのみ表示） ---------- */
.sector-nav { display: none; }
.nav-pill {
  font-size: 12.5px; font-weight: 700; border-radius: 999px; padding: 5px 14px;
  text-decoration: none; background: var(--sage200); color: var(--sage800);
}
.nav-pill.soon { background: transparent; color: var(--n500); }

/* ---------- ヒートマップ ---------- */
.box.heat { background: var(--card); border: 2px solid var(--sage300); }
.hm-wrap { overflow-x: auto; margin-top: 10px; }
.heatmap { border-collapse: separate; border-spacing: 3px; width: 100%; }
.heatmap th {
  font-size: 11px; font-weight: 700; color: var(--n600);
  padding: 2px 4px; white-space: nowrap;
}
.heatmap tbody th { text-align: right; font-size: 12px; color: var(--n800); }
.hm-cell {
  font-size: 11.5px; font-weight: 700; text-align: center;
  padding: 8px 4px; border-radius: 7px; white-space: nowrap;
  font-variant-numeric: tabular-nums; color: var(--n800);
  min-width: 46px;
}
.hm-cell.on-dark { color: #fff; }
.hm-cell.empty { color: var(--n500); font-weight: 500; }
.hm-cell.pick-low { outline: 2.5px solid var(--blue-num); outline-offset: -2px; }
.hm-cell.pick-high { outline: 2.5px solid var(--acc700); outline-offset: -2px; }
.hm-key {
  display: inline-block; width: 11px; height: 11px; border-radius: 3px;
  vertical-align: -1px; margin: 0 3px 0 6px;
}
.hm-key.low { background: rgba(44,85,133,.85); }
.hm-key.high { background: rgba(160,84,42,.85); }

/* ---------- PC（900px以上） ---------- */
@media (min-width: 900px) {
  .sheet {
    max-width: 1120px; margin: 24px auto; border-radius: 28px;
    overflow: visible; box-shadow: var(--sh-md);
  }
  .site-header {
    justify-content: space-between; padding: 22px 32px 18px;
    border-bottom: 2px solid var(--n200);
  }
  .brand { gap: 16px; }
  .clock { width: 60px; height: 60px; border-width: 4px; }
  .clock .hand-red { width: 4px; height: 20px; }
  .clock .hand-blue { width: 4px; height: 15px; }
  .clock .pin { width: 9px; height: 9px; }
  .site-title { font-size: 32px; }
  .tagline { font-size: 13.5px; }
  .sector-nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

  .conclusion {
    margin: 22px 32px 0; border-radius: 24px; padding: 18px 26px;
    display: flex; align-items: center; gap: 20px; text-align: left;
  }
  .conclusion-label {
    white-space: nowrap; background: var(--card); border-radius: 999px;
    padding: 5px 15px; flex: none;
  }
  .conclusion-body { font-size: 20px; margin: 0; }

  main { padding: 24px 32px 40px; gap: 18px; }
  .pill-row { justify-content: flex-start; }
  .asof-line { text-align: left; font-size: 11.5px; }
  .sector-head { font-size: 18px; }
  .stock-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .stock-card { border-radius: 22px; padding: 16px 18px; }
  .stock-card-name { font-size: 17px; }
  .stock-card-code { font-size: 11px; }
  .slot { padding: 9px 12px; border-radius: 14px; }
  .slot-label { font-size: 11px; }
  .slot-main { font-size: 21px; }
  .slot-pct { font-size: 11.5px; }

  /* 詳細ページ */
  .back-bar { padding: 22px 32px 0; font-size: 17px; }
  .detail { padding: 26px 32px 40px; }
  .detail h1 { font-size: 38px; }
  .detail-meta { font-size: 14px; }
  .answer-cards { flex-direction: row; gap: 16px; }
  .answer { flex: 1; border-radius: 26px; padding: 20px 24px; }
  .answer-label { font-size: 14px; }
  .answer-main { font-size: 32px; }
  .answer-main .pct { font-size: 18px; }
  .period-note { font-size: 12.5px; }

  .detail-grid {
    display: grid; grid-template-columns: 1.15fr 1fr;
    gap: 28px; align-items: start; margin-top: 20px;
  }
  .detail-main, .detail-side { min-width: 0; }
  .detail-main > .box:first-child { margin-top: 0; }
  .trades { margin-top: 0; }
  .trades-head h2 { font-size: 19px; }
  .hm-cell { font-size: 12.5px; padding: 11px 6px; min-width: 58px; }
  .heatmap tbody th { font-size: 13px; }
  .heatmap thead th { font-size: 12px; }

  .text-page { padding: 28px 32px 36px; font-size: 14.5px; max-width: 760px; }
  .site-footer { padding: 0 32px 30px; }
  .disclaimer-line { max-width: 780px; margin: 8px auto 0; }
}

/* ---------- フッター ---------- */
.site-footer { padding: 0 20px 26px; text-align: center; }
.disclaimer-line { font-size: 10px; color: var(--n600); line-height: 1.7; margin-top: 8px; }
.footer-nav { display: flex; gap: 14px; justify-content: center; margin: 12px 0 6px; font-size: 11px; font-weight: 700; flex-wrap: wrap; }
.footer-nav a { color: var(--sage700); text-decoration: none; }
.copyright { font-size: 10px; color: var(--n500); }
.sample-banner {
  background: var(--warn-bg); border: 2px solid var(--warn-bd); border-radius: 14px;
  padding: 10px 14px; font-size: 12px; color: var(--warn-tx2); margin: 0 16px; font-weight: 700;
}
.page-disclaimer { font-size: 10px; color: var(--n600); line-height: 1.7; margin-top: 20px; text-align: center; }
