/* =========================================================
   base.css
   共通：変数 / リセット / レイアウト / 共通UIコンポーネント
   ========================================================= */

/* =========================
   Design tokens
   ========================= */

:root{
  --bg-main:#f7f7f5;
  --bg-card:#ffffff;
  --bg-soft:#f9fafb;

  --text-main:#111827;
  --text-muted:#6b7280;
  --text-soft:#9ca3af;

  --pette-blue:#6F9CD1;
  --pette-teal:#A5CFCB;
  --pette-green:#B4E3D3;
  --pette-yellow:#F4E7C6;
  --pette-orange:#F6C19F;
  --pette-red:#F4A8A3;

  --accent-main:#7FA2C9;
  --accent-main-deep:#7399BF;
  --accent-soft:#eef4fa;
  --accent-border:#d4e0ee;

  --border-soft:#e5e7eb;
  --border-subtle:#e2e8f0;

  --radius-card:16px;
  --radius-soft:12px;
  --radius-chip:6px;

  --shadow-soft:0 10px 24px rgba(15,23,42,0.08);
  --shadow-chip:0 3px 10px rgba(15,23,42,0.06);
}

/* =========================
   Reset / base
   ========================= */

*{ box-sizing:border-box; }

body{
  margin:0;
  background:var(--bg-main);
  font-family:'Noto Sans JP',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  font-size:16px;
  line-height:1.55;
  color:var(--text-main);
  font-feature-settings:"lnum";
}

/* =========================
   Typography helpers
   ========================= */

.num-font,
.nutri-value,
.nutri-label-small,
.meta-small{
  font-family:'Inter','Helvetica Neue',Arial,sans-serif;
  font-variant-numeric: tabular-nums;
}

/* =========================
   Layout
   ========================= */

.wrapper{
  max-width:480px;
  margin:0 auto;
  padding:16px 16px 40px;
}

@media (min-width:768px){
  .wrapper{ padding-top:24px; }
}

/* =========================
   Link rules（全ページ統一）
   - 下線は「本文リンク」だけに限定
   ========================= */

a{
  color:inherit;
  text-decoration:none;
}

a:focus-visible{
  outline:2px solid var(--accent-soft);
  outline-offset:2px;
}

/* 本文ブロック（文章）だけリンクを強調 */
.prose a,
.section-note a,
.form-help a,
.content-text a{
  color:var(--accent-main-deep);
}

.prose a:hover,
.section-note a:hover,
.form-help a:hover,
.content-text a:hover{
  text-decoration:underline;
}

/* 戻るリンク（detail / contact / 静止ページ統一） */
.back-link{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;

  padding:6px 6px;
  border-radius:10px;
  -webkit-tap-highlight-color:transparent;

  color:var(--text-main);
  text-decoration:none;
}

.back-link:visited,
.back-link:hover,
.back-link:active{
  color:var(--text-main);
  text-decoration:none;
}

@media (hover:hover){
  .back-link:hover{ background:var(--bg-soft); }
}
.back-link:active{ background:var(--bg-soft); }

/* =========================
   Header（ui_nav）
   ========================= */

.site-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:14px;
  padding-top:2px;
}

.logo img{
  height:52px;
  width:auto;
  display:block;
}

.menu-button{
  width:42px;
  height:42px;
  border:1px solid var(--border-soft);
  border-radius:999px;
  background:rgba(255,255,255,0.92);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:3px;
  cursor:pointer;
  box-shadow:0 1px 3px rgba(15,23,42,0.04);
  padding:0;
  -webkit-tap-highlight-color:transparent;
}

.menu-button span{
  height:2px;
  width:18px;
  background:#374151;
  border-radius:999px;
}

/* =========================
   Footer（ui_footer）
   ========================= */

footer{
  border-top:1px solid var(--border-soft);
  padding-top:10px;
  margin-top:18px;
  font-size:12px;
  color:var(--text-muted);
}

.footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:4px;
}

.footer-links a{
  color:var(--text-muted);
  text-decoration:none;
}

.footer-report{
  margin-top:8px;
}

.footer-report a{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:12px;
  color:var(--accent-main-deep);
  text-decoration:none;
}

.footer-report a span.icon{
  font-family:'Material Symbols Rounded';
  font-size:16px;
}

/* =========================
   Page header（common）
   ========================= */

.page-header{ margin:4px 0 12px; }

.page-label{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:3px 10px;
  border-radius:var(--radius-chip);
  background:var(--accent-soft);
  border:1px solid var(--accent-border);
  font-size:11px;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.page-label-dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--accent-main);
}

.page-title{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:20px;
  font-weight:700;
  margin:8px 0 4px;
}

.page-title-icon{
  font-family:'Material Symbols Rounded';
  font-size:22px;
  line-height:1;
  color:var(--accent-main);
}

.page-desc{
  font-size:13px;
  color:var(--text-muted);
  margin:0;
  line-height:1.7;
}

/* =========================
   Section common
   ========================= */

.section{ margin-top:14px; }

.section-title{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 8px;
  font-size:18px;
  font-weight:900;
  color:var(--text-main);
}

.section-title-icon{
  font-family:'Material Symbols Rounded';
  font-size:20px;
  line-height:1;
}

.section-note{
  margin:0 0 12px;
  font-size:13px;
  color:var(--text-muted);
  line-height:1.7;
}

/* back row（共通：戻るリンク行） */
.back-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:6px 0 12px;
}

.back-link-icon{
  font-family:'Material Symbols Rounded';
  font-size:18px;
  line-height:1;
  color:var(--text-muted);
}

/* =========================
   Forms（共通）
   ========================= */

.form-card{
  background:var(--bg-card);
  border:1px solid rgba(226,232,240,0.9);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-soft);
  padding:16px 14px;
}

.form-row{ margin-top:12px; }
.form-row:first-child{ margin-top:0; }

.form-label{
  display:block;
  font-size:13px;
  font-weight:700;
  margin-bottom:6px;
}

.form-input,
.form-textarea,
.form-select{
  width:100%;
  border:1px solid var(--border-soft);
  border-radius:12px;
  padding:10px 12px;
  font-size:14px;
  background:#fff;
  color:var(--text-main);
  outline:none;
}

.form-textarea{
  min-height:140px;
  resize:vertical;
}

.form-help{
  margin-top:6px;
  font-size:12px;
  color:var(--text-muted);
  line-height:1.6;
}

/* buttons（共通） */
.form-actions{
  margin-top:14px;
  display:flex;
  gap:10px;
  align-items:center;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border:1px solid transparent;
  border-radius:8px;
  padding:10px 14px;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
  text-decoration:none;
  transition:transform .15s ease, background .15s ease;
}

.btn-primary{
  background:var(--accent-main);
  color:#fff;
}

.btn-primary:hover{ transform:translateY(-1px); }

.btn-ghost{
  background:#fff;
  border-color:var(--border-soft);
  color:var(--text-main);
}

.btn-ghost:hover{ background:var(--bg-soft); }

/* info list（about / terms / privacy） */
.form-card .info-row{
  display:flex;
  gap:12px;
  margin-top:8px;
  font-size:13px;
}
.form-card .info-row:first-child{ margin-top:0; }

.form-card .info-label{
  min-width:88px;
  color:var(--text-muted);
  font-weight:500;
  font-size:13px;
}

.form-card .info-value{
  color:var(--text-main);
  line-height:1.7;
  font-size:13px;
}

/* =========================
   Pagination（common）
   ========================= */

.pagination{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.page-numbers{
  display:flex;
  align-items:center;
  gap:6px;
}

.page-btn,
.page-number{
  display:inline-flex;
  align-items:center;
  justify-content:center;

  height:34px;
  padding:0 12px;

  border-radius:var(--radius-chip);
  border:1px solid var(--border-soft);
  background:var(--bg-card);

  font-size:12px;
  line-height:1;
  color:var(--text-main);

  text-decoration:none;
  -webkit-tap-highlight-color:transparent;
}

.page-number{
  min-width:34px;
  padding:0 10px;
}

.page-btn.disabled{
  opacity:.45;
  pointer-events:none;
}

.page-number.active{
  background:var(--accent-soft);
  border-color:var(--accent-border);
  color:var(--accent-main-deep);
  font-weight:600;
}

@media (hover:hover){
  .page-btn:hover,
  .page-number:hover{
    background:var(--bg-soft);
    text-decoration:none;
  }
}

/* =========================
   Product list card（common）
   - .product-card 内だけに効かせて、detail とは衝突させない
   ========================= */

.product-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:12px;
}

.product-card{
  display:flex;
  gap:10px;

  background:var(--bg-card);
  border-radius:var(--radius-card);
  border:1px solid rgba(226,232,240,0.9);

  padding:10px 12px;
  color:inherit;
  text-decoration:none;
}

.product-main{ flex:1; min-width:0; }

.product-card .product-title{
  font-size:14px;
  font-weight:900;
  margin:0 0 2px;
}

.product-card .product-sub{
  font-size:12px;
  color:var(--text-muted);
  margin:0 0 6px;
}

.product-card .product-tags{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:4px;
}

.product-card .product-tag{
  padding:3px 8px;
  border-radius:var(--radius-chip);
  background:#f3f4f6;
  font-size:11px;
  color:#4b5563;
}

.product-card .product-meta{
  font-size:11px;
  color:var(--text-soft);
}

.product-thumb{
  width:64px;
  height:64px;
  border-radius:12px;
  background:var(--bg-soft);
  overflow:hidden;

  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
}

.product-thumb img{
  width:100%;
  height:100%;
  object-fit:contain;
}

/* 一覧のミニ栄養行（searchなどで使用） */
.product-nutrition{
  display:flex;
  flex-wrap:wrap;
  gap:6px 10px;
  margin-top:4px;
  font-size:11px;
  color:var(--text-soft);
}

.product-nutrition.is-empty{ opacity:.8; }

/* =========================
   Drawer menu (nav)
   ========================= */

.drawer-overlay{
  position:fixed;
  inset:0;
  background:rgba(17,24,39,0.24);
  backdrop-filter: blur(2px);
  z-index:80;
}

.drawer{
  position:fixed;
  top:0;
  right:0;
  height:100%;
  width:min(360px, 92vw);

  background:var(--bg-card);
  border-left:1px solid var(--border-soft);

  transform:translateX(104%);
  transition:transform .22s ease;
  z-index:90;

  display:flex;
  flex-direction:column;
}

.drawer.is-open{
  transform:translateX(0);
}

.drawer-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;

  padding:14px 14px 12px;
  border-bottom:1px solid var(--border-soft);
}

.drawer-title{
  display:flex;
  align-items:center;
  gap:8px;
  font-weight:900;
  font-size:14px;
}

.drawer-title .material-symbols-rounded{
  font-size:20px;
  color:var(--accent-main);
  line-height:1;
}

.drawer-close{
  border:none;
  background:transparent;
  padding:6px;
  border-radius:10px;
  cursor:pointer;
  -webkit-tap-highlight-color: transparent;
}

@media (hover:hover){
  .drawer-close:hover{ background:var(--bg-soft); }
}

.drawer-nav{
  padding:10px 10px 14px;
  overflow:auto;
}

.drawer-link{
  display:flex;
  align-items:center;
  gap:10px;

  padding:10px 10px;
  border-radius:12px;
  text-decoration:none;
  color:inherit;

  border:1px solid transparent;
}

.drawer-link .material-symbols-rounded{
  font-size:20px;
  line-height:1;
  color:var(--text-muted);
}

.drawer-link-text{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.drawer-link-main{
  font-size:13px;
  font-weight:800;
  color:var(--text-main);
  line-height:1.2;
}

.drawer-link-sub{
  font-size:11px;
  color:var(--text-muted);
  line-height:1.4;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.drawer-link-arrow{
  color:var(--text-soft) !important;
}

@media (hover:hover){
  .drawer-link:hover{
    background:var(--bg-soft);
    border-color:var(--border-soft);
  }
}

.drawer-sep{
  height:1px;
  background:var(--border-soft);
  margin:10px 6px;
  opacity:.9;
}

.drawer-cta{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;

  margin:10px 4px 6px;
  padding:12px 12px;

  border-radius:14px;
  background:var(--accent-main);
  color:#fff;
  font-weight:900;
  text-decoration:none;
  border:1px solid transparent;
}

.drawer-cta .material-symbols-rounded{
  font-size:18px;
  line-height:1;
  color:#fff;
}

@media (hover:hover){
  .drawer-cta:hover{
    background:var(--accent-main-deep);
  }
}

.drawer-foot{
  margin-top:10px;
  padding:8px 6px 0;
}

.drawer-foot-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;

  font-size:12px;
  color:var(--text-muted);

  padding:6px 10px;
  border-radius:999px;
  background:var(--bg-soft);
  border:1px solid var(--border-soft);
}

.drawer-foot-dot{
  width:7px;
  height:7px;
  border-radius:999px;
  background:var(--pette-green);
}

/* ==============================
   Info Tooltip（共通）
============================== */

.apr-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  cursor: pointer;
}

.apr-info .material-symbols-rounded {
  font-size: 18px;
  color: var(--text-soft);
  vertical-align: middle;
}

.apr-tooltip {
  display: none;
  position: absolute;
  top: 28px;
  left: 0;
  width: 260px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  z-index: 50;
}

/* PC hover */
@media (hover: hover) {
  .apr-info:hover .apr-tooltip {
    display: block;
  }
}

/* モバイル用（タップ対応のため表示制御用クラス） */
.apr-info.is-open .apr-tooltip {
  display: block;
}


/* ----------------------
追加CSS
後ほど整理
------------------------ */

.top-category-subnav {
  margin-top: 16px;
}

.top-category-subnav-title {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.top-category-subnav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.top-category-subnav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  text-decoration: none;
}

.top-category-subnav-links a:hover {
  text-decoration: underline;
}

.top-category-subnav-more {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--pette-blue);
  text-decoration: none;
}

.top-category-subnav-more:hover {
  text-decoration: underline;
}


/* =========================
   Static / info pages common
   about / terms / privacy / contact
   ========================= */

/* PC時は index と同じ幅感に寄せる */
@media (min-width: 768px){
  .wrapper{
    max-width: 760px;
    padding-bottom: 48px;
  }
}

/* ページ冒頭 */
.page-intro{
  margin: 0 0 18px;
}

.page-intro-title{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 10px;
  font-size:22px;
  font-weight:800;
  line-height:1.35;
  letter-spacing:-0.01em;
  color:var(--text-main);
}

.page-intro-title .material-symbols-rounded{
  font-size:22px;
  line-height:1;
  color:var(--accent-main-deep);
  flex:0 0 auto;
}

.page-intro-lead{
  margin:0;
  font-size:14px;
  line-height:1.85;
  color:var(--text-muted);
}

/* 共通カード */
.section-card{
  background:var(--bg-card);
  border:1px solid var(--border-soft);
  border-radius:12px;
  padding:16px 14px;
  box-shadow:0 1px 3px rgba(15,23,42,0.04);
}

.card-title{
  margin:0 0 12px;
  font-size:18px;
  font-weight:800;
  line-height:1.4;
  letter-spacing:-0.01em;
  color:var(--text-main);
}

/* 本文 */
.content-text{
  margin:0;
  font-size:14px;
  line-height:1.9;
  color:var(--text-muted);
}

.content-text + .content-text{
  margin-top:10px;
}

.content-text a{
  color:var(--accent-main-deep);
  text-decoration:none;
}

.content-text a:hover{
  text-decoration:underline;
}

/* 注意ボックス */
.note-box{
  margin-top:14px;
  background:#edf3ff;
  border:1px solid #cfe0fb;
  border-radius:12px;
  padding:12px;
}

.note-box .content-text,
.note-box-text{
  margin:0;
  font-size:13px;
  line-height:1.8;
  color:#4b5563;
}

/* 箇条書きボックス */
.list-box{
  margin-top:12px;
  padding:12px 12px 12px 16px;
  background:var(--bg-soft);
  border:1px solid var(--border-soft);
  border-radius:12px;
}

.list-box ul{
  margin:0;
  padding-left:18px;
  color:var(--text-muted);
  font-size:14px;
  line-height:1.9;
}

.list-box li + li{
  margin-top:4px;
}

/* 情報行 */
.info-list{
  display:flex;
  flex-direction:column;
  gap:0;
}

.info-row{
  display:flex;
  gap:12px;
  padding:10px 0;
  border-top:1px solid #edf0f3;
}

.info-row:first-child{
  border-top:none;
  padding-top:0;
}

.info-label{
  min-width:88px;
  font-size:13px;
  line-height:1.8;
  color:var(--text-muted);
}

.info-value{
  flex:1;
  min-width:0;
  font-size:14px;
  line-height:1.8;
  color:var(--text-main);
}

.info-value a{
  color:var(--accent-main-deep);
  text-decoration:none;
}

.info-value a:hover{
  text-decoration:underline;
}

/* hover */
@media (hover:hover) and (pointer:fine){
  .section-card:hover{
    box-shadow:0 2px 8px rgba(15,23,42,0.05);
    border-color:#d7dfe8;
  }
}

/* desktop adjust */
@media (min-width: 768px){
  .page-intro-title{
    font-size:26px;
  }

  .section-card{
    padding:18px 16px;
  }

  .info-row{
    gap:20px;
  }

  .info-label{
    min-width:110px;
  }
}

/* =========================
   PETTE tip balloon（common）
   ========================= */

.pette-tip{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:14px;
}

.pette-tip-icon{
  width:48px;
  height:48px;
  object-fit:contain;
  flex:0 0 auto;
  filter:drop-shadow(0 2px 4px rgba(0,0,0,0.08));
}

.pette-tip-balloon{
  position:relative;
  background:#f9fafb;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:10px 14px;
  font-size:13px;
  line-height:1.7;
  color:#374151;
  flex:1;
  box-shadow:0 2px 10px rgba(15,23,42,0.05);
}

.pette-tip-balloon::before{
  content:"";
  position:absolute;
  left:-8px;
  top:16px;
  width:0;
  height:0;
  border-top:8px solid transparent;
  border-bottom:8px solid transparent;
  border-right:8px solid #e5e7eb;
}

.pette-tip-balloon::after{
  content:"";
  position:absolute;
  left:-7px;
  top:16px;
  width:0;
  height:0;
  border-top:8px solid transparent;
  border-bottom:8px solid transparent;
  border-right:8px solid #f9fafb;
}

.pette-tip-title{
  margin:0 0 4px;
  font-size:13px;
  font-weight:800;
  color:var(--text-main);
}

.pette-tip-text{
  margin:0;
  font-size:12.5px;
  color:#4b5563;
  line-height:1.7;
}