@font-face {
  font-family: "Comfortaa";
  src: url("/assets/Comfortaa-VariableFont_wght.woff2") format("woff2");
  font-display: swap;
}
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background-color: #ffffff;
}

body {
  font-family: "Comfortaa", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1d1d1d;
  line-height: 1.5;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1 1 auto;
  padding-bottom: 72px;
  overflow-y: auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #1976d2;
  color: #ffffff;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.footer-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.25rem;
  color: #ffffff;
  text-decoration: none;
  flex: 1;
  min-width: 0;
  transition: background-color 0.2s;
}
.footer-nav__link:hover, .footer-nav__link:focus {
  background-color: rgba(255, 255, 255, 0.1);
}
.footer-nav__link--active {
  background-color: rgba(255, 255, 255, 0.15);
}

.footer-nav__icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.footer-nav__label {
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}
.breadcrumbs a {
  color: #1976d2;
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.breadcrumbs__separator {
  color: #999;
}
.breadcrumbs__current {
  color: #333;
}

.page-title {
  font-size: 1.8rem;
  margin: 0.5rem 0 1rem;
  color: #1d1d1d;
}

.recipe-list {
  columns: 18rem;
  gap: 1rem;
  counter-reset: grid;
}

.recipe-card {
  break-inside: avoid;
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.recipe-card + .recipe-card {
  margin-top: 1rem;
}
.recipe-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.recipe-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.recipe-card__image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.recipe-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.recipe-card__title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.recipe-detail {
  padding: 1rem;
}
.recipe-detail__title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin: 1rem 0;
  line-height: 1.3;
}
.recipe-detail__image {
  display: block;
  width: 100%;
  max-width: 1000px;
  max-height: 500px;
  margin: 0 auto 1.5rem;
  object-fit: contain;
  border-radius: 0.5rem;
}
.recipe-detail h2 {
  font-size: 1.4rem;
  margin: 1.5rem 0 0.75rem;
  color: #1d1d1d;
}
.recipe-detail ul {
  padding-left: 1.5rem;
  margin: 0 0 1rem;
}
.recipe-detail ul li {
  margin-bottom: 0.5rem;
}
.recipe-detail .instruction-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.recipe-detail .instruction-list__item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid #eee;
}
.recipe-detail .instruction-list__item:last-child {
  border-bottom: none;
}
.recipe-detail .instruction-list__checkbox {
  margin-top: 0.25rem;
  width: 1.25rem;
  height: 1.25rem;
  accent-color: #26a69a;
  flex-shrink: 0;
}
.recipe-detail .instruction-list__text {
  flex: 1;
}

.related-recipes {
  margin-top: 2rem;
}
.related-recipes h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
}
.related-recipes__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
}
.related-recipes__item {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #eee;
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.related-recipes__item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.related-recipes__image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.related-recipes__title {
  padding: 0.5rem;
  font-size: 0.8rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seo-section {
  margin-top: 2rem;
}
.seo-section h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  color: #333;
}
.seo-section ul {
  padding-left: 1.5rem;
  margin: 1rem 0;
}
.seo-section ul li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}
.seo-section p {
  line-height: 1.5;
  color: #555;
}

.feedback-section {
  margin-top: 2rem;
  padding: 20px 0;
  border-top: 1px solid #eee;
  text-align: center;
}
.feedback-section p {
  margin: 0;
  font-size: 1rem;
}
.feedback-section a {
  color: #1976d2;
}

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1976d2;
  color: #ffffff;
  text-align: center;
  padding: 2rem;
}
.error-page__code {
  font-size: 8rem;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 1rem;
}
.error-page__message {
  font-size: 1.5rem;
  opacity: 0.8;
  margin-bottom: 2rem;
}
.error-page__button {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #ffffff;
  color: #1976d2;
  text-decoration: none;
  border-radius: 4px;
  font-size: 1.1rem;
}
.error-page__button:hover {
  opacity: 0.9;
}

@media screen and (max-width: 768px) {
  .recipe-list {
    columns: 14rem;
  }
  .recipe-detail__title {
    font-size: 1.8rem;
    line-height: 2.2rem;
  }
  .footer-nav__label {
    font-size: 0.7rem;
  }
  .related-recipes h3 {
    font-size: 1.1rem;
  }
  .related-recipes__grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.8rem;
  }
  .related-recipes__title {
    font-size: 0.7rem;
    padding: 0.3rem;
  }
  .error-page__code {
    font-size: 6rem;
  }
  .error-page__message {
    font-size: 1.25rem;
  }
}
@media screen and (max-width: 500px) {
  .recipe-list {
    columns: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .recipe-card {
    break-inside: auto;
  }
  .recipe-card + .recipe-card {
    margin-top: 0;
  }
  .recipe-detail__title {
    font-size: 1.5rem;
    line-height: 2rem;
  }
  .recipe-detail__image {
    max-height: 300px;
  }
  .recipe-detail h2 {
    font-size: 1.2rem;
    margin-top: 1rem;
  }
  .recipe-detail ul {
    padding-left: 1rem;
  }
  .recipe-detail li {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
  }
  .related-recipes h3 {
    font-size: 1rem;
  }
  .related-recipes__grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.6rem;
  }
  .related-recipes__title {
    font-size: 0.65rem;
  }
  .seo-section h3 {
    font-size: 1rem;
  }
  .seo-section p {
    font-size: 0.85rem;
  }
  .seo-section ul {
    padding-left: 1rem;
    font-size: 0.8rem;
  }
  .feedback-section p {
    font-size: 0.8rem;
  }
}
@media screen and (max-width: 480px) {
  .recipe-detail__title {
    font-size: 1.4rem;
    line-height: 1.8rem;
  }
  .related-recipes__grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
  }
  .related-recipes__title {
    font-size: 0.6rem;
    padding: 0.2rem;
  }
  .related-recipes__image {
    height: 80px;
  }
}
@media screen and (max-width: 375px) {
  .recipe-detail__title {
    font-size: 1.3rem;
    line-height: 1.6rem;
  }
  .recipe-detail__image {
    max-height: 250px;
  }
  .related-recipes__grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.4rem;
  }
  .related-recipes__title {
    font-size: 0.55rem;
    padding: 0.15rem;
  }
  .related-recipes__image {
    height: 70px;
  }
}
@media screen and (max-width: 320px) {
  .recipe-detail__title {
    font-size: 1.2rem;
    line-height: 1.5rem;
  }
  .recipe-detail__image {
    max-height: 200px;
  }
  .recipe-detail h2 {
    font-size: 1.1rem;
  }
  .recipe-detail ul {
    padding-left: 0.8rem;
  }
  .recipe-detail li {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }
  .related-recipes h3 {
    font-size: 0.9rem;
  }
  .related-recipes__grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 0.3rem;
  }
  .related-recipes__title {
    font-size: 0.5rem;
    padding: 0.1rem;
  }
  .related-recipes__image {
    height: 60px;
  }
  .seo-section h3 {
    font-size: 0.9rem;
  }
  .seo-section p {
    font-size: 0.8rem;
  }
  .seo-section ul {
    font-size: 0.75rem;
  }
  .feedback-section p {
    font-size: 0.75rem;
  }
}