/* =========================
   甜々工房 共通CSS
   3段固定上部ナビ版
   ========================= */

:root{
  --bg:#ffffff;
  --sub:#f5f7fa;
  --line:#d8dee8;
  --text:#222222;
  --subtext:#5b6677;
  --accent:#2f6fb3;
  --accent-bg:#eaf3ff;
  --max:1100px;
  --reading:760px;

  --nav-row1:44px;
  --nav-row2:44px;
  --nav-row3:44px;
  --nav-total:132px;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

body{
  margin:0;
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", "Yu Gothic", Meiryo, sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.7;
}

img{
  display:block;
  max-width:100%;
  height:auto;
}

a{
  color:var(--accent);
  text-decoration:none;
}

a:hover{
  text-decoration:underline;
}

a:focus-visible,
button:focus-visible{
  outline:3px solid rgba(47,111,179,0.28);
  outline-offset:2px;
}

/* =========================
   3段固定ナビ
   ========================= */
.top-nav{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:1000;
  background:rgba(255,255,255,0.96);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(8px);
}

.top-nav-row{
  display:flex;
  align-items:center;
  gap:8px;
  min-height:44px;
  padding:6px 12px;
  border-bottom:1px solid var(--line);
  overflow-x:auto;
  overflow-y:hidden;
  white-space:nowrap;
  scrollbar-width:thin;
}

.top-nav-row:last-child{
  border-bottom:none;
}

.top-nav-row::-webkit-scrollbar{
  height:8px;
}

.top-nav-row::-webkit-scrollbar-thumb{
  background:#cfd8e3;
  border-radius:999px;
}

.site-brand{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:max-content;
}

.site-title{
  font-size:1rem;
  font-weight:700;
  color:var(--text);
}

.top-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--text);
  background:#fff;
  text-decoration:none;
}

.top-link.current,
.group-tab.current,
.sub-link.current{
  background:var(--accent-bg);
  border-color:#bcd5f5;
  color:var(--accent);
}

.group-tab{
  appearance:none;
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  border-radius:999px;
  min-height:32px;
  padding:0 12px;
  font:inherit;
  cursor:pointer;
  white-space:nowrap;
}

.sub-links{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:max-content;
}

.sub-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:32px;
  padding:0 12px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--text);
  background:#fff;
  text-decoration:none;
}

/* =========================
   本文
   ========================= */
.page{
  padding-top:calc(var(--nav-total) + 24px);
}

.container{
  max-width:var(--max);
  margin:0 auto;
  padding:0 16px 48px;
}

.reading{
  max-width:var(--reading);
}

.hero{
  margin-bottom:28px;
  padding:24px;
  border:1px solid var(--line);
  border-radius:14px;
  background:linear-gradient(to bottom, #ffffff, #f9fbff);
}

.hero h1{
  margin:0 0 10px;
  font-size:clamp(1.6rem, 2.8vw, 2.4rem);
  line-height:1.35;
}

.hero p{
  margin:0;
  color:var(--subtext);
}

.section{
  margin-top:30px;
}

.section h2{
  margin:0 0 14px;
  padding-left:10px;
  border-left:4px solid var(--accent);
  font-size:1.4rem;
  line-height:1.4;
}

.section p{
  margin:0 0 12px;
}

.info-box{
  padding:18px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}

.info-box + .info-box{
  margin-top:16px;
}

.info-box h3{
  margin:0 0 10px;
  font-size:1.05rem;
}

.grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:16px;
}

.card{
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  overflow:hidden;
}

.card a{
  display:block;
  color:inherit;
  text-decoration:none;
}

.card a:hover{
  text-decoration:none;
}

.thumb{
  width:100%;
  aspect-ratio:4 / 3;
  background:#eef2f7;
  overflow:hidden;
  border-bottom:1px solid var(--line);
}

.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.card-body{
  padding:14px;
}

.card-body h3{
  margin:0 0 8px;
  font-size:1rem;
  line-height:1.4;
}

.card-body p{
  margin:0;
  color:var(--subtext);
  font-size:0.92rem;
}

.note{
  color:var(--subtext);
  font-size:0.94rem;
}

.button-row{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:14px;
}

.button-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:0 16px;
  border:1px solid var(--accent);
  border-radius:10px;
  background:var(--accent);
  color:#fff;
  text-decoration:none;
  font-weight:700;
}

.button-link.sub{
  background:#fff;
  color:var(--accent);
}

.footer{
  margin-top:36px;
  padding-top:18px;
  border-top:1px solid var(--line);
  color:var(--subtext);
  font-size:0.92rem;
}

/* スマホ調整 */
@media (max-width: 900px){
  :root{
    --nav-row1:48px;
    --nav-row2:48px;
    --nav-row3:48px;
    --nav-total:144px;
  }

  .grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .hero{
    padding:20px;
  }
}

@media (max-width: 640px){
  .container{
    padding:0 12px 36px;
  }

  .grid{
    grid-template-columns:1fr;
  }

  .hero h1{
    font-size:1.5rem;
  }

  .button-row{
    flex-direction:column;
  }

  .button-link{
    width:100%;
  }
}