/* V26: New articles before search. No change to V20 image guard. */
body[data-page="home"] .pc21-home-hub{padding:14px 18px!important;margin:24px auto 12px!important;background:#fafcfd!important;border:1px solid #e4eaf0!important;box-shadow:none!important;border-radius:12px!important}
body[data-page="home"] .pc21-overline,body[data-page="home"] .pc21-hub-note{display:none!important}
body[data-page="home"] .pc21-hub-title{font-size:1.08rem!important;line-height:1.4!important;margin:0 0 10px!important}
body[data-page="home"] .pc21-quick-links{gap:7px!important;margin:0 0 10px!important}
body[data-page="home"] .pc21-quick-link{padding:8px 10px!important;min-height:40px!important;font-size:.87rem!important}
body[data-page="home"] .pc21-home-search{max-width:650px;gap:8px!important}
body[data-page="home"] .pc21-home-search input,body[data-page="home"] .pc21-home-search button{min-height:40px!important;padding:8px 11px!important}
body[data-page="home"] .pc21-hub-more{margin-top:8px!important;font-size:.83rem!important}
.pc26-feed-card .pc26-text-thumb{display:flex;align-items:center;justify-content:center;min-height:95px;background:#f0f4f7;color:#3b6479;font-weight:700;font-size:1rem}
.pc26-card-meta{font-size:.76rem;color:#60737f;display:flex;gap:10px;margin:0 0 5px}
.pc26-article-columns{display:block;max-width:1000px;margin-inline:auto}
.pc26-new-article .article-head{margin-bottom:20px}
.pc26-entry{font-size:1rem;line-height:1.85;overflow-wrap:anywhere}
.pc26-entry .pc26-table-scroll{max-width:100%;overflow-x:auto;margin:18px 0;-webkit-overflow-scrolling:touch}
.pc26-entry table{width:100%;border-collapse:collapse;min-width:460px;font-size:.92rem}
.pc26-entry th,.pc26-entry td{border:1px solid #d9e2e8;padding:8px 11px;vertical-align:top;text-align:left}
.pc26-entry th{background:#f1f5f8}
.pc26-entry pre{max-width:100%;overflow:auto;padding:14px;background:#162332;color:#f3f7fa;border-radius:8px;line-height:1.5;font-size:.87rem}
.pc26-entry pre code{white-space:pre}
.pc26-entry a{overflow-wrap:anywhere}
@media(max-width:760px){body[data-page="home"] .pc21-home-hub{padding:12px!important;margin:16px 0 4px!important}body[data-page="home"] .pc21-quick-links{grid-template-columns:repeat(4,minmax(0,1fr))!important}body[data-page="home"] .pc21-quick-link{justify-content:center!important;font-size:.75rem!important;padding:7px 4px!important}body[data-page="home"] .pc21-quick-arrow{display:none!important}body[data-page="home"] .pc21-home-search{grid-template-columns:minmax(0,1fr) auto!important}.pc26-entry table{font-size:.83rem}.pc26-feed-card .pc26-text-thumb{min-height:75px}}


/* PCSONOTA_V27_LAYOUT_FIX: geometric invariants, no article or image-guard edits */
/* The old featured-card nth-child rules become invalid when a new newest card is prepended. */
body[data-page="home"] main .feed-grid {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  grid-auto-flow: row !important;
  grid-auto-rows: auto !important;
  align-items: stretch !important;
  gap: 14px !important;
}
body[data-page="home"] main .feed-grid > .feed-card {
  grid-column: auto !important;
  grid-row: auto !important;
  grid-area: auto !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  overflow: hidden;
}
body[data-page="home"] main .feed-grid > .feed-card .feed-card__link {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 0 !important;
}
body[data-page="home"] main .feed-grid > .feed-card .feed-card__thumb {
  display: block;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 16/9 !important;
  flex: 0 0 auto;
  overflow: hidden;
  background: #edf2f6;
}
body[data-page="home"] main .feed-grid > .feed-card .feed-card__thumb img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
body[data-page="home"] main .feed-grid > .feed-card .pc26-text-thumb {
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #295675;
  font-weight: 700;
}
body[data-page="home"] main .feed-grid > .feed-card .feed-card__body {
  display: block !important;
  flex: 1 1 auto;
  padding: 12px 14px !important;
  min-width: 0 !important;
  width: 100% !important;
}
body[data-page="home"] main .feed-grid > .feed-card h3 {
  font-size: 1rem !important;
  line-height: 1.55 !important;
  margin: 4px 0 6px !important;
  overflow-wrap: anywhere;
}
body[data-page="home"] main .feed-grid > .feed-card p {
  font-size: .8rem !important;
  line-height: 1.6 !important;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}
/* V26 centered the whole body separately from the title. Restore the left edge. */
body[data-page="article"] .pc26-new-article .pc26-article-columns {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  grid-template-columns: none !important;
}
body[data-page="article"] .pc26-new-article .article-body {
  display: block !important;
  grid-column: auto !important;
  max-width: 800px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
body[data-page="article"] .pc26-new-article .entry-content {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}
@media(max-width:980px) and (min-width:641px){
  body[data-page="home"] main .feed-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:640px){
  body[data-page="home"] main .feed-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px!important}
  body[data-page="home"] main .feed-grid > .feed-card .feed-card__thumb{aspect-ratio:16/9!important}
  body[data-page="home"] main .feed-grid > .feed-card h3{font-size:.96rem!important}
  body[data-page="article"] .pc26-new-article .article-body{max-width:100%!important}
}


/* PCSONOTA_V29_RESTORE_FEATURED_HOME: restore V25-style image-led home layout.
   The V26/V27 article-body alignment fixes are intentionally left intact.
   On desktop, the first photographic card becomes the feature; the new image-less
   Optane article stays visible as a smaller card on the right.
*/
@media (min-width: 1081px) {
  body[data-page="home"] main .feed-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    grid-auto-rows: auto !important;
    align-items: stretch !important;
    gap: 14px !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) {
    grid-column: 1 / span 2 !important;
    grid-row: 1 / span 2 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(1) {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(3) {
    grid-column: 4 !important;
    grid-row: 1 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(4) {
    grid-column: 3 !important;
    grid-row: 2 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(5) {
    grid-column: 4 !important;
    grid-row: 2 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) .feed-card__thumb {
    aspect-ratio: 16 / 10 !important;
    width: 100% !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) .feed-card__body {
    padding: 15px 18px !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) h3 {
    font-size: 1.13rem !important;
    line-height: 1.5 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(1) .pc26-text-thumb {
    aspect-ratio: 16 / 9 !important;
    min-height: 0 !important;
  }
}
@media (max-width: 1080px) and (min-width: 641px) {
  body[data-page="home"] main .feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}
@media (max-width: 640px) {
  body[data-page="home"] main .feed-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}


/* PCSONOTA_V31_FEATURE_IMAGE_FILL
   Make the V29 featured image fill the tall two-row card instead of inheriting
   the short thumbnail's fixed image height. Scope: home desktop, 2nd card only.
   All other article pages and the V20 image availability guard remain unchanged.
*/
@media (min-width: 1081px) {
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) .feed-card__link {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    gap: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    align-items: stretch !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) .feed-card__thumb {
    position: relative !important;
    display: block !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: stretch !important;
    justify-self: stretch !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    flex: none !important;
    overflow: hidden !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) .feed-card__thumb img {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center 48% !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) .feed-card__body {
    grid-column: 1 !important;
    grid-row: 2 !important;
    flex: none !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 15px 18px !important;
  }
}


/* PCSONOTA_V33_LATEST_FEATURE: The newest article is always the first/largest card.
   When it has a photo, preserve V31's image-dominant feature design.
   For image-less articles use an editorial title/summary treatment, not a blank placeholder.
   Desktop only: mobile/tablet retain the existing sequential one/two-column feed. */
@media (min-width: 1081px) {
  body[data-page="home"] main .feed-grid {
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
    grid-auto-flow: row !important;
    grid-auto-rows: auto !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child {
    grid-column: 1 / span 2 !important;
    grid-row: 1 / span 2 !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }
  /* Remove V29/V31's hard-coded second-card feature rules. */
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(3) {
    grid-column: 4 !important;
    grid-row: 1 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(4) {
    grid-column: 3 !important;
    grid-row: 2 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(5) {
    grid-column: 4 !important;
    grid-row: 2 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) .feed-card__link {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-rows: none !important;
    height: 100% !important;
    min-height: 0 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) .feed-card__thumb {
    position: static !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 16 / 9 !important;
    flex: 0 0 auto !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) .feed-card__thumb img {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) .feed-card__body {
    grid-column: auto !important;
    grid-row: auto !important;
    flex: 1 1 auto !important;
    padding: 12px 14px !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:nth-child(2) h3 {
    font-size: 1rem !important;
  }
  /* Image-bearing latest article: exactly the V31 large image treatment. */
  body[data-page="home"] main .feed-grid > .feed-card:first-child:has(.feed-card__thumb img) .feed-card__link {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) auto !important;
    height: 100% !important;
    min-height: 0 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:has(.feed-card__thumb img) .feed-card__thumb {
    position: relative !important;
    display: block !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    flex: none !important;
    overflow: hidden !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:has(.feed-card__thumb img) .feed-card__thumb img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center 48% !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:has(.feed-card__thumb img) .feed-card__body {
    grid-column: 1 !important;
    grid-row: 2 !important;
    flex: none !important;
    min-height: 0 !important;
    padding: 15px 18px !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:has(.feed-card__thumb img) h3 {
    font-size: 1.13rem !important;
    line-height: 1.5 !important;
  }
  /* No-image latest article: readable feature, not a giant gray thumbnail. */
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) {
    background: linear-gradient(145deg,#f3f7fa 0%,#f9fbfc 60%,#eaf2f7 100%) !important;
    border: 1px solid #d9e6ee !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) .feed-card__link {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    height: 100% !important;
    min-height: 400px !important;
    padding: clamp(24px,3.4vw,50px) !important;
    box-sizing: border-box !important;
    gap: 0 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) .feed-card__thumb {
    position: static !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    grid-column: auto !important;
    grid-row: auto !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    flex: none !important;
    padding: 7px 14px !important;
    border: 1px solid #c9dbe8 !important;
    border-radius: 999px !important;
    background: #e3eef5 !important;
    color: #265a77 !important;
    font-weight: 700 !important;
    font-size: .88rem !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) .feed-card__body {
    grid-column: auto !important;
    grid-row: auto !important;
    flex: 0 0 auto !important;
    width: 100% !important;
    height: auto !important;
    margin: clamp(18px,2.6vw,32px) 0 0 !important;
    padding: 0 !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) .feed-card__body::before {
    content: "最新記事";
    display: block;
    margin-bottom: 13px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .1em;
    color: #376e8d;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) .pc26-card-meta {
    font-size: .84rem !important;
    margin-bottom: 10px !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) h3 {
    font-size: clamp(1.35rem,2.25vw,2.05rem) !important;
    font-weight: 750 !important;
    line-height: 1.48 !important;
    margin: 4px 0 16px !important;
    overflow-wrap: anywhere !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) p {
    display: block !important;
    font-size: .95rem !important;
    line-height: 1.9 !important;
    max-width: 48ch !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 4 !important;
    line-clamp: 4 !important;
    color: #425d6d !important;
  }
}
@media (max-width: 1080px) {
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) {
    background: linear-gradient(145deg,#f3f7fa,#eaf2f7) !important;
    border: 1px solid #d9e6ee !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) .feed-card__link {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    align-items: flex-start !important;
    padding: clamp(16px,3vw,28px) !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) .feed-card__thumb {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    padding: 6px 12px !important;
    border-radius: 999px !important;
    background: #e3eef5 !important;
    color: #265a77 !important;
    font-size: .84rem !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) .feed-card__body {
    width: 100% !important;
    padding: 16px 0 0 !important;
    flex: 0 0 auto !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) .feed-card__body::before {
    content: "最新記事";
    display: block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: #376e8d;
    margin-bottom: 9px;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) h3 {
    font-size: clamp(1.15rem,2.3vw,1.42rem) !important;
    line-height: 1.55 !important;
    margin-bottom: 10px !important;
  }
  body[data-page="home"] main .feed-grid > .feed-card:first-child:not(:has(.feed-card__thumb img)) p {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    overflow: hidden !important;
    font-size: .86rem !important;
    line-height: 1.75 !important;
  }
}
