:root {
  color-scheme: light;
  --paper: #f9f7ee;
  --white: #fffdf7;
  --ink: #203b31;
  --muted: #52635a;
  --forest: #254b39;
  --green: #e7eddf;
  --line: #d6dacf;
  --warm: #f3e9d3;
  --coral: #bd573d;
  --gold: #97671e;
  --sage: #557744;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-weight: 500;
  line-height: 1.75;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button[aria-disabled="true"] { cursor: default; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, h3:focus-visible { outline: 3px solid #9d531e; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
p, h1, h2, h3, figure { margin: 0; }
[hidden] { display: none !important; }

.container { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: absolute; top: .5rem; left: .5rem; z-index: 5; padding: .65rem 1rem; background: var(--white); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.header-inner { min-height: 73px; }
.brand { display: inline-flex; gap: .65rem; align-items: center; color: var(--ink); text-decoration: none; font-size: 1.37rem; font-weight: 800; letter-spacing: .035em; white-space: nowrap; }
.brand-mark { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 38%; background: var(--forest); }
.brand-mark i { position: relative; width: 11px; height: 16px; transform: rotate(28deg); border-radius: 65% 50% 64% 48%; background: #f6d09f; }
.brand-mark i::before { position: absolute; content: ""; width: 5px; height: 5px; right: -6px; top: 0; border-radius: 50%; background: #eccb94; }
.site-header nav { display: flex; align-items: center; gap: clamp(1.1rem, 3vw, 2.6rem); }
.site-header nav a, .site-footer a:not(.brand) { color: var(--muted); font-size: .9rem; font-weight: 700; text-decoration: none; }
.site-header nav a:hover, .site-footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.site-footer { margin-top: 5.25rem; border-top: 1px solid var(--line); }
.footer-inner { min-height: 95px; }

.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.07fr .93fr; align-items: center; min-height: 540px; margin-top: 2.4rem; background: #eef0e2; border: 1px solid #dce0d1; border-radius: 1.75rem; }
.hero-copy { position: relative; z-index: 1; padding: 3.5rem 0 3.5rem clamp(1.6rem, 5.1vw, 4.7rem); }
.eyebrow { color: #506d48; font-size: .89rem; font-weight: 800; letter-spacing: .13em; }
.hero h1 { margin: .9rem 0 1.2rem; font-size: clamp(1.94rem, 4.35vw, 3.9rem); line-height: 1.32; letter-spacing: -.055em; font-weight: 800; }
.hero-description { color: var(--muted); line-height: 1.9; font-size: clamp(1rem, 1.6vw, 1.16rem); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .8rem; min-height: 49px; padding: .62rem 1.25rem; border: 1px solid transparent; border-radius: 999px; background: var(--forest); color: #fffdf6; font-size: .94rem; font-weight: 800; text-decoration: none; transition: background .15s ease; }
.button:hover { background: #38644d; }
.hero-copy .button { margin-top: 1.55rem; }
.button span { min-width: 1em; text-align: center; }
.hero-figure { position: relative; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.1rem 1.5rem 1rem 0; background: radial-gradient(ellipse at 49% 50%, #f9f5e6 0 34%, transparent 71%); }
.anatomy-map { position: relative; isolation: isolate; width: min(100%, 397px); }
.anatomy-map img { width: 100%; }
figcaption { color: var(--muted); font-size: .8rem; text-align: center; }
.hero-figure figcaption { margin-top: -.12rem; }
[data-color="coral"] { --organ-color: var(--coral); --organ-bg: #f9e6db; }
[data-color="gold"] { --organ-color: var(--gold); --organ-bg: #f8edcc; }
[data-color="sage"] { --organ-color: var(--sage); --organ-bg: #e9efde; }
.map-label { position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: .48rem; min-height: 43px; padding: .28rem .82rem; border: 1px solid #c5cabd; border-radius: 999px; background: var(--white); color: var(--ink); font-size: .94rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
a.map-label:hover { border-color: var(--organ-color); background-color: var(--organ-bg); }
.map-label i, .organ-kicker i { width: 10px; height: 10px; border-radius: 50%; background: var(--organ-color); }
.map-label--stomach { top: 19%; right: 2%; }
.map-label--small-intestine { top: 51%; left: 1%; }
.map-label--large-intestine { top: 76%; right: 0; }

.section { margin-top: 4.75rem; scroll-margin-top: 1.25rem; }
.section-heading { margin-bottom: 1.55rem; }
.section-heading h2, .food-copy h2 { font-size: clamp(1.7rem, 3.2vw, 2.65rem); line-height: 1.45; font-weight: 800; letter-spacing: -.04em; }
.section-heading p:not(.eyebrow) { margin-top: .32rem; color: var(--muted); }
.section-heading .eyebrow { margin-bottom: .5rem; }
.organ-explorer { display: grid; grid-template-columns: 1fr 2.65fr; gap: 1rem; }
.organ-explorer:not(:has(.organ-tabs:not([hidden]))) { grid-template-columns: 1fr; }
.organ-tabs { display: grid; align-content: start; gap: .6rem; }
.organ-tab { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .08rem; min-height: 70px; width: 100%; border: 1px solid var(--line); border-radius: .9rem; padding: .45rem .95rem .45rem 2rem; background: var(--white); color: var(--ink); text-align: left; }
.organ-tab::before { position: absolute; content: ""; top: 1.05rem; left: .95rem; width: 8px; height: 8px; border-radius: 50%; background: var(--organ-color); }
.organ-tab[aria-pressed="true"], .organ-tab:hover { border-color: var(--organ-color); background: var(--organ-bg); }
.organ-tab span { font-weight: 800; }
.organ-tab small { font-size: .79rem; color: var(--muted); }
.organ-panels { display: grid; gap: .75rem; min-width: 0; }
.organ-panel { border: 1px solid var(--line); border-radius: 1rem; background: var(--white); padding: clamp(1.1rem, 3.2vw, 2.1rem); }
.organ-kicker { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .89rem; font-weight: 800; }
.organ-panel h3 { margin: .55rem 0; font-size: clamp(1.27rem, 2.6vw, 1.85rem); line-height: 1.5; font-weight: 800; letter-spacing: -.045em; }
.organ-panel p { color: var(--muted); }
.fact { margin: 1rem 0; padding: .65rem .8rem; border-left: 3px solid #a8b99d; background: #f0f3e9; border-radius: .12rem .4rem .4rem .12rem; font-size: .92rem; }
.fact strong { display: block; margin-bottom: .18rem; color: var(--ink); }
.text-link, .back-link { display: inline-flex; align-items: center; min-height: 44px; gap: .4rem; color: var(--forest); font-weight: 800; text-decoration: underline; text-underline-offset: .24em; }
.text-link:hover, .back-link:hover { color: #7c4b26; }
.text-link span { font-size: 1.3em; line-height: 1; }

.quiz-layout { display: grid; grid-template-columns: .8fr 1.42fr; align-items: start; gap: clamp(1.6rem, 6vw, 4.5rem); padding: clamp(1.1rem, 5vw, 3.1rem); border-radius: 1.4rem; background: var(--green); }
.quiz-layout .section-heading { margin: .35rem 0 0; }
.quiz-card { min-width: 0; padding: clamp(1rem, 3vw, 1.8rem); border: 1px solid #d2d9c9; border-radius: .95rem; background: var(--white); }
.quiz-question:not([hidden]) + .quiz-question:not([hidden]) { margin-top: 1.5rem; }
.progress-label { color: var(--muted); font-size: .87rem; font-weight: 800; }
progress { display: block; width: 100%; height: 6px; margin: .5rem 0 .85rem; border: none; border-radius: 1rem; overflow: hidden; background: var(--green); accent-color: var(--sage); }
progress::-webkit-progress-bar { background: var(--green); }
progress::-webkit-progress-value { background: var(--sage); }
progress::-moz-progress-bar { background: var(--sage); }
.quiz-card h3 { margin-bottom: .8rem; font-size: 1.15rem; font-weight: 800; }
.quiz-options { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.quiz-options button { display: block; width: 100%; min-height: 44px; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: .55rem; background: #f9f9f1; color: var(--ink); text-align: left; font-weight: 700; }
.quiz-options button:not([aria-disabled]):hover { border-color: var(--forest); background: var(--green); }
.quiz-options [data-correct] { border-color: var(--sage); background: #e4eedc; }
.quiz-options [data-incorrect] { border-color: var(--coral); background: #f9e8e2; }
.quiz-feedback { font-size: .9rem; }
.quiz-feedback:not(:empty) { margin-top: .8rem; }
.quiz-next { margin-top: .75rem; }
.score { margin: 0 0 .9rem; font-size: 1.6rem; font-weight: 800; }

.food-feature { display: grid; grid-template-columns: 1fr 1fr; min-height: 287px; overflow: hidden; border: 1px solid #e0d7bd; border-radius: 1.4rem; background: var(--warm); }
.food-image img { width: 100%; height: 100%; object-fit: cover; }
.food-copy { align-self: center; padding: clamp(1.2rem, 3.6vw, 2.8rem); }
.food-copy h2 { margin: .3rem 0 .55rem; font-size: clamp(1.55rem, 2.7vw, 2.3rem); }
.food-copy p:not(.eyebrow) { color: var(--muted); }
.food-copy .text-link { margin-top: .7rem; }

.inner-page { margin-top: 2rem; }
.article-hero { display: grid; grid-template-columns: 1fr .7fr; align-items: center; gap: clamp(1rem, 4vw, 3.4rem); margin: .7rem 0 2.85rem; padding: clamp(1rem, 5vw, 3.35rem); border: 1px solid #dce0d1; border-radius: 1.35rem; background: #eef0e2; }
.article-hero h1, .simple-page h1 { margin: .6rem 0 1rem; font-size: clamp(1.9rem, 4.1vw, 3.4rem); line-height: 1.4; letter-spacing: -.045em; font-weight: 800; }
.lede { color: var(--muted); font-size: 1.07rem; }
.article-figure .anatomy-map { max-width: 290px; margin-inline: auto; }
.article-figure .map-label { min-height: 30px; padding: .12rem .58rem; font-size: .78rem; }
.article-hero--food { background: var(--warm); border-color: #e0d7bd; }
.article-hero--food img { width: 100%; border-radius: .75rem; }
.article-content { max-width: 800px; margin-inline: auto; }
.article-content section + section, .article-content > h2 { margin-top: 2.15rem; }
.article-content h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.4; letter-spacing: -.02em; font-weight: 800; margin-bottom: .55rem; }
.article-content p { color: var(--muted); }
.source-note { margin-top: 2.5rem; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .9rem; }
.source-note p { font-weight: 800; }
.source-note a { display: inline-block; min-height: 36px; padding: .35rem 0; margin-right: 1rem; text-underline-offset: 3px; }
.more-links { display: flex; flex-wrap: wrap; gap: .4rem 1.25rem; margin-top: 1.1rem; }
.simple-page { min-height: 32vh; margin-top: 3.5rem; }
.food-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.food-card { display: flex; flex-direction: column; min-width: 0; padding: .92rem; border: 1px solid #e0d7bd; border-radius: .8rem; background: var(--white); }
.food-card h3 { font-size: 1.17rem; margin-bottom: .2rem; font-weight: 800; }
.food-card p { font-size: .93rem; margin-bottom: .65rem; }
.food-card .food-use { color: #6d572c; font-weight: 800; }
.food-card .text-link { margin-top: auto; align-self: flex-start; font-size: .9rem; }
.ad-disclosure { margin: -.1rem 0 .7rem; font-size: .84rem; }
.calculator-box { padding: clamp(1rem, 3.5vw, 1.7rem); border: 1px solid #d2d9c9; border-radius: .9rem; background: var(--green); }
.calculator-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; margin: .85rem 0 1rem; }
.calculator-fields label { font-size: .87rem; font-weight: 800; }
.calculator-fields input { display: block; width: 100%; min-height: 44px; margin-top: .2rem; padding: .43rem; border: 1px solid #aeb9a9; border-radius: .35rem; background: var(--white); color: var(--ink); font-size: 1rem; }
.calculator-box output:not(:empty) { display: block; margin-top: .55rem; font-weight: 800; }
.fine-print { margin-top: .45rem; font-size: .82rem; }

@media (max-width: 850px) {
  .container { width: calc(100% - 50px); }
  .hero { min-height: 470px; }
  .hero-copy { padding-left: 2rem; }
  .hero-figure { padding-right: .9rem; }
}

@media (max-width: 645px) {
  .container { width: calc(100% - 30px); }
  .header-inner { min-height: 0; flex-wrap: wrap; justify-content: flex-start; gap: .2rem 1.1rem; padding-block: .65rem .4rem; }
  .brand { font-size: 1.2rem; }
  .brand-mark { width: 29px; height: 29px; }
  .site-header nav { flex-wrap: wrap; gap: .1rem .83rem; }
  .site-header nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .84rem; }
  .hero { grid-template-columns: 1fr; min-height: unset; margin-top: .86rem; border-radius: 1rem; }
  .hero-copy { padding: 1.5rem 1.05rem 0; }
  .hero h1 { margin: .6rem 0 .65rem; font-size: clamp(1.92rem, 8.7vw, 3.55rem); line-height: 1.3; }
  .hero-description { font-size: .98rem; }
  .hero-copy .button { margin-top: .95rem; }
  .hero-figure { padding: .7rem .7rem .85rem; }
  .hero-figure .anatomy-map { width: min(100%, 285px); }
  .map-label { font-size: .85rem; min-height: 44px; padding-inline: .58rem; }
  .section { margin-top: 3.1rem; }
  .section-heading { margin-bottom: 1rem; }
  .organ-explorer, .quiz-layout, .food-feature, .article-hero, .food-cards { grid-template-columns: 1fr; }
  .organ-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
  .organ-tab { min-height: 69px; padding: .5rem .36rem .38rem 1.15rem; }
  .organ-tab::before { left: .45rem; top: .94rem; width: 6px; height: 6px; }
  .organ-tab small { font-size: .73rem; line-height: 1.36; }
  .quiz-layout { gap: 1rem; }
  .food-image img { height: auto; }
  .article-hero { gap: .95rem; }
  .article-hero--food .article-figure { max-width: 440px; margin-inline: auto; }
  .article-figure .anatomy-map { max-width: 225px; }
  .calculator-fields { grid-template-columns: 1fr; }
  .article-content h2 { margin-bottom: .45rem; }
  .site-footer { margin-top: 3.3rem; }
  .footer-inner { min-height: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
