:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f6f7f8;
  --surface-strong: #eef1f3;
  --card: #ffffff;
  --ink: #202428;
  --muted: #69727a;
  --line: #dde2e6;
  --line-strong: #cbd3d9;
  --accent: #c96f3c;
  --accent-dark: #9f4f28;
  --ok: #356f5a;
  --warn: #a75d21;
  --danger: #9d3832;
  --shadow: 0 16px 38px rgba(34, 40, 46, 0.08);
  --max: 780px;
  --header: 64px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP",
    "Noto Sans Thai", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.72;
}

body.menuOpen {
  overflow: hidden;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.siteHeader {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(221, 226, 230, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

.headerInner {
  width: min(var(--max), calc(100% - 32px));
  min-height: var(--header);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brandText {
  overflow: hidden;
  font-size: 18px;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.desktopNav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.navLink {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  transition: background 160ms ease, color 160ms ease;
}

.navLink:hover,
.navLink.isActive {
  background: var(--surface);
  color: var(--ink);
}

.languageFlags {
  display: flex;
  align-items: center;
  gap: 4px;
}

.flagButton {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 19px;
  line-height: 1;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.flagButton:hover,
.flagButton.isActive {
  border-color: var(--line);
  background: var(--surface);
}

.flagButton:active {
  transform: translateY(1px);
}

.menuButton {
  width: 42px;
  height: 42px;
  display: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
}

.menuIcon,
.menuIcon::before,
.menuIcon::after {
  width: 18px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

.menuIcon {
  position: relative;
}

.menuIcon::before,
.menuIcon::after {
  position: absolute;
  left: 0;
  content: "";
}

.menuIcon::before {
  top: -6px;
}

.menuIcon::after {
  top: 6px;
}

.menuButton[aria-expanded="true"] .menuIcon {
  background: transparent;
}

.menuButton[aria-expanded="true"] .menuIcon::before {
  transform: translateY(6px) rotate(45deg);
}

.menuButton[aria-expanded="true"] .menuIcon::after {
  transform: translateY(-6px) rotate(-45deg);
}

.mobileMenu {
  display: none;
}

.pageShell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.pageLead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
}

.pageTitle {
  margin: 0;
  font-size: clamp(30px, 8vw, 48px);
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.08;
}

.homeHero {
  display: grid;
  gap: 28px;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
}

.homeMedia {
  overflow: hidden;
  border-radius: 8px;
  background: var(--card);
}

.homeMedia img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.homeTitle {
  margin: 0;
  color: #211816;
  font-size: clamp(44px, 9vw, 68px);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.16;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.homeActions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.homeAction {
  min-height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--card);
  color: var(--ink);
  font-size: 18px;
  font-weight: 820;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.homeAction:hover {
  border-color: var(--ink);
  box-shadow: 0 12px 28px rgba(34, 40, 46, 0.08);
  transform: translateY(-1px);
}

.sectionTitle {
  margin: 0 0 14px;
  font-size: clamp(22px, 5vw, 30px);
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quickGuide {
  margin: 0 0 28px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.quickGuideHeader {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 18px;
  align-items: center;
}

.quickHeaderCopy {
  min-width: 0;
}

.quickProduct {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.quickProduct img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.quickGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quickItem {
  min-height: 104px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.quickItemNumber {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.quickItemText {
  margin: 0;
  font-size: 14px;
  line-height: 1.58;
}

.tabsBlock {
  padding-top: 6px;
}

.tabList {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.tabButton {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 760;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.tabButton[aria-selected="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(34, 40, 46, 0.08);
}

.tabPanel {
  display: none;
  padding-top: 16px;
}

.tabPanel.isActive {
  display: block;
  animation: panelIn 180ms ease both;
}

.manualCardGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.manualCard {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.manualCard h3,
.recipeBody h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 780;
  line-height: 1.28;
}

.manualCard p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.manualCard ul,
.manualCard ol,
.recipeBody ul,
.recipeBody ol {
  margin: 12px 0 0;
  padding-left: 1.25em;
}

.manualCard li,
.recipeBody li {
  margin: 0.36em 0;
}

.recipesHero {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.recipeCount {
  width: max-content;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.recipeMetaBar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tagFilterList {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tagButton {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tagButton:hover,
.tagButton.isActive {
  border-color: var(--accent);
  background: rgba(201, 111, 60, 0.1);
  color: var(--accent-dark);
}

.recipeList {
  display: grid;
  gap: 12px;
}

.recipeCard {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  gap: 16px;
  min-height: 156px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.recipeCard:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.photoFrame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(201, 111, 60, 0.1), rgba(53, 111, 90, 0.08)),
    var(--surface-strong);
}

.photoFrame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.photoFallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  color: rgba(32, 36, 40, 0.42);
  font-size: clamp(30px, 9vw, 58px);
  font-weight: 820;
  letter-spacing: 0;
}

.photoFrame.isEmpty .photoFallback {
  display: grid;
}

.recipeCardBody {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.recipeCardTitle {
  margin: 0;
  font-size: 21px;
  font-weight: 790;
  letter-spacing: 0;
  line-height: 1.24;
}

.recipeCardText {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.metaLine {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.recipeTagRow {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.recipeTag {
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.3;
}

.metaChip {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.backLink {
  width: max-content;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
}

.recipeDetail {
  display: grid;
  gap: 22px;
}

.recipeIntro {
  display: grid;
  gap: 18px;
}

.recipeMainPhoto {
  width: min(100%, 560px);
  margin: 0 auto;
}

.recipeSummary {
  margin: 0;
  color: var(--muted);
}

.recipeBody {
  display: grid;
  gap: 12px;
}

.recipeSection {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.recipeSection.isNote {
  background: var(--surface);
}

.siteFooter {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.emptyState {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  :root {
    --header: 58px;
  }

  .headerInner {
    width: min(100% - 24px, var(--max));
    min-height: var(--header);
  }

  .desktopNav,
  .desktopFlags {
    display: none;
  }

  .menuButton {
    display: grid;
    flex: 0 0 auto;
  }

  .brandText {
    font-size: 16px;
  }

  .mobileMenu {
    position: fixed;
    inset: var(--header) 0 0;
    z-index: 25;
    display: block;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    transform: translateX(100%);
    transition: transform 190ms ease;
  }

  .mobileMenu.isOpen {
    transform: translateX(0);
  }

  .mobileMenuInner {
    width: min(100% - 32px, var(--max));
    margin: 0 auto;
    padding: 18px 0;
    display: grid;
    gap: 14px;
  }

  .mobileNav {
    display: grid;
    gap: 8px;
  }

  .mobileNav .navLink {
    min-height: 48px;
    justify-content: flex-start;
    padding: 0 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    font-size: 15px;
  }

  .mobileFlags {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 4px;
  }

  .mobileFlags .flagButton {
    width: auto;
    height: 48px;
    border-color: var(--line);
    background: var(--surface);
  }

  .pageShell {
    width: min(100% - 24px, var(--max));
    padding-top: 18px;
  }

  .homeHero {
    gap: 22px;
    padding: 16px;
  }

  .homeTitle {
    font-size: clamp(40px, 13vw, 58px);
  }

  .homeActions {
    gap: 10px;
  }

  .homeAction {
    min-height: 64px;
    font-size: 16px;
  }

  .quickGuide {
    padding: 16px;
  }

  .quickGuideHeader {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 12px;
  }

  .quickGrid,
  .manualCardGrid {
    grid-template-columns: 1fr;
  }

  .quickItem {
    min-height: auto;
  }

  .tabList {
    position: sticky;
    top: calc(var(--header) + 8px);
    z-index: 12;
  }

  .recipeCard {
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    min-height: 136px;
    padding: 10px;
  }

  .recipeCardTitle {
    font-size: 18px;
  }

  .recipeMetaBar {
    align-items: flex-start;
    flex-direction: column;
  }

  .recipeCardText {
    -webkit-line-clamp: 3;
  }

  .recipeSection {
    padding: 16px;
  }
}

@media (max-width: 420px) {
  .recipeCard {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .recipeCardText {
    font-size: 13px;
  }

  .metaChip {
    font-size: 11px;
  }
}

@media print {
  .siteHeader,
  .mobileMenu,
  .backLink {
    display: none;
  }

  body {
    background: #fff;
  }

  .pageShell {
    width: 100%;
  }

  .tabPanel {
    display: block;
  }

  .tabList {
    display: none;
  }
}
