:root{
  --bg:#f8efe4;

  --text:#442a16;
  --muted:#6b6b6b;
  --accent:#ae4a2b;

  --card:#fffaf4;
  --soft:#f7ecdf;

  --shadow:
    0 8px 28px rgba(0,0,0,.08);

  --radius:20px;

  --content-w:1200px;
}

/* =========================
   Base
========================= */

*{
  box-sizing:border-box;
}

body{
  margin:0;

  background:var(--bg);

  color:var(--text);

  font-family:
    "Noto Sans JP",
    "Noto Sans SC",
    sans-serif;

  line-height:1.9;
}

a{
  color:inherit;
}

/* =========================
   Page
========================= */

.page{
  width:100%;
}

/* =========================
   Top site link
========================= */

.site-top{
  display:flex;
  align-items:center;
  justify-content:center;

  margin:14px auto 10px;

  color:rgba(0,0,0,1);
  font-size:20px;
  font-weight:500;
  line-height:1;
}

.site-link{
  color:inherit;
  text-decoration:none;
}

.site-link:hover{
  opacity:.6;
}

.site-link:focus-visible{
  outline:3px solid rgba(178,59,47,.55);
  outline-offset:3px;
  border-radius:6px;
}

/* =========================
   Hero
========================= */

.hero{
  position:relative;

  width:min(var(--content-w), calc(100% - 48px));

  height:340px;

  margin:
    0 auto
    0;

  border-radius:28px;

  overflow:hidden;

  background-image:
    url("images/overview_hero.jpg");

  background-size:cover;
  background-position:center;

  box-shadow:var(--shadow);
}

/* Hero overlay */

.hero::after{
  content:"";

  position:absolute;

  left:0;
  right:0;
  bottom:0;

  height:120px;

  background:
    linear-gradient(
      to top,
      rgba(40,22,10,.72),
      rgba(40,22,10,.12),
      transparent
    );
}

/* Hero text */

.hero-inner{
  position:absolute;

  left:40px;
  bottom:18px;

  z-index:2;
}

.hero-sub{
  color:rgba(255,255,255,.94);

  font-size:22px;
  font-weight:700;
  line-height:1.5;
}

/* =========================
   Main content
========================= */

.wrap{
  width:min(var(--content-w), calc(100% - 48px));

  margin:
    52px auto
    80px;

  display:flex;
  flex-direction:column;

  gap:56px;
}

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

.section{
  display:flex;
  flex-direction:column;

  gap:8px;
}

.section--expandable{
  height:auto;
}

.bar-title{
  position:relative;

  padding-left:22px;

  font-size:26px;
  font-weight:700;
  line-height:1.25;
}

.bar-title::before{
  content:"";

  position:absolute;

  left:0;
  top:1px;

  width:8px;
  height:30px;

  background:var(--accent);
}

/* =========================
   Content card
========================= */

.overview-card{
  display:flex;

  gap:34px;

  padding:34px;

  border-radius:24px;

  background:var(--card);

  box-shadow:var(--shadow);
}

/* Card variant: image + text */

.overview-card--with-image{
  flex-direction:row;
}

/* Card variant: text only */

.overview-card--text-only{
  flex-direction:column;
}

.overview-card--text-only .overview-content{
  width:100%;
}

/* Card image */

.overview-image{
  flex:0 0 420px;
}

.overview-image a{
  display:block;
  width:100%;
  height:100%;
}

.overview-image a{
  position:relative;
}

.overview-image a::before{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  width:86px;
  height:86px;
  transform:translate(-50%, -50%);
  border-radius:50%;
  background:rgba(0, 0, 0, .28);
  backdrop-filter:blur(2px);
  z-index:1;
}

.overview-image a::after{
  content:"";
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-38%, -50%);
  border-top:22px solid transparent;
  border-bottom:22px solid transparent;
  border-left:34px solid rgba(255, 255, 255, .82);
  z-index:2;
}

.overview-image img{
  width:100%;
  height:100%;

  min-height:280px;

  object-fit:cover;

  border-radius:18px;

  display:block;
}

/* Card text */

.overview-content{
  flex:1;

  display:flex;
  flex-direction:column;

  justify-content:center;
}

.overview-text{
  font-size:16px;
  line-height:2;

  text-align:justify;
}

.marker-route{
  padding:0 4px;
  background:#FCE7CE;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}

.classification-note{
  margin-top:22px;

  color:rgba(68, 42, 22, .72);
  font-size:14px;
  line-height:1.8;
}

.note-alert{
  color:#B7472A;
  font-weight:600;
}
/* =========================
   Classification example
========================= */

.classification-example{
  width:100%;

  margin-top:12px;

  display:flex;
  flex-direction:column;

  gap:16px;
}

/* 第一行：類・部門・中項目・分類項目 */
.classification-header{
  display:grid;
  grid-template-columns:117px 287px 160px 1fr;
  gap:15px;
}

.class-head{
  height:55px;

  display:flex;
  align-items:center;
  justify-content:center;

  padding:10px 24px;

  border-radius:16px;
  background:rgba(204,204,204,.3);

  color:var(--brown-deep, #331b08);
  font-size:20px;
  font-weight:500;
}

/* 下方主体：高度以左列“他”的底部为基准 */
.classification-body{
  display:grid;
  grid-template-columns:117px 287px 160px 1fr;
  gap:15px;

  height:429px;      /* 96px × 4 + 15px × 3 */
  overflow:visible;
}

/* 各列共同设定 */
.class-col{
  display:flex;
  flex-direction:column;
  gap:15px;

  height:100%;
  overflow:visible;
}

/* 单元格共同设定 */
.class-cell{
  display:flex;
  align-items:center;
  justify-content:center;

  padding:10px 24px;

  border-radius:16px;

  color:var(--brown-deep, #331b08);
  font-size:22px;
  line-height:1.5;
  text-align:center;
}

/* 第一列：4个，固定 96px */
.class-col-1 .class-cell{
  width:117px;
  height:96px;
}

/* 第二列：5个，压入 429px 内 */
.class-col-2 .class-cell{
  width:287px;
  height:calc((429px - 15px * 4) / 5);
}

/* 第三列：5个，压入 429px 内 */
.class-col-3 .class-cell{
  width:160px;
  height:calc((429px - 15px * 4) / 5);
}

/* 第四列：4个，压入 429px 内 */
.class-col-4{
  gap:15px;
}

.class-col-4 .class-item-card{
  height:calc((429px - 15px * 4) / 5);
}

/* 背景色 */
.cell-white{
  background:#fff;
}

.cell-muted{
  background:rgba(204,204,204,.3);
}

.cell-warm{
  background:rgba(248,232,213,1);
}

.classification-body .class-col-2 .class-cell:not(:nth-child(3)),
.classification-body .class-col-3 .class-cell:not(:first-child),
.classification-body .class-col-4 .class-item-card:not(:nth-child(4)){
  background:#fff;
}

.classification-body .class-col-1 .class-cell:first-child,
.classification-body .class-col-2 .class-cell:nth-child(3),
.classification-body .class-col-3 .class-cell:first-child,
.classification-body .class-col-4 .class-item-card:nth-child(4){
  position:relative;
  z-index:1;
  border-radius:14px;
  background:#FCE7CE;
  box-shadow:
    12px 12px 18px rgba(174, 101, 45, 0.20),
    5px 5px 8px rgba(120, 67, 28, 0.10),
    -3px -3px 8px rgba(255, 255, 255, 0.72),
    inset 1px 1px 0 rgba(255, 255, 255, 0.62);
}

.classification-body .class-col-2 .class-cell:not(.cell-white),
.classification-body .class-col-3 .class-cell:not(.cell-white),
.classification-body .class-col-4 .class-item-card:not(:nth-child(4)){
  color:rgba(173, 118, 118, 0.6);
}

.classification-body .class-col-4 .class-item-card:nth-child(4){
  color:rgba(51,27,8,1);
}




/* 第四列卡片 */
.class-item-card{
  width:100%;

  display:flex;
  flex-direction:column;
  justify-content:center;

  padding:10px 24px;

  border-radius:16px;
  background:#fff;

  color:rgba(51,27,8,1);

  overflow:hidden;
}

/* 第四列第一行主标题 */
.class-item-title{
  font-size:20px;
  font-weight:400;
  line-height:1.4;

  white-space:normal;
  overflow:visible;
  text-overflow:unset;
}

/* 第四列说明 */
.class-item-detail{
  margin-top:2px;

  font-size:13px;
  line-height:1.4;

  overflow:hidden;
}





/* =========================
   Global tooltip
========================= */

.has-tip{
  cursor:help;
}

.global-tooltip{
  position:fixed;
  top:0;
  left:0;

  min-width:260px;
  max-width:min(520px, calc(100vw - 32px));

  padding:12px 16px;

  border-radius:12px;

  background:rgba(51,27,8,.96);
  color:#fff;

  font-size:14px;
  font-weight:400;
  line-height:1.8;
  text-align:left;

  white-space:normal;
  word-break:break-word;

  box-shadow:0 10px 28px rgba(0,0,0,.24);

  opacity:0;
  visibility:hidden;

  pointer-events:none;

  z-index:2147483647;

  transition:
    opacity .14s ease,
    visibility .14s ease;
}

.global-tooltip.is-visible{
  opacity:1;
  visibility:visible;
}

@media (max-width:640px){
  .global-tooltip{
    min-width:220px;
    max-width:calc(100vw - 28px);

    padding:11px 14px;

    font-size:13px;
    line-height:1.7;
  }
}


/* =========================
   Footer
========================= */

.footer{
  width:100%;
  height:240px;

  margin-top:90px;

  background:rgba(98, 60, 14, 1);
  color:rgba(255,255,255,.92);
}

.footer-inner{
  width:min(var(--content-w), 100%);
  margin:0 auto;
  padding:28px 18px;

  display:flex;
  flex-wrap:wrap;
  gap:24px;
  align-items:flex-start;
  justify-content:space-between;
}

.footer-brand{
  min-width:260px;
  flex:1 1 360px;
}

.footer-brand .name{
  margin:0 0 10px;

  font-size:18px;
  font-weight:600;
  letter-spacing:1px;
}

.footer-brand .desc{
  margin:0;

  color:rgba(255,255,255,.75);
  font-size:13px;
  line-height:1.7;
}

.footer-brand .desc a{
  color:rgba(255,255,255,.92);
  text-decoration:none;
}

.footer-brand .desc a:hover{
  text-decoration:underline;
}

/* =========================
   Responsive: tablet
========================= */

@media (max-width:980px){

  .hero{
    height:300px;
  }

  .overview-card,
  .overview-card--with-image{
    flex-direction:column;
  }

  .overview-image{
    flex:none;
  }

  .overview-image img{
    min-height:220px;
  }
}

/* =========================
   Responsive: mobile
========================= */

@media (max-width:640px){

  .hero{
    width:calc(100% - 28px);

    height:260px;

    margin-top:0;

    border-radius:20px;
  }

  .hero-inner{
    left:18px;
    right:18px;
    bottom:18px;
  }

  .hero-sub{
    font-size:18px;
  }

  .wrap{
    width:calc(100% - 28px);

    margin-top:38px;

    gap:42px;
  }

  .footer{
    height:auto;
    margin-top:64px;
  }

  .footer-inner{
    padding:28px 18px 20px;
    gap:22px;
  }

  .bar-title{
    font-size:22px;
  }

  .overview-card{
    padding:20px;
  }

  .overview-text{
    font-size:15px;
  }
}

/* =========================
   Intro card: image + full text
========================= */

.overview-card--intro{
  gap:28px;
  align-items:stretch;
}

.overview-image--narrow{
  flex:0 0 420px;
  aspect-ratio:16 / 9;
}

.overview-image--narrow a{
  height:100%;
}

.overview-image--narrow img{
  min-height:0;
}

.overview-content--intro{
  justify-content:center;
  min-width:0;
}

.overview-text--intro{
  font-size:15px;
  line-height:1.75;
  text-align:justify;
}

.overview-text--intro p{
  margin:0 0 10px;
}

.overview-text--intro p:last-child{
  margin-bottom:0;
}

@media (max-width:980px){

  .overview-card--intro{
    gap:24px;
  }

  .overview-image--narrow{
    flex:none;
    width:100%;
    aspect-ratio:16 / 9;
  }

  .overview-image--narrow img{
    min-height:0;
  }

  .overview-text--intro{
    font-size:15px;
    line-height:1.8;
  }
}

@media (max-width:640px){

  .overview-text--intro{
    font-size:14px;
    line-height:1.75;
  }

  .overview-text--intro p{
    margin-bottom:10px;
  }
}

@media (max-width:980px){

  .classification-example{
    overflow-x:auto;
    padding-bottom:6px;
  }

  .classification-header,
  .classification-body{
    width:1180px;
    grid-template-columns:117px 287px 160px 1fr;
  }
}
