/* Scoped reader remake. Original gallery and thumbnail behavior stays intact. */
.blog-home .masthead {
  display: block;
  height: 400px;
  min-height: 0;
  padding: 0;
  margin-top: 18px;
  border: 0;
  border-radius: 0;
  background: #f2f4f3;
  box-shadow: none;
}
.blog-home .masthead::before, .blog-home .masthead::after { content: none; }
.diary-hero-gallery { position: absolute; inset: 0; overflow: hidden; }
.diary-hero-image { position: absolute; inset: 0; width: 66%; height: 100%; object-fit: cover; object-position: 50% 48%; opacity: 0; transition: opacity 800ms ease; }
.diary-hero-ramen { position: absolute; top: 0; right: 0; width: 34%; height: 100%; border-left: 6px solid #fff; object-fit: cover; object-position: center; transition: opacity 800ms ease; }
.diary-hero-image.is-current { opacity: 1; }
.diary-hero-image[data-kind="illustration"] { width: 100%; }
.diary-hero-gallery.is-illustration .diary-hero-ramen { opacity: 0; }
.blog-home .masthead-copy { position: absolute; z-index: 2; isolation: isolate; left: 32px; bottom: 26px; padding: 0; max-width: calc(100% - 64px); text-align: left; }
.blog-home .masthead-copy::before { content: ''; position: absolute; z-index: -1; inset: -8px -16px -12px; background: rgb(26 25 22 / 44%); filter: blur(16px); pointer-events: none; }
.blog-home .masthead h1 { margin: 0; font-size: 62px; font-weight: 900; font-family: 'M PLUS Rounded 1c', sans-serif; line-height: 1.24; white-space: nowrap; letter-spacing: 0; color: #fff4d3; -webkit-text-stroke: 2px #302824; paint-order: stroke fill; text-shadow: 0 4px 0 #302824, 0 6px 12px rgb(0 0 0 / 22%); }
.blog-home .masthead h1 em { display: inline-block; font-style: normal; color: #ed5947; -webkit-text-stroke: 5px #fff4d3; text-shadow: 0 5px 0 #302824; margin: 0 2px; }
.blog-home .masthead-date, .blog-home .masthead-text { color: #fff; text-shadow: 0 1px 3px #25251f; padding: 0; letter-spacing: 0; }
.blog-home .masthead-date { width: fit-content; margin: 0 0 9px; padding: 2px 0 2px 10px; border-left: 3px solid #ee6253; font-size: 12px; font-weight: 700; }
.blog-home .masthead-text { display: block; margin: 12px 0 0; font-size: 14px; line-height: 1.5; font-weight: 500; text-align: left; }
.diary-hero-controls { position: absolute; z-index: 4; right: 12px; top: 12px; display: flex; align-items: center; gap: 5px; }
.diary-hero-caption { color: #fff; background: rgb(23 29 24 / 85%); padding: 5px 9px; font-size: 11px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.diary-hero-controls button { width: 44px; height: 44px; padding: 0; border: 1px solid #fff; border-radius: 50%; color: #fff; background: #242b29; font: 20px/1 sans-serif; cursor: pointer; }
.diary-hero-controls button:disabled { opacity: .5; cursor: wait; }
.diary-hero-controls button:hover { background: #943d31; }
.diary-hero-controls button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.diary-intro { display: none; }
.intro-pending .diary-intro:not([hidden]) { display: grid; position: fixed; z-index: 1000; inset: 0; place-items: center; background: #fffdf8; pointer-events: auto; }
.diary-intro-art { width: min(820px, 100%); opacity: 0; }
.diary-intro img { display: block; width: 100%; height: auto; }
.diary-intro-brand { margin: 18px 12px; color: #2b2824; font: 900 38px/1.3 'M PLUS Rounded 1c', sans-serif; letter-spacing: 0; text-align: center; white-space: nowrap; }
.diary-intro-brand span { color: #bf3e30; }
.diary-intro-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: 1px solid #b5b0aa; border-radius: 50%; background: #fff; color: #242b29; font: 26px/1 sans-serif; pointer-events: auto; cursor: pointer; }
.diary-intro.is-ready { animation: intro-dissolve 2560ms ease-in-out both; }
.diary-intro.is-ready .diary-intro-art { animation: intro-arrive 420ms ease-out both; }
@keyframes intro-arrive { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes intro-dissolve { 0%, 70% { opacity: 1; } 100% { opacity: 0; visibility: hidden; transform: scale(1.035); filter: blur(5px); } }
.category-tabs { position: static; margin: 0 0 12px; padding: 0; background: none; box-shadow: none; }
.category-tab { min-height: 44px; letter-spacing: 0; }
.affiliate-shelf { padding: 16px 0; margin: 20px 0; border: 0; border-top: 1px solid #e1e3df; border-bottom: 1px solid #e1e3df; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
.affiliate-shelf::before, .affiliate-shelf::after { content: none; }
.affiliate-shelf__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; padding: 0; margin: 0 0 10px; }
.affiliate-shelf__head h2 { font-size: 17px; line-height: 1.5; text-shadow: none; letter-spacing: 0; }
.affiliate-shelf__label { padding: 0; background: none; border-radius: 0; font-size: 11px; letter-spacing: 0; }
.affiliate-shelf__head p:not(.affiliate-shelf__label) { display: none; }
.affiliate-product-rail { gap: 10px; }
.affiliate-product-card { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; border-radius: 8px; background: #fff; box-shadow: none; min-width: 0; }
.affiliate-product-card:hover, .affiliate-product-card:focus-visible { transform: translateY(-2px); box-shadow: none; }
.affiliate-product-card__visual { width: 80px; height: 108px; min-height: 0; aspect-ratio: auto; background: #fff; }
.affiliate-product-card__visual img { opacity: 1; object-fit: contain; padding: 6px; transform: none; }
.affiliate-product-card__visual::after { left: 4px; top: 2px; padding: 1px 4px; font-size: 9px; border-radius: 2px; }
.affiliate-product-card__body { min-width: 0; gap: 4px; padding: 10px 8px; }
.affiliate-product-card__provider { font-size: 10px; line-height: 1.3; letter-spacing: 0; }
.affiliate-product-card__body b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 13px; line-height: 1.45; }
.affiliate-product-card__body em { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 11px; line-height: 1.5; }
.affiliate-product-card__cta { padding: 0; margin-top: 3px; border: 0; border-radius: 0; background: none; font-size: 12px; line-height: 1.6; }
.affiliate-policy-link { margin-top: 8px; font-size: 11px; }
.archive-page:has(#ramen-list) .page-title { padding: 24px 0 18px; }
.archive-page:has(#ramen-list) .page-title h1 { font-size: 34px; letter-spacing: 0; }
.archive-page:has(#ramen-list) .page-title::after { content: none; }
#ramen-list { padding: 14px 0; margin-top: 0; }
#ramen-list::before { content: none; }
#ramen-archive-list { gap: 8px; }
#ramen-list .archive-year-block { scroll-margin-top: 110px; padding: 0; border: 0; border-radius: 0; background: none; }
#ramen-list .archive-year-block__title { min-height: 56px; padding: 10px 0; border-bottom: 1px solid #dce0dd; cursor: pointer; font-size: 20px; }
#ramen-list .archive-year-block > .archive-year-block__title::after,
#ramen-list .archive-year-block:not([open]) > .archive-year-block__title::after { display: none; content: none; }
#ramen-list .archive-card a { border-radius: 8px; box-shadow: none; background: #fff; }
.cat-page .cat-records-section { padding: 24px 0 14px; margin-top: 0; }
.cat-page .cat-records-section::before { content: none; }
.cat-page .cat-records-section h1 { font-size: 34px; line-height: 1.4; letter-spacing: 0; }
.cat-page .cat-year-list { gap: 8px; margin-top: 22px; }
.cat-page .archive-year-block { padding: 0; border: 0; border-radius: 0; background: none; scroll-margin-top: 100px; }
.cat-page .archive-year-block__title { min-height: 56px; padding: 10px 0; border-bottom: 1px solid #ddd9da; font-size: 20px; letter-spacing: 0; }
.cat-page .archive-year-block > .archive-year-block__title::after,
.cat-page .archive-year-block:not([open]) > .archive-year-block__title::after { display: none; content: none; }
.archive-year-block__title .year-toggle { margin-left: auto; font: 24px/1 sans-serif; }
.year-toggle::before { content: '+'; }
.archive-year-block[open] .year-toggle::before { content: '−'; }
.archive-year-block__title:focus-visible { outline: 3px solid #226ba1; outline-offset: 3px; }
.entry-type--cat { color: #97425f; }
.entry-row--cat .entry-row-copy h3 { color: #97425f; }
@media (max-width: 1000px) and (min-width: 761px) { .affiliate-product-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .blog-home .masthead { height: 280px; margin-top: 10px; }
  .archive-page:has(#ramen-list) .page-title h1 { font-size: 28px; }
  .diary-hero-image { width: 100%; object-position: 50% 49%; }
  .diary-hero-ramen { display: none; }
  .blog-home .masthead-copy { left: 14px; bottom: 16px; max-width: calc(100% - 28px); }
  .blog-home .masthead h1 { font-size: 36px; -webkit-text-stroke-width: 1px; }
  .blog-home .masthead h1 em { -webkit-text-stroke-width: 3px; }
  .blog-home .masthead-date { font-size: 11px; margin-bottom: 6px; }
  .blog-home .masthead-text { font-size: 12px; margin-top: 6px; }
  .diary-hero-controls { right: 8px; top: 8px; gap: 4px; }
  .diary-hero-caption { font-size: 10px; padding: 4px 6px; }
  .diary-intro-brand { font-size: 30px; }
  .cat-page .cat-records-section h1 { font-size: 28px; }
  .category-tabs { padding: 0; margin-bottom: 8px; gap: 6px; }
  .category-tab { min-height: 44px; padding: 5px 12px; font-size: 13px; }
  .featured-copy > p:not(.entry-type), .entry-row-copy p:not(.entry-type):not(.entry-meta) { font-size: 13px; line-height: 1.6; }
  .entry-row-copy time, .entry-meta, .entry-meta time { font-size: 12px; }
  .featured-copy .entry-type, .entry-row-copy .entry-type { font-size: 11px; }
  .affiliate-shelf { margin: 14px 0; padding: 12px 0; }
  .affiliate-shelf__head { display: flex; margin-bottom: 8px; gap: 4px 8px; }
  .affiliate-shelf__head h2 { font-size: 15px; }
  .affiliate-product-rail { display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(294px, 88%); overflow-x: auto; gap: 8px; padding: 0 0 4px; scroll-snap-type: x mandatory; }
  .affiliate-product-card { grid-template-columns: 88px minmax(0, 1fr); min-height: 136px; width: auto; scroll-snap-align: start; }
  .affiliate-product-card__visual { width: 88px; height: 110px; }
  .affiliate-product-card__body { padding: 8px; }
  .affiliate-product-card__body b { -webkit-line-clamp: 2; font-size: 13px; }
  .affiliate-product-card__body em { font-size: 11px; }
  .affiliate-product-card__cta { font-size: 12px; }
}
@media (max-width: 350px) { .blog-home .masthead h1 { font-size: 32px; } }
@media (prefers-reduced-motion: reduce) {
  .diary-hero-image, .diary-hero-ramen { transition: none; }
  .intro-pending .diary-intro { display: none; }
}
