/* ===== Minimal, tidy CSS (preview) ===== */
:root{
  --w: 980px;
  --line: #e5e5e5;
  --text: #111;
  --muted: #666;
  --bg: #fff;
}
*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; color:var(--text); font-family: "Zen Kaku Gothic New", -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif; background:#fff; }
a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.dsp_pc{ display:block; }
.dsp_sp{ display:none; }

.rainbow-bar{
  height: 6px;
  background: linear-gradient(90deg,#ff5aa5 0 12%,#ffd35a 12% 24%,#79dff2 24% 36%,#b28dff 36% 48%,#a3f7bf 48% 60%,#ff7b54 60% 72%,#ff5aa5 72% 100%);
}

/* Header base */
.global-header{
  background: rgba(255,255,255,.96);
}
.global-header .hd-info,
.global-header .middle-wrap{
  width: var(--w);
  margin: 0 auto;
  position: relative;
}
.global-header .hd-info,
.global-header .middle-wrap{
  display:flex;
  justify-content: space-between;
  align-items: center;
}
.global-header .hd-info{
  padding: 10px 0 6px;
}
.global-header .hd-info h1{
  margin:0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

/* middle wrap (allow nav to drop to next line) */
.global-header .middle-wrap{
  flex-wrap: wrap;
  padding: 10px 0 0;
  min-height: 58px; /* space for absolute search */
}

/* logo */
.logo-wrap{
  display:flex;
  align-items:center;
  gap: 14px;
  justify-content:center;
  flex: 1 1 auto;
}
.logo-img{
  display:flex;
  align-items:center;
  gap: 10px;
}
.logo-dummy{
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffe3ef;
  border: 1px solid #ffd0e2;
}
.logo-text{
  font-weight: 700;
  font-size: 1.25rem;
  color: #ff5aa5;
}

/* search: absolute on PC */

@media only screen and (min-width: 1001px){
  .middle-wrap .search-form{
    display:block !important;
    position:absolute;
    top: 15px;
    right: 0;
  }
}
.search-form form{
  display:flex;
  gap: 6px;
  align-items:center;
}
.search-form input{
  width: 240px;
  height: 32px;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 0 10px;
  font-size: 0.8125rem;
}
.search-form button{
  height: 32px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #f7f7f7;
  cursor:pointer;
  font-size: 0.8125rem;
}

/* header navi: full viewport width bar */
.header_navi{
  display:flex;
  justify-content:center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background-color: rgba(255,255,255,.9);
  width: 100%;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 10px;
  padding: 8px 0;
}
@media only screen and (min-width: 1000px){
  .header_navi{
    width: 100vw;
    margin: 0 calc(50% - 50vw);
    margin-top: 10px;
  }
}
.header_navi p{ margin:0; }
.header_navi a{
  font-size: 0.8125rem;
  color:#111;
}

/* SP menu button */
.sp_btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background:#fff;
}

/* Main layout */
.wrap{ padding: 18px 0 40px; }
.content{
  width: var(--w);
  margin: 0 auto;
  display:grid;
  grid-template-columns: 1fr 300px;
  gap: 30px;
}

.sec-title{
  font-size: 1.75rem;
  margin: 0 0 14px;
  font-weight: 800;
}
.postlist{ display:grid; gap: 18px; }
.postcard{
  display:grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  align-items: start;
}
.postcard__thumb{
  height: 100px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fafafa;
}
.postcard__meta{
  display:flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted);
}
.postcard__cat{
  font-weight: 700;
}
.postcard__title{
  margin-top: 6px;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.35;
}
.postcard__excerpt{
  margin-top: 6px;
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.6;
  display:-webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.pager{
  display:flex;
  justify-content:center;
  gap: 8px;
  margin-top: 18px;
}
.pager__btn{
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8125rem;
  background:#fff;
}
.pager__btn.is-current{
  background:#f7f7f7;
  font-weight: 800;
}

/* Sidebar */
.sidebox{
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
  background:#fff;
}
.sidebox__title{
  margin: 0 0 10px;
  font-size: 0.9375rem;
  font-weight: 800;
}
.rank{ margin:0; padding-left: 18px; display:grid; gap: 8px; font-size: 0.8125rem; }
.cat{ margin:0; padding-left: 18px; display:grid; gap: 8px; font-size: 0.8125rem; }

/* Footer */
.footer{
  border-top: 1px solid var(--line);
  padding: 26px 0;
  background:#fff;
}
.footer__inner{
  width: var(--w);
  margin: 0 auto;
}
.footer__cols{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.footer__hd{
  font-weight: 800;
  color: #111;
  margin-bottom: 10px;
}
.footer__copy{
  margin-top: 18px;
  text-align:center;
  font-size: 0.75rem;
  color: var(--muted);
}

/* Responsive */
@media (max-width: 1000px){
  :root{ --w: 92vw; }
  .dsp_pc{ display:none; }
  .dsp_sp{ display:block; }
  .global-header .middle-wrap{ padding: 10px 0; }
  .logo-wrap{ justify-content: space-between; width: 100%; }
  .hero__inner{ grid-template-columns: 1fr; }
  .hero__item{ height: 120px; }
  .content{ grid-template-columns: 1fr; }
  .postcard{ grid-template-columns: 140px 1fr; }
  .footer__cols{ grid-template-columns: 1fr; }
}

/* SP drawer (footer links) */
.sp_nav{
  border-top: 1px solid var(--line);
  background:#fff;
}
.sp_nav__inner{
  width: var(--w);
  margin: 0 auto;
  padding: 14px 0 18px;
  position: relative;
  display: grid;
  gap: 14px;
}
.sp_nav__close{
  position:absolute;
  top: 6px;
  right: 0;
  border: 1px solid #ddd;
  background:#fff;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor:pointer;
}
.sp_nav__section{
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.sp_nav__hd{
  font-weight: 800;
  font-size: 0.875rem;
  margin-bottom: 2px;
}
.sp_nav__section a{
  font-size: 0.875rem;
  color: #111;
  text-decoration: none;
}
.sp_nav__section a:hover{
  text-decoration: underline;
}


/* ===== Hamburger button (SP only) ===== */
.sp_btn{ display:none; border:0; background:transparent; cursor:pointer; padding:0; }
@media (max-width: 1000px){
  .sp_btn{ display:inline-flex; align-items:center; gap:8px; }
}
.hamb{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:3px;
}
.hamb span{
  display:block;
  width: 16px;
  height: 2px;
  background:#ff5aa5;
}
.sp_btn__label{
  font-size: 0.75rem;
  color:#666;
}

/* ===== SP drawer overlay (not in layout flow) ===== */
.sp_nav{ display:none; }
.sp_nav[hidden]{ display:none !important; }

@media (max-width: 1000px){
  .sp_nav{
    display:block;
    position: fixed;
    inset: 0;
    z-index: 9999;
  }
  .sp_nav__backdrop{
    position:absolute;
    inset:0;
    background: rgba(0,0,0,.35);
  }
  .sp_nav__panel{
    position:absolute;
    right:0;
    top:0;
    height:100%;
    width: min(86vw, 360px);
    background:#fff;
    padding: 14px;
    overflow:auto;
  }
}


/* ===== Hamburger refinements ===== */
.hamb{
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  flex-direction:column;
  gap:4px;
}
.hamb span{
  display:block;
  width: 18px;
  height: 2px;
  background:#ff5aa5;
}
.hamb__label{
  margin-top: 2px;
  font-size: 0.625rem;
  line-height: 1;
  color:#666;
  letter-spacing: .02em;
}

/* hide old external label if still present anywhere */
.sp_btn__label{ display:none !important; }

/* ===== Drawer slide-in animation ===== */
@media (max-width: 1000px){
  .sp_nav__panel{
    transform: translateX(100%);
    transition: transform .22s ease;
    will-change: transform;
  }
  .sp_nav.is-open .sp_nav__panel{
    transform: translateX(0);
  }
  .sp_nav__backdrop{
    opacity: 0;
    transition: opacity .22s ease;
  }
  .sp_nav.is-open .sp_nav__backdrop{
    opacity: 1;
  }
}


/* ===== Hamburger balance fix (center + 3 bars only) ===== */
.hamb{
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 3px;
}
.hamb__icon{
  display:grid;
  gap: 3px;
  align-items:center;
  justify-items:center;
}
.hamb__bar{
  display:block;
  width: 18px;
  height: 2px;
  background:#ff5aa5;
  border-radius: 2px;
}
.hamb__label{
  font-size: 0.625rem;
  line-height: 1;
  color:#666;
  letter-spacing: .02em;
  margin-top: 1px;
}

/* kill any legacy bar styling accidentally applied */
.hamb span{ background: none; height:auto; width:auto; }
.hamb__bar{ background:#ff5aa5; height:2px; width:18px; }


/* ===== Hamburger hotfix (force bars visible) ===== */
.hamb .hamb__icon{
  display:grid;
  gap: 4px;
  align-items:center;
  justify-items:center;
  line-height: 0;
}
.hamb .hamb__bar{
  display:block !important;
  width: 18px !important;
  height: 2px !important;
  background: #ff5aa5 !important;
  border-radius: 2px;
}


/* ===== PC eyecatch policy: 3:2 ===== */
@media (min-width: 1001px){
  .postcard__thumb{
    aspect-ratio: 3 / 2;
    height: auto;
  }
}

/* ===== Title size requirement ===== */
.postcard__title{
  font-size: 1.5rem;
}
@media (min-width: 1001px){
  .postcard__title{
    font-size: 1.5rem;
  }
}


/* ===== Postcard: prevent overlap + PC thumb height 180px ===== */
.postcard{
  position: relative;
}
.postcard__body{
  min-width: 0;
}
.postcard__title{
  word-break: break-word;
}

/* PC */
@media (min-width: 1001px){
  .postcard{
    align-items: start;
  }
  .postcard__thumb{
    height: 180px;
    aspect-ratio: 3 / 2;
    width: 100%;
  }
}

/* ===== SP: screenshot-like card (thumb -> title -> left-bottom date) + subtle separators ===== */
@media (max-width: 1000px){
  .postlist{ gap: 0; }
  .postcard{
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 1rem 0;
    border-top: 0.0625rem solid rgba(0,0,0,.06);
    border-bottom: 0.0625rem solid rgba(0,0,0,.06);
  }
  .postcard__thumb{
    height: auto;
    aspect-ratio: 3 / 2;
  }
  .postcard__meta{
    display:none; /* keep SP simple like screenshot */
  }
  .postcard__title{
    font-size: 1.25rem; /* slightly smaller on SP */
    line-height: 1.35;
    margin-top: 0;
  }
  .postcard__excerpt{
    display:none; /* screenshot style focuses on title */
  }
  .postcard__date{
    font-size: 0.875rem;
    color: var(--muted);
  }
}


/* ===== SP refinements: title ~1rem, date bottom-right, add padding to content ===== */
@media (max-width: 1000px){
  .content{
    padding: 1rem;
  }
  .postcard{
    padding: 1rem 0;
  }
  .postcard__title{
    font-size: 1rem;
  }
  .postcard__date{
    text-align: right;
  }
}


/* ===== PC hotfix: force 3:2 (270x180) to avoid square thumbs ===== */
@media (min-width: 1001px){
  .postcard{
    grid-template-columns: 270px 1fr;
    gap: 1.25rem;
    align-items: start;
  }
  .postcard__thumb{
    width: 270px;
    height: 180px;
    aspect-ratio: auto;
  }
  .postcard__thumb img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}


/* ===== SP final: date under title (left) + smaller size ===== */
@media (max-width: 1000px){
  .postcard__body{
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }
  .postcard__title{ order: 1; }
  .postcard__date{
    order: 2;
    text-align: left;
    font-size: 0.775rem;
    line-height: 1.2;
    margin-top: -0.15rem; /* tuck closer to title */
  }
}


/* ===== SP final-final: date under title (RIGHT) ===== */
@media (max-width: 1000px){
  .postcard__date{
    text-align: right;
    align-self: flex-end;
    font-size: 0.775rem;
    line-height: 1.2;
  }
}


/* ===== Theme additions for WP templates (minimal, match existing style) ===== */
.archive-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 1000px){
  .archive-grid{ grid-template-columns: 1fr; }
}
.archive-link{ display:block; }
.archive-thumb{
  border: 0.0625rem solid var(--line);
  border-radius: 0.625rem;
  overflow:hidden;
  aspect-ratio: 3 / 2;
  background:#fafafa;
}
.archive-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.archive-title{ margin-top: 0.5rem; font-weight: 800; font-size: 1rem; line-height: 1.35; }
.archive-date{ margin-top: 0.25rem; font-size: 0.775rem; color: var(--muted); text-align:right; }

.single-thumb{
  border: 0.0625rem solid var(--line);
  border-radius: 0.75rem;
  overflow:hidden;
  background:#fafafa;
}
.single-thumb img{ width:100%; height:auto; display:block; }
.single-title{ font-size: 2rem; line-height: 1.25; margin: 1rem 0 0.5rem; font-weight: 900; }

.entry{ font-size: 1rem; line-height: 1.9; }
.entry img{ max-width:100%; height:auto; }

.toc-list, .toc-sub{ margin:0; padding-left: 1.25rem; display:grid; gap: 0.5rem; }
.toc-sub{ margin-top: 0.5rem; }
.toc a{ text-decoration:none; }
.toc a:hover{ text-decoration:underline; }

.rel-scroll{
  display:flex;
  gap: 0.75rem;
  overflow-x:auto;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width:none;
}
.rel-scroll::-webkit-scrollbar{ display:none; }
.rel-card{
  flex: 0 0 12rem;
  border: 0.0625rem solid var(--line);
  border-radius: 0.75rem;
  padding: 0.5rem;
  background:#fff;
}
.rel-thumb{
  border-radius: 0.625rem;
  overflow:hidden;
  aspect-ratio: 3 / 2;
  background:#fafafa;
  border: 0.0625rem solid var(--line);
}
.rel-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.rel-title{ margin-top: 0.5rem; font-weight: 800; font-size: 0.95rem; line-height: 1.35; }

.sp16{ height: 1rem; }
.sp24{ height: 1.5rem; }
.hr{ height: 0.0625rem; background: var(--line); margin: 0.75rem 0; }
.box{ border: 0.0625rem solid var(--line); border-radius: 0.75rem; background:#fff; }
.pad{ padding: 1rem; }

@media (max-width: 1000px){
  /* user wants左右だけpadding: adjust on mobile */
  .content{ padding: 0 1rem; }
}


/* ===== Fix: SP postcard thumbnail sizing (force 3:2 with cover) ===== */
.postcard__thumb{
  position: relative;
  overflow: hidden;
  border-radius: 0.625rem;
  background: #fafafa;
}
.postcard__thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1000px){
  .postcard__thumb{
    aspect-ratio: 3 / 2;
  }
}


/* ===== Sidebar: remove list bullets in sidebox ===== */
.sidebox ul, .sidebox ol{
  list-style: none;
  margin: 0;
  padding-left: 0;
}
.sidebox li{ margin: 0; padding: 0; }

/* ===== Footer: layout tidy + prevent overlap ===== */
.footer{
  position: relative;
  z-index: 1;
  margin-top: 2rem;
}
.footer__inner{ max-width: 980px; margin: 0 auto; padding: 2rem 1rem; }
.footer__cols{ display:grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.5rem; }
@media (max-width: 1000px){
  .footer__cols{ grid-template-columns: 1fr; }
}
.footer__logo{
  display:flex;
  align-items:center;
  gap: 0.75rem;
}
.footer__logo-box{
  width: 140px;
  max-width: 100%;
}
.footer__logo-box img{
  width: 100%;
  height: auto;
  display:block;
}
.footer__logo-dummy{
  width: 140px;
  height: 40px;
  border: 0.0625rem solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
}
