/* ============================================================
   だいどころ帖 共通スタイル
   全ページ共通。ページ固有のスタイルはありません。
   ============================================================ */

:root{
  --ink:#16303F;
  --ink-soft:#4A6472;
  --enamel:#F7F6F2;
  --panel:#E9ECE5;
  --line:#D3D8CE;
  --green:#4E8C6E;
  --mustard:#C98B1E;
  --teal:#3F7387;
  --rust:#A8543A;
  --shadow:0 1px 0 rgba(22,48,63,.06);
}
*{box-sizing:border-box;margin:0;padding:0;}
html{-webkit-text-size-adjust:100%;}
body{
  font-family:"Zen Kaku Gothic New",-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",sans-serif;
  background:var(--enamel);
  color:var(--ink);
  line-height:1.75;
  font-size:15px;
  padding-bottom:80px;
  -webkit-font-smoothing:antialiased;
}

/* ---------- ホーローのふち（共通ヘッダー） ---------- */
.rim{
  background:var(--ink);
  color:var(--enamel);
  padding:14px 20px 16px;
}
.rim-mark{
  font-size:11px;
  letter-spacing:.34em;
  opacity:.7;
  font-weight:500;
}
.rim h1{
  font-family:"Shippori Mincho B1",serif;
  font-size:25px;
  font-weight:700;
  letter-spacing:.1em;
  margin-top:3px;
  line-height:1.3;
}
.rim h1 a{color:inherit;text-decoration:none;}
.rim p{
  font-size:12px;
  opacity:.72;
  margin-top:5px;
  letter-spacing:.03em;
}

/* ---------- 逆引きヒーロー（こんだてページのみ） ---------- */
.ask{
  padding:26px 20px 22px;
  border-bottom:1px solid var(--line);
}
.ask h2{
  font-family:"Shippori Mincho B1",serif;
  font-size:19px;
  font-weight:700;
  letter-spacing:.04em;
  line-height:1.5;
}
.ask .sub{
  font-size:12.5px;
  color:var(--ink-soft);
  margin-top:6px;
}
.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:16px;
}
.chip{
  font-family:inherit;
  font-size:14px;
  font-weight:500;
  padding:9px 15px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--ink);
  cursor:pointer;
  transition:background .15s,border-color .15s,color .15s;
  line-height:1.4;
}
.chip:hover{border-color:var(--ink-soft);}
.chip[aria-pressed="true"]{
  background:var(--ink);
  border-color:var(--ink);
  color:var(--enamel);
}
.chip:focus-visible,.tab:focus-visible,.mode:focus-visible,
.acc-head:focus-visible,.mark:focus-visible,.clear:focus-visible,
.rate-b:focus-visible{
  outline:2px solid var(--mustard);
  outline-offset:2px;
}

/* ---------- モード切替（こんだてページのみ） ---------- */
.modes{
  display:flex;
  gap:0;
  margin-top:18px;
  border:1px solid var(--line);
  border-radius:6px;
  overflow:hidden;
  background:#fff;
}
.mode{
  flex:1;
  font-family:inherit;
  font-size:12.5px;
  font-weight:500;
  padding:10px 4px;
  border:none;
  border-right:1px solid var(--line);
  background:transparent;
  color:var(--ink-soft);
  cursor:pointer;
  line-height:1.4;
}
.mode:last-child{border-right:none;}
.mode[aria-pressed="true"]{background:var(--panel);color:var(--ink);font-weight:700;}

/* ---------- タブ（共通ナビ・ページ間リンク） ---------- */
.tabs{
  display:flex;
  overflow-x:auto;
  gap:2px;
  padding:0 12px;
  border-bottom:1px solid var(--line);
  background:var(--enamel);
  position:sticky;
  top:0;
  z-index:20;
  scrollbar-width:none;
}
.tabs::-webkit-scrollbar{display:none;}
.tab{
  font-family:inherit;
  font-size:14px;
  font-weight:500;
  white-space:nowrap;
  padding:13px 13px 11px;
  border:none;
  border-bottom:2px solid transparent;
  background:transparent;
  color:var(--ink-soft);
  cursor:pointer;
  text-decoration:none;
}
.tab[aria-current="page"]{color:var(--ink);font-weight:700;border-bottom-color:var(--ink);}

.wrap{padding:20px 16px 0;}

/* ---------- 見出し ---------- */
.head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
  margin-bottom:14px;
}
.head h3{
  font-family:"Shippori Mincho B1",serif;
  font-size:17px;
  font-weight:700;
  letter-spacing:.05em;
}
.count{font-size:12px;color:var(--ink-soft);}
.note{font-size:13px;color:var(--ink-soft);margin-bottom:14px;}

/* ---------- 料理カード ---------- */
.dish{
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  padding:14px 15px;
  margin-bottom:10px;
  box-shadow:var(--shadow);
}
.dish-top{display:flex;align-items:flex-start;gap:10px;}
.dish-name{
  font-size:15.5px;
  font-weight:700;
  letter-spacing:.02em;
  flex:1;
  line-height:1.5;
}
.star{
  font-size:11px;
  font-weight:700;
  color:var(--mustard);
  border:1px solid var(--mustard);
  border-radius:4px;
  padding:2px 6px;
  white-space:nowrap;
  line-height:1.5;
}
.dish-note{
  font-size:13px;
  color:var(--ink-soft);
  margin-top:6px;
}
.tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px;}
.tag{
  font-size:11px;
  padding:2px 8px;
  border-radius:3px;
  background:var(--panel);
  color:var(--ink-soft);
  letter-spacing:.04em;
}
.tag.n{background:#E4EEE7;color:var(--green);}
.tag.o{background:#F5EBD6;color:var(--mustard);}
.tag.s{background:#E2ECF0;color:var(--teal);}
.tag.t{background:#F3E3DD;color:var(--rust);}
.link{
  display:inline-block;
  font-family:inherit;
  font-size:12.5px;
  font-weight:500;
  color:var(--teal);
  background:none;
  border:none;
  padding:8px 0 0;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:3px;
}

/* ---------- 空の状態 ---------- */
.empty{
  text-align:center;
  padding:40px 20px;
  color:var(--ink-soft);
  font-size:13.5px;
  line-height:2;
}

/* ---------- レシピ（アコーディオン） ---------- */
.acc{
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  margin-bottom:10px;
  overflow:hidden;
  box-shadow:var(--shadow);
  scroll-margin-top:60px; /* stickyタブに隠れないように */
}
.acc-head{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding:15px;
  border:none;
  background:transparent;
  font-family:inherit;
  text-align:left;
  cursor:pointer;
}
.acc-title{
  flex:1;
  font-size:15.5px;
  font-weight:700;
  letter-spacing:.02em;
  line-height:1.5;
}
.acc-time{font-size:11.5px;color:var(--ink-soft);white-space:nowrap;}
.acc-mark{
  font-size:18px;
  color:var(--ink-soft);
  transition:transform .2s;
  line-height:1;
}
.acc[data-open="1"] .acc-mark{transform:rotate(45deg);}
.acc-body{padding:0 15px 18px;border-top:1px solid var(--line);}
.acc-body[hidden]{display:none;}
.lead{
  font-size:13px;
  color:var(--ink-soft);
  padding:13px 0 0;
}
.sec{
  font-family:"Shippori Mincho B1",serif;
  font-size:13px;
  font-weight:700;
  letter-spacing:.16em;
  color:var(--green);
  margin:20px 0 9px;
  padding-bottom:5px;
  border-bottom:1px solid var(--line);
}
.ing{list-style:none;}
.ing li{
  display:flex;
  justify-content:space-between;
  gap:14px;
  padding:6px 0;
  font-size:14px;
  border-bottom:1px dotted var(--line);
}
.ing li:last-child{border-bottom:none;}
.ing .amt{color:var(--ink-soft);white-space:nowrap;font-size:13.5px;}
.steps{list-style:none;counter-reset:s;}
.steps li{
  counter-increment:s;
  position:relative;
  padding:9px 0 9px 32px;
  font-size:14px;
  border-bottom:1px dotted var(--line);
}
.steps li:last-child{border-bottom:none;}
.steps li::before{
  content:counter(s);
  position:absolute;
  left:0;
  top:11px;
  width:22px;
  height:22px;
  border-radius:50%;
  background:var(--ink);
  color:var(--enamel);
  font-size:11.5px;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}
.steps b{color:var(--rust);font-weight:700;}
.memo{list-style:none;}
.memo li{
  font-size:13px;
  color:var(--ink-soft);
  padding:5px 0 5px 15px;
  position:relative;
}
.memo li::before{
  content:"";
  position:absolute;
  left:2px;
  top:13px;
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--line);
}

/* ---------- 一覧表 ---------- */
.rows{
  background:#fff;
  border:1px solid var(--line);
  border-radius:8px;
  overflow:hidden;
  margin-bottom:16px;
  box-shadow:var(--shadow);
}
.row{padding:14px 15px;border-bottom:1px solid var(--line);}
.row:last-child{border-bottom:none;}
.row-k{
  font-size:12px;
  font-weight:700;
  letter-spacing:.1em;
  color:var(--green);
  margin-bottom:5px;
}
.row-v{font-size:14px;}
.row-n{font-size:12.5px;color:var(--ink-soft);margin-top:5px;}

/* ---------- 評価（◎○△） ---------- */
.rate{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:10px;
}
.rate-b{
  width:32px;
  height:32px;
  border-radius:50%;
  border:1px solid var(--line);
  background:#fff;
  color:var(--ink-soft);
  font-family:inherit;
  font-size:14px;
  line-height:1;
  cursor:pointer;
  transition:background .15s,border-color .15s,color .15s;
}
.rate-b:hover{border-color:var(--ink-soft);}
/* ◎定番=目立つからし色 / ○また=緑 / △好みじゃない=控えめグレー */
.rate-b[aria-pressed="true"].r-good{background:var(--mustard);border-color:var(--mustard);color:#fff;font-weight:700;}
.rate-b[aria-pressed="true"].r-ok{background:var(--green);border-color:var(--green);color:#fff;font-weight:700;}
.rate-b[aria-pressed="true"].r-no{background:#B9B3A8;border-color:#B9B3A8;color:#fff;}
.rate-label{font-size:11.5px;color:var(--ink-soft);letter-spacing:.02em;}
.rate-label.r-good{color:var(--mustard);font-weight:700;}
.rate-label.r-ok{color:var(--green);font-weight:700;}
.rate-label.r-no{color:#8D8677;}

/* △のカード（次は作らない） */
.dish.is-no{background:#F3F1EA;opacity:.8;}
.no-flag{
  font-size:11px;
  color:#8D8677;
  border:1px dashed #B9B3A8;
  border-radius:4px;
  padding:2px 6px;
  white-space:nowrap;
  line-height:1.5;
}

/* ---------- 記録 ---------- */
.mark{
  font-family:inherit;
  font-size:12.5px;
  font-weight:500;
  padding:7px 13px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--ink-soft);
  cursor:pointer;
  margin-top:10px;
}
.mark[data-on="1"]{background:var(--mustard);border-color:var(--mustard);color:#fff;font-weight:700;}
.clear{
  font-family:inherit;
  font-size:12.5px;
  color:var(--ink-soft);
  background:none;
  border:1px solid var(--line);
  border-radius:6px;
  padding:8px 14px;
  cursor:pointer;
  margin-top:6px;
}

/* ---------- 注意書き ---------- */
.care{
  background:var(--panel);
  border-left:3px solid var(--green);
  border-radius:0 6px 6px 0;
  padding:14px 16px;
  font-size:13px;
  line-height:1.9;
  color:var(--ink-soft);
  margin:18px 0 24px;
}
.care b{color:var(--ink);font-weight:700;}

/* ---------- フッター（共通） ---------- */
.foot{
  text-align:center;
  font-size:11.5px;
  color:var(--ink-soft);
  padding:30px 20px 10px;
  letter-spacing:.05em;
}

@media (min-width:720px){
  body{font-size:15.5px;}
  .rim,.ask,.wrap{max-width:760px;margin-left:auto;margin-right:auto;}
  .rim{max-width:none;}
  .rim > *{max-width:760px;margin-left:auto;margin-right:auto;}
  .tabs{justify-content:center;}
}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important;}
}
