/*
Theme Name: Nippon Yell
Theme URI: 
Author: Nippon Yell
Author URI: 
Description: 日本エールグミ の自作クラシックテーマ。
Version: 1.6.86
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nippon-yell
Tags: custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
  --ny-black: #1a1614;
  --ny-gray: #4a433c;
  --ny-beige: #f7f3ee;
  --ny-cream: #fffdf9;
  --ny-line: #e4ddd4;
  --ny-accent: #c8102e;
  --ny-accent-hover: #9e0c24;
  --ny-muted: #6b635c;
  --ny-header: #1a1614;
  --ny-radius: 10px;
  --ny-max: 1120px;
  --ny-gap: 2.5rem;
  --ny-font: "Noto Sans JP", "游ゴシック", "YuGothic", "ヒラギノ角ゴ Pro", "Hiragino Kaku Gothic Pro", "メイリオ", Meiryo, Osaka, "ＭＳ Ｐゴシック", "MS PGothic", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ny-black);
  font-family: var(--ny-font);
  font-size: 16px;
  line-height: 1.8;
  letter-spacing: 0.08em;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

a {
  color: var(--ny-accent);
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 100%;
  line-height: 1.4;
  font-weight: 700;
  color: var(--ny-black);
}

.ny-bg {
  position: fixed;
  z-index: -1;
  width: 100%;
  height: 100%;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.ny-header {
  background: #fff;
  color: #111;
}

.ny-header a {
  color: #fff;
}

.ny-header__inner,
.ny-content,
.ny-footer__inner {
  margin-inline: auto;
}

.ny-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}

.ny-header__branding {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.ny-header__title {
  width: 411px;
  margin: 0;
  padding-left: 38px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ny-header__title a {
  display: block;
  min-width: 0;
  color: #111;
}

.ny-header__title img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

.ny-header__logo {
  padding-right: 45px;
}

.ny-header__logo img {
  width: 68px;
}

.ny-header__logo-link img {
  display: block;
  max-height: 48px;
  width: auto;
}

.ny-content {
  padding: 2.5rem 0 4rem;
}

.ny-content__main {
  min-width: 0;
}

.ny-page-header {
  margin: 0 0 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ny-line);
}

.ny-page-header__title {
  margin: 0;
  font-size: 1.75rem;
}

.ny-posts {
  display: grid;
  gap: 3rem;
  justify-items: center;
}

.ny-entry,
.ny-none,
.ny-error {
  background: var(--ny-cream);
  border: 1px solid var(--ny-line);
  border-radius: var(--ny-radius);
  padding: 1.5rem;
}

.ny-entry-card {
  list-style: none;
  width: 21%;
}

.ny-entry__thumb,
.ny-entry-card__thumb {
  display: block;
  width: 100%;
}

.ny-entry__thumb img,
.ny-entry-card__thumb img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.ny-entry-card__thumb img {
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.ny-entry-card__header {
  display: grid;
  gap: 0.35rem;
  width: 100%;
  margin-top: 10px;
}

.ny-entry-card__prefecture {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.04em;
  color: var(--ny-black);
}

.ny-entry__title,
.ny-entry-card__title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.02em;
}

.ny-entry__title a,
.ny-entry-card__title a {
  color: var(--ny-black);
}

.ny-entry__title a:hover,
.ny-entry-card__title a:hover {
  color: var(--ny-accent);
  text-decoration: none;
}

.ny-entry-card__more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1.15rem;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  background: var(--ny-black);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.ny-entry-card__more:hover {
  background: #000;
  color: #fff;
  text-decoration: none;
}

.ny-entry__meta,
.ny-entry__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  color: var(--ny-muted);
  font-size: 0.85rem;
}

.ny-entry__content {
  color: var(--ny-gray);
}

.ny-entry__content > *:first-child {
  margin-top: 0;
}

.ny-entry__content > *:last-child {
  margin-bottom: 0;
}

.ny-entry__content p,
.ny-entry__content ul,
.ny-entry__content ol {
  margin: 0 0 1.1rem;
}

.ny-entry__content h2 {
  margin: 1.8rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--ny-accent);
  font-size: 1.35rem;
}

.ny-entry__content h3 {
  margin: 1.5rem 0 0.7rem;
  font-size: 1.15rem;
}

.ny-entry__content blockquote {
  margin: 1.25rem 0;
  padding: 0.2rem 0 0.2rem 1rem;
  border-left: 4px solid var(--ny-accent);
  color: var(--ny-muted);
}

.wp-block-button__link,
.ny-search__submit {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--ny-accent);
  color: #fff;
  font-family: inherit;
  cursor: pointer;
}

.wp-block-button__link:hover,
.ny-search__submit:hover {
  background: var(--ny-accent-hover);
  color: #fff;
  text-decoration: none;
}

.ny-posts-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}

.ny-search {
  display: flex;
  gap: 0.5rem;
}

.ny-search__label {
  flex: 1;
  min-width: 0;
}

.ny-search__field {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--ny-line);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 1rem;
}

.ny-footer {
  background: var(--ny-header) url(assets/img/common/bg_footer.png) no-repeat center top / 100% auto;
  color: #c9c2bb;
  padding: 2.5rem 0 1.5rem;
}

.ny-footer a {
  color: #fff;
}

.ny-footer__credits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 822px;
  margin: 0 auto 1.5rem;
  padding: 0;
  list-style: none;
}

.ny-footer__credit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 47px;
  padding: 8px 12px;
  border: 1px solid rgba(17, 17, 17, 0.45);
  border-radius: 4px;
  color: #111;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
}

.ny-footer__logo {
  width: 198px;
  margin: 40px auto 0;
}

.ny-footer__logo img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.ny-lp {
  color: #111;
}

.ny-lp .ny-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 200;
  background: #fff;
}

.ny-lp .ny-header__inner {
  min-height: 80px;
}

.ny-lp.has-custom-logo .ny-header__identity {
  display: none;
}

.ny-lp .ny-header__logo-link img {
  max-height: 56px;
}

.ny-lp .ny-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.ny-lp .ny-footer {
  position: relative;
  z-index: 2;
  padding: 0;
  overflow: visible;
  color: #231815;
  background: #fff;
}

.ny-lp .ny-footer__fruit {
  position: absolute;
  z-index: 3;
  left: calc(-30 / 1440 * 100%);
  top: -50px;
  width: calc(187 / 1440 * 100%);
  pointer-events: none;
  line-height: 0;
}

.ny-lp .ny-footer__fruit img {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 0;
  animation: ny-fruit-sway 5.2s ease-in-out 0.9s infinite;
}

@keyframes ny-fruit-sway {
  0%,
  100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.ny-lp .ny-footer a {
  color: #fff;
}

.ny-lp .ny-footer__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: none;
  padding: 72px 40px 56px;
  gap: 24px;
}

.ny-lp .ny-footer__credits {
  display: flex;
  gap: 40px;
  width: min(1142px, 80%);
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ny-lp .ny-footer__credit {
  flex: 1 1 0;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.ny-lp .ny-footer__credit img {
  display: block;
  width: 100%;
  height: auto;
}

.ny-lp .ny-footer__logo {
  width: min(308px, 28%);
  margin: 16px 0 0;
}

.ny-lp .ny-float {
  position: fixed;
  z-index: 190;
  top: auto;
  right: 0;
  bottom: 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  width: calc(310 / 1440 * 100vw);
  max-width: 310px;
  height: calc(110 / 1440 * 100vw);
  max-height: 110px;
  padding: min(12px, calc(12 / 1440 * 100vw)) min(18px, calc(18 / 1440 * 100vw)) min(12px, calc(12 / 1440 * 100vw)) min(38px, calc(38 / 1440 * 100vw));
  gap: min(18px, calc(18 / 1440 * 100vw));
  border-radius: clamp(12px, calc(16 / 1440 * 100vw), 16px);
  background: rgba(255, 255, 255, 0.7);
  transform: none;
  transition: opacity 0.2s ease, visibility 0s linear;
}

.ny-lp .ny-float.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.ny-lp .ny-float__button {
  display: block;
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  background: transparent;
  line-height: 0;
}

.ny-lp .ny-float__button img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.ny-lp .ny-float__button:hover {
  background: transparent;
  opacity: 0.9;
  text-decoration: none;
}

.ny-intro__button,
.ny-cta-bar__button,
.ny-lp .ny-float__button,
.ny-product__vote,
.ny-product__buy {
  transform-origin: center center;
  animation: purupuru-loop 4s linear infinite;
}

.ny-intro__button--eat,
.ny-cta-bar__button--eat,
.ny-lp .ny-float__button--eat,
.ny-product__buy {
  animation-delay: 0.45s;
}

.ny-intro__button:hover,
.ny-intro__button:focus-visible,
.ny-cta-bar__button:hover,
.ny-cta-bar__button:focus-visible,
.ny-lp .ny-float__button:hover,
.ny-lp .ny-float__button:focus-visible,
.ny-product__vote:hover,
.ny-product__vote:focus-visible,
.ny-product__buy:hover,
.ny-product__buy:focus-visible {
  animation: purupuru 0.8s linear 0s 1;
}

@keyframes purupuru {
  0%   { transform: scale(1.0, 1.0) translate(0%, 0%); }
  20%  { transform: scale(1.0, 1.06) translate(-5%, -4%) skew(6deg, 0deg); }
  50%  { transform: scale(1.0, 0.94) translate(5%, 4%) skew(-6deg, 0deg); }
  65%  { transform: scale(1.0, 1.03) translate(2%, -2%) skew(-3deg, 0deg); }
  80%  { transform: scale(1.0, 0.97) translate(-2%, 2%) skew(3deg, 0deg); }
  100% { transform: scale(1.0, 1.0) translate(0%, 0%); }
}

@keyframes purupuru-loop {
  0%   { transform: scale(1.0, 1.0) translate(0%, 0%); }
  4%   { transform: scale(1.0, 1.06) translate(-5%, -4%) skew(6deg, 0deg); }
  10%  { transform: scale(1.0, 0.94) translate(5%, 4%) skew(-6deg, 0deg); }
  13%  { transform: scale(1.0, 1.03) translate(2%, -2%) skew(-3deg, 0deg); }
  16%  { transform: scale(1.0, 0.97) translate(-2%, 2%) skew(3deg, 0deg); }
  20%,
  100% { transform: scale(1.0, 1.0) translate(0%, 0%); }
}

@media (prefers-reduced-motion: reduce) {
  .ny-lp .ny-float,
  .ny-lp .ny-float.is-hidden {
    transition: none;
  }

  .ny-intro__button,
  .ny-cta-bar__button,
  .ny-lp .ny-float__button,
  .ny-lp .ny-footer__fruit img,
  .ny-product__vote,
  .ny-product__buy {
    animation: none;
  }
}

.ny-lp .ny-footer__pagetop {
  position: absolute;
  right: 24px;
  bottom: auto;
  left: auto;
  top: 20px;
  z-index: 4;
  width: 56px;
  height: 56px;
  aspect-ratio: 1;
  margin: 0;
  background: #18b7cd;
  color: #fff;
  font-size: 0;
  transition: background 0.2s ease;
}

.ny-lp .ny-footer__pagetop::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 0.18em solid transparent;
  border-right: 0.18em solid transparent;
  border-bottom: 0.28em solid #fff;
  font-size: 56px;
}

.ny-lp .ny-footer__pagetop:hover {
  background: #14a5b9;
  color: #fff;
}

.ny-product-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  -webkit-box-pack: justify;
  row-gap: 70px;
  max-width: 922px;
  margin: 40px auto 0;
  padding: 0;
  list-style: none;
}

.ny-product-list::before {
  content: "";
  display: block;
  width: 21%;
  -webkit-box-original-group: 2;
  order: 1;
}

.ny-product-list::after {
  content: "";
  display: block;
  width: 21%;
}

.ny-product-card {
  width: 21%;
}

.ny-product-card__thumb {
  display: block;
}

.ny-product-card__thumb img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
  transition: transform 0.3s;
}

.ny-product-card__thumb:hover img {
  transform: scale(1.03);
}

.ny-product-card__name {
  margin: 10px 0 0;
  text-align: center;
}

.ny-product-card__prefecture,
.ny-product-card__title {
  display: block;
}

.ny-product-card__prefecture {
  font-size: 1.05rem;
}

.ny-product-card__title {
  margin: 0;
  font-size: 20px;
  font-weight: bold;
  display: flex;
  -webkit-box-pack: center;
  justify-content: center;
  white-space: nowrap;
  color: #111;
}

.ny-product-card__title a {
  color: inherit;
}

.ny-product-card__title a:hover {
  color: #e10022;
  text-decoration: none;
}

.ny-product-card__more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  margin-top: 10px;
  border-radius: 16px;
  background: #111;
  color: #fff;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: 0.25s;
}

.ny-product-card__more:hover {
  background: #e10022;
  color: #fff;
  text-decoration: none;
}

.ny-footer__pagetop {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  background: #111;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.ny-footer__pagetop:hover {
  background: #fffcf3;
  color: #e10022;
  text-decoration: none;
}

@media (max-width: 999px) {
  .ny-product-card,
  .ny-product-list::after {
    width: 30%;
  }
}

@media (max-width: 821px) {
  body:not(.ny-lp) .ny-header__logo {
    display: none;
  }

  .ny-lp .ny-header__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    min-height: 56px;
    padding: 8px 64px 8px 12px;
    overflow-x: clip;
  }

  .ny-lp .ny-header__branding,
  .ny-lp .ny-header__identity,
  .ny-lp .ny-header__title {
    min-width: 0;
    flex: 1 1 auto;
  }

  .ny-header__title,
  .ny-lp .ny-header__title {
    width: auto;
    max-width: 100%;
    padding-left: 0;
  }

  .ny-lp .ny-header__title img {
    width: auto;
    height: 24px;
    max-width: 100%;
    max-height: 24px;
    object-fit: contain;
    object-position: left center;
  }

  .ny-lp .ny-header__logo {
    display: block !important;
    position: absolute;
    right: 12px;
    top: 50%;
    z-index: 2;
    width: 45px;
    height: 24px;
    padding: 0;
    transform: translateY(-50%);
  }

  .ny-lp .ny-header__logo img {
    display: block;
    width: 45px;
    height: 24px;
    max-width: none;
    object-fit: contain;
  }

  .ny-lp .ny-header__logo-link img {
    max-height: 32px;
  }

  .ny-footer__credits {
    grid-template-columns: 1fr;
  }

  .ny-lp .ny-footer {
    z-index: 1;
    margin-top: -16px;
    overflow-y: visible;
    background: #fff;
  }

  .ny-lp .ny-footer__fruit {
    left: -30px;
    top: -30px;
    width: min(96px, 28%);
    z-index: 1;
  }

  .ny-lp .ny-footer__inner {
    gap: 16px;
    padding: 68px 20px 128px;
  }

  .home.ny-lp .ny-footer__inner {
    padding:68px 20px 48px;
  }

  .ny-lp .ny-footer__credits {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    gap: 8px;
  }

  .ny-lp .ny-footer__credit {
    flex: auto;
    min-width: 0;
  }

  .ny-lp .ny-footer__logo {
    width: min(220px, 70%);
    margin-top: 4px;
  }

  .ny-lp .ny-float {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
    gap: 16px;
    border-radius: 0;
    aspect-ratio: auto;
    justify-content: center;
    transform: none;
  }

  .ny-lp .ny-float__button {
    flex: 0 0 auto;
    width: min(100px, 32%);
    height: auto;
  }

  .ny-lp .ny-footer__pagetop {
    position: relative;
    right: auto;
    bottom: auto;
    align-self: flex-end;
    width: 48px;
    height: 48px;
    margin-top: 8px;
  }

  .ny-lp .ny-footer__pagetop::before {
    font-size: 48px;
  }

  .ny-product-list {
    row-gap: 40px;
  }

  .ny-product-card,
  .ny-product-list::after {
    width: 47.5%;
  }

  .ny-product-list::after {
    display: none;
  }

  .ny-product-card__prefecture {
    font-size: 0.95rem;
  }

  .ny-product-card {
    min-width: 0;
    max-width: 100%;
  }

  .ny-product-card__title {
    max-width: 100%;
    font-size: 1rem;
    white-space: normal;
  }

  .ny-product-card__more {
    height: 36px;
    border-radius: 25px;
    font-size: 0.8rem;
  }
}
