:root {
  --bg: #F7F2EB;
  --alt: #EFE7DD;
  --ink: #26221F;
  --muted: #817970;
  --brown: #5A351F;
  --line: #D9CEC2;
  --white: #FFFFFF;
  --w: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
a { color: inherit; }
button { font: inherit; }
img { max-width: 100%; height: auto; }
section[id] { scroll-margin-top: 84px; }
.container { width: min(var(--w), calc(100% - 44px)); margin: auto; }
.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 99;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
}
.skip-link:focus { top: 12px; }

.site-header {
  height: 70px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 242, 235, .96);
  backdrop-filter: blur(10px);
}
.head-in {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  text-decoration: none;
  font-weight: 900;
  line-height: 1.2;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: .62rem;
  letter-spacing: .12em;
}
.header-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.header-links a {
  text-decoration: none;
  font-size: .88rem;
  font-weight: 700;
}
.menu-button { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid var(--brown);
  border-radius: 8px;
  background: var(--brown);
  color: var(--white);
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 5px 0 #321d11;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn:hover { transform: translateY(3px); box-shadow: 0 2px 0 #321d11; }
.btn.light {
  background: var(--white);
  color: var(--brown);
  border-color: var(--white);
  box-shadow: 0 5px 0 #be9d82;
}
.text-link {
  font-weight: 800;
  text-underline-offset: 5px;
}

.hero {
  overflow: hidden;
  min-height: calc(100svh - 70px);
  display: grid;
  align-items: center;
  padding: 56px 0 72px;
  background: linear-gradient(90deg, #fffaf4 0 42%, var(--alt) 42% 94%, #e7dcd1 94%);
}
.hero-layout {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 34px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  border-bottom: 5px solid #fff000;
  font-weight: 900;
}
.hero h1 {
  margin: 0;
  font-size: 4.45rem;
  line-height: 1.08;
  letter-spacing: -.01em;
  font-weight: 900;
}
.hero h1 span { color: var(--brown); }
.hero-lead {
  max-width: 520px;
  margin: 26px 0 0;
  font-size: 1.02rem;
  font-weight: 600;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin-top: 30px;
}
.hero-art {
  align-self: stretch;
  margin: 0;
}
.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  object-position: center right;
}

.section { padding: 96px 0; }
.section.white { background: var(--white); }
.section.alt { background: var(--alt); }
.section-head {
  max-width: 820px;
  margin-bottom: 36px;
}
.tag {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--brown);
  font-size: .76rem;
  font-weight: 900;
  letter-spacing: .14em;
}
h2 {
  margin: 0 0 20px;
  font-size: 2.55rem;
  line-height: 1.42;
  letter-spacing: -.01em;
}
h3 { line-height: 1.45; }
.section-head p,
.large { font-size: 1.08rem; font-weight: 600; }

.intro-grid,
.dialogue-grid,
.use-grid {
  display: grid;
  grid-template-columns: 1fr .9fr;
  gap: 48px;
  align-items: center;
}
.guide-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 20px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.guide-card.horizontal {
  margin: 0 0 26px;
  background: var(--white);
}
.guide-card p {
  margin: 0;
  font-weight: 700;
}

.character-face {
  display: block;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background-image: var(--face-image);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-color: var(--alt);
  flex: 0 0 auto;
  box-shadow: 0 0 0 5px var(--white), 0 8px 18px rgba(90, 53, 31, .14);
}
.face-smile { --face-image: url("assets/faces/face-smile.png"); }
.face-thumbs { --face-image: url("assets/faces/face-thumbs.png"); }
.face-happy { --face-image: url("assets/faces/face-happy.png"); }
.face-thinking { --face-image: url("assets/faces/face-thinking.png"); }

.model-wrap {
  margin-bottom: 46px;
}
.framework-image {
  width: min(1030px, 100%);
  margin: 0 auto;
}
.framework-image img {
  display: block;
  width: 100%;
  border: 0;
}
.model-note {
  width: min(1030px, 100%);
  margin: 20px auto 0;
  padding: 15px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  text-align: center;
  font-size: .94rem;
  font-weight: 700;
  white-space: nowrap;
}
.model-note strong { color: var(--brown); }

.details-list {
  display: grid;
  gap: 12px;
}
details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}
summary {
  cursor: pointer;
  list-style: none;
  position: relative;
  padding: 20px 58px 20px 22px;
  font-weight: 900;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 14px;
  color: var(--brown);
  font-size: 1.8rem;
}
details[open] summary::after { content: "-"; }
summary span {
  display: inline-block;
  margin-right: 12px;
  color: var(--brown);
  font-size: .8rem;
  letter-spacing: .08em;
}
.details-body {
  padding: 0 22px 22px;
}
.details-body p { margin-top: 0; }
.details-body ul { margin: 0; padding-left: 1.25em; }

.report-box {
  border-color: var(--brown);
  background: var(--white);
}
.report-box summary {
  padding: 24px 62px 24px 26px;
  background: var(--brown);
  color: var(--white);
  font-size: 1.15rem;
}
.report-box summary::after { color: var(--white); top: 18px; }
.report-body {
  max-width: 860px;
  padding: 34px 34px 40px;
}
.report-body h3 {
  margin: 32px 0 10px;
  color: var(--brown);
  font-size: 1.18rem;
}
.report-body h3:first-child { margin-top: 0; }
.report-body p { margin: 0 0 16px; }

.background-card {
  display: grid;
  align-items: center;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 16px 34px rgba(90, 53, 31, .09);
}
.background-card h2 {
  max-width: none;
  white-space: nowrap;
}
.background-card p {
  max-width: none;
  font-weight: 600;
}

.dialogue-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: 14px 18px 0 var(--alt);
}
.dialogue-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}
.dialogue-row .character-face {
  width: 72px;
  height: 72px;
}
.ai-row {
  grid-template-columns: 1fr 56px;
}
.ai-row .bubble {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
}
.ai-mark {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brown);
  color: var(--white);
  font-weight: 900;
}
.bubble {
  max-width: 88%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  font-weight: 700;
}
.bubble.ai {
  background: #fff8d7;
}
.bubble b {
  display: block;
  color: var(--brown);
  font-size: .78rem;
  letter-spacing: .08em;
}
.dialogue-result {
  padding: 15px 18px;
  border-radius: 8px;
  background: var(--brown);
  color: var(--white);
  text-align: center;
  font-size: 1.16rem;
  font-weight: 900;
}

.soft-cta {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 20px;
  align-items: start;
  padding: 28px;
  border-radius: 8px;
  background: var(--brown);
  color: var(--white);
}
.soft-cta h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}
.soft-cta p {
  margin: 0 0 18px;
  color: #efe3d7;
}
.copy-note {
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 5px solid var(--brown);
  background: var(--white);
  font-weight: 700;
}

.theory-page {
  background: var(--bg);
}
.theory-hero {
  padding: 76px 0 58px;
  background: linear-gradient(90deg, #fffaf4 0 48%, var(--alt) 48% 100%);
}
.theory-hero h1 {
  max-width: 900px;
  margin: 0 0 22px;
  font-size: 4rem;
  line-height: 1.18;
  font-weight: 900;
}
.theory-hero p:not(.eyebrow) {
  max-width: none;
  margin: 0 0 28px;
  font-size: 1.08rem;
  font-weight: 700;
}
.theory-document {
  max-width: 920px;
  margin-top: 54px;
  margin-bottom: 86px;
  padding: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 18px 40px rgba(90, 53, 31, .08);
}
.theory-document h1 {
  margin: 58px 0 22px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--line);
  color: var(--brown);
  font-size: 2rem;
  line-height: 1.45;
}
.theory-document h1:first-child {
  margin-top: 0;
}
.theory-document h2 {
  margin: 34px 0 14px;
  font-size: 1.45rem;
  line-height: 1.55;
}
.theory-document h3 {
  margin: 26px 0 10px;
  font-size: 1.15rem;
  color: var(--brown);
}
.theory-document p,
.theory-document li,
.theory-document blockquote {
  font-size: 1rem;
  line-height: 2.05;
}
.theory-document blockquote {
  margin: 22px 0;
  padding: 18px 22px;
  border-left: 5px solid var(--brown);
  background: var(--bg);
  font-weight: 700;
}
.theory-document hr {
  margin: 42px 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.theory-document ul {
  padding-left: 1.4em;
}
.theory-document ol {
  padding-left: 1.45em;
}
.theory-document table {
  width: 100%;
  margin: 24px 0 34px;
  border-collapse: collapse;
  font-size: .96rem;
  line-height: 1.7;
}
.theory-document th,
.theory-document td {
  padding: 13px 15px;
  border: 1px solid var(--line);
  vertical-align: top;
}
.theory-document th {
  background: var(--brown);
  color: var(--white);
  text-align: left;
  font-weight: 900;
}
.theory-document tr:nth-child(even) td {
  background: var(--bg);
}

.footer {
  padding: 35px 0;
  background: #27190f;
  color: #e6d7c8;
}
.footer-in {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  font-size: .84rem;
}
.footer a { margin-right: 15px; }

@media (max-width: 960px) {
  .hero { min-height: auto; background: linear-gradient(180deg, #fffaf4 0 48%, var(--alt) 48%); }
  .hero-layout,
  .intro-grid,
  .dialogue-grid,
  .use-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 3.8rem; }
  .hero-art { max-width: 860px; margin: 0 auto; }
  .hero-art img { min-height: 0; }
  h2 { font-size: 2.25rem; }
  .background-card { grid-template-columns: 1fr; }
  .background-card h2 { white-space: normal; }
  .theory-hero h1 { font-size: 3.2rem; }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 32px); }
  .site-header { height: 62px; }
  .brand { font-size: .92rem; }
  .menu-button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    font-weight: 800;
  }
  .header-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 16px 34px rgba(90, 53, 31, .16);
  }
  .header-links.is-open { display: flex; }
  .header-links.always {
    position: static;
    display: flex;
    flex-direction: row;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }
  .header-links.always a {
    padding: 0;
    font-size: .78rem;
  }
  .header-links a { padding: 12px; }
  .hero { padding: 44px 0 58px; }
  .hero h1 { font-size: 2.45rem; }
  .hero-lead { font-size: .98rem; }
  .hero-actions .btn,
  .hero-actions .text-link { width: 100%; text-align: center; }
  .section { padding: 66px 0; }
  h2 { font-size: 1.85rem; }
  .guide-card,
  .guide-card.horizontal,
  .soft-cta { grid-template-columns: 64px 1fr; padding: 16px; }
  .character-face,
  .soft-cta .character-face {
    width: 64px;
    height: 64px;
  }
  .model-note { width: 100%; }
  .model-note { white-space: normal; }
  .report-body { padding: 24px 18px 28px; }
  .background-card { padding: 22px; }
  .theory-hero {
    padding: 52px 0 42px;
    background: linear-gradient(180deg, #fffaf4 0 50%, var(--alt) 50% 100%);
  }
  .theory-hero h1 { font-size: 2.3rem; }
  .theory-document {
    margin-top: 34px;
    margin-bottom: 58px;
    padding: 26px 18px;
  }
  .theory-document h1 { font-size: 1.55rem; }
  .theory-document h2 { font-size: 1.25rem; }
  .dialogue-row,
  .ai-row { grid-template-columns: 1fr; }
  .ai-row .bubble,
  .ai-mark {
    grid-column: auto;
    grid-row: auto;
    justify-self: start;
  }
  .bubble { max-width: 100%; }
  .footer { padding-bottom: 48px; }
}

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