/* AI自由研究 レポート共有スタイル（r020 のデザイン体系を踏襲＋インタラクティブ図版用） */
:root {
  --orange: #FF6B35; --orange-deep: #E84F1B; --yellow: #FFCE2E; --yellow-soft: #FFE89C;
  --pink: #FFB7D8; --pink-soft: #FFDFEC; --mint: #B5EBD9; --mint-soft: #DEF6EE;
  --lavender: #D6C9F8; --lavender-soft: #ECE6FB; --cream: #FFF9EE; --paper: #FAF5EA;
  --ink: #1B1410; --ink-2: #4A3D33; --warm-gray: #8A7C72;
  --shadow-1: 4px 4px 0 var(--ink); --shadow-2: 6px 6px 0 var(--ink); --shadow-3: 8px 8px 0 var(--ink);
  --serif: 'Fraunces','Noto Serif JP',serif; --hand: 'Caveat',cursive;
  --sans: 'Plus Jakarta Sans','Noto Sans JP',sans-serif; --mono: 'DM Mono','Menlo',monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.7; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden; }
::selection { background: var(--ink); color: var(--lavender); }
a { color: inherit; }
.nav { position: sticky; top: 0; z-index: 100; background: var(--cream); border-bottom: 3px solid var(--ink); padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; }
.nav-mark { text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.brand-logo { display: block; background: currentColor; -webkit-mask: url(allfesta-logo.svg) center/contain no-repeat; mask: url(allfesta-logo.svg) center/contain no-repeat; }
.nav-mark .brand-logo { height: 28px; width: 64px; color: var(--ink); transition: color .2s ease; }
.nav-mark:hover .brand-logo { color: var(--orange); }
.nav-mark .labs-tag { font-family: var(--mono); font-size: 11px; font-weight: 500; background: var(--ink); color: var(--lavender); padding: 4px 10px; border-radius: 999px; letter-spacing: .1em; text-transform: uppercase; }
.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; padding: 10px 16px; border-radius: 999px; transition: background .15s; }
.nav-links a:hover { background: var(--lavender-soft); }
.nav-links .nav-cta { background: var(--ink); color: var(--cream); border: 2px solid var(--ink); box-shadow: var(--shadow-1); margin-left: 8px; transition: transform .15s, box-shadow .15s; }
.nav-links .nav-cta:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--orange); }
.nav-burger { display: none; width: 46px; height: 46px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--orange); position: relative; cursor: pointer; box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s; padding: 0; z-index: 1001; }
.nav-burger:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.nav-burger span { position: absolute; left: 50%; top: 50%; width: 20px; height: 2.5px; background: #fff; border-radius: 2px; transform: translate(-50%,-50%); transition: transform .3s ease, opacity .2s ease; }
.nav-burger span:nth-child(1) { transform: translate(-50%, calc(-50% - 7px)); }
.nav-burger span:nth-child(3) { transform: translate(-50%, calc(-50% + 7px)); }
.nav-burger.open { background: var(--ink); }
.nav-burger.open span:nth-child(1) { transform: translate(-50%,-50%) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translate(-50%,-50%) rotate(-45deg); }
@media (max-width: 720px) {
  .nav { padding: 12px 20px; }
  .nav-burger { display: block; }
  .nav-links { position: fixed; inset: 0; width: 100vw; height: 100dvh; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--lavender); z-index: 1000; padding: 96px 32px 40px; margin: 0; transform: translateX(100%); transition: transform .35s ease; overflow-y: auto; }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-family: var(--serif); font-weight: 800; font-size: 26px; padding: 18px 32px; border-radius: 22px; background: #fff; border: 2.5px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); text-align: center; min-width: 240px; }
  .nav-links .nav-cta { background: var(--orange); color: #fff; margin-left: 0; margin-top: 12px; box-shadow: 5px 5px 0 var(--ink); transform: none; }
  body.menu-open { overflow: hidden; }
}
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 28px; border-radius: 999px; font-family: var(--sans); font-weight: 700; text-decoration: none; font-size: 16px; border: 3px solid var(--ink); background: #fff; color: var(--ink); box-shadow: var(--shadow-2); cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; white-space: nowrap; }
.btn:hover { transform: translate(-3px,-3px); box-shadow: var(--shadow-3); }
.btn:active { transform: translate(0,0); box-shadow: var(--shadow-1); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-yellow { background: var(--yellow); }
.btn-pink { background: var(--pink); }
.btn-lav { background: var(--lavender); }
.btn-sm { padding: 11px 20px; font-size: 14px; border-width: 2.5px; box-shadow: var(--shadow-1); }
.r-hero { background: var(--lavender-soft); border-bottom: 3px solid var(--ink); padding: 56px 28px 72px; position: relative; overflow: hidden; }
.r-hero-inner { max-width: 820px; margin: 0 auto; position: relative; z-index: 3; }
.crumb { font-family: var(--mono); font-size: 12px; color: var(--ink-2); letter-spacing: .06em; margin-bottom: 22px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumb a { text-decoration: none; font-weight: 600; }
.crumb a:hover { text-decoration: underline; }
.crumb .sep { opacity: .45; }
.r-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--ink); color: var(--lavender); border-radius: 999px; font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .12em; margin-bottom: 22px; transform: rotate(-1.5deg); }
.r-eyebrow .pulse { width: 8px; height: 8px; background: var(--orange); border-radius: 50%; animation: pulse 1.5s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .5; transform: scale(1.4);} }
.r-hero h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(32px, 5.4vw, 60px); line-height: 1.08; letter-spacing: -0.035em; margin: 0 0 18px; font-variation-settings: "SOFT" 100, "opsz" 144; }
.r-hero h1 .mark { position: relative; display: inline-block; font-style: italic; color: var(--orange-deep); }
.r-hero h1 .mark::after { content: ''; position: absolute; left: -3%; right: -3%; bottom: 10%; height: 14px; background: var(--yellow); z-index: -1; border-radius: 999px; transform: rotate(-1deg); }
.r-sub { font-family: var(--mono); font-size: 13px; color: var(--ink-2); letter-spacing: .04em; margin: 0 0 26px; }
.r-meta { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; }
.r-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px; border: 2.5px solid var(--ink); background: #fff; font-size: 13px; font-weight: 700; }
.r-chip.r-strong { background: var(--orange); color: #fff; }
.r-chip.r-warn { background: var(--ink); color: var(--cream); font-weight: 600; font-size: 12px; }
.r-byline { margin-top: 22px; font-family: var(--mono); font-size: 12px; color: var(--ink-2); letter-spacing: .03em; }
.paper { max-width: 820px; margin: 0 auto; padding: 72px 28px; }
.sec { margin-bottom: 64px; position: relative; }
.sec:last-child { margin-bottom: 0; }
.sec-tag { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; font-weight: 500; background: var(--ink); color: var(--cream); padding: 7px 15px; border-radius: 999px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 8px; transform: rotate(-1deg); }
.sec h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.15; letter-spacing: -0.03em; margin: 14px 0 18px; font-variation-settings: "SOFT" 100, "opsz" 144; }
.sec h2 .jp { display: block; font-size: .62em; color: var(--warm-gray); font-weight: 700; font-style: normal; margin-top: 2px; }
.sec p { font-size: 16.5px; margin: 0 0 16px; }
.sec p.lead { font-family: var(--serif); font-size: clamp(18px, 2vw, 22px); font-weight: 500; line-height: 1.7; }
.sec ul.body { padding-left: 1.2rem; margin: 0 0 16px; }
.sec ul.body li { margin: 6px 0; font-size: 16px; }
.scribble { font-family: var(--hand); font-size: 24px; color: var(--orange-deep); display: inline-block; margin: 4px 0; }
.dl { border: 3px solid var(--ink); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-1); background: #fff; margin: 22px 0 8px; }
.dl-row { display: grid; grid-template-columns: 200px 1fr; border-bottom: 2px solid var(--ink); }
.dl-row:last-child { border-bottom: 0; }
.dl-row dt { background: var(--paper); padding: 14px 18px; font-weight: 700; font-size: 14px; border-right: 2px solid var(--ink); display: flex; align-items: center; }
.dl-row dd { margin: 0; padding: 14px 18px; font-size: 14.5px; }
@media (max-width: 600px) { .dl-row { grid-template-columns: 1fr; } .dl-row dt { border-right: 0; border-bottom: 2px dashed var(--ink); } }
.kpi { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin: 22px 0; }
@media (max-width: 560px) { .kpi { grid-template-columns: 1fr; } }
.kpi .card { background: #fff; border: 3px solid var(--ink); border-radius: 16px; padding: 16px 14px; box-shadow: var(--shadow-1); }
.kpi .k { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
.kpi .v { font-family: var(--serif); font-weight: 900; font-size: clamp(20px, 4vw, 28px); line-height: 1.1; color: var(--orange-deep); font-variation-settings: "SOFT" 100, "opsz" 144; }
.kpi .vsub { font-family: var(--mono); font-size: 11px; color: var(--ink-2); margin-top: 4px; }
.find { list-style: none; padding: 0; margin: 18px 0; display: flex; flex-direction: column; gap: 12px; }
.find li { background: var(--lavender-soft); border: 2.5px solid var(--ink); border-radius: 14px; padding: 14px 18px; font-size: 15px; font-weight: 500; display: flex; gap: 12px; align-items: flex-start; }
.find li .bullet { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--lavender); font-family: var(--mono); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.disclaimer { background: var(--ink); color: var(--cream); border-radius: 18px; padding: 22px 26px; text-align: center; margin: 28px 0; }
.disclaimer .big { font-family: var(--serif); font-weight: 800; font-size: clamp(17px,2.2vw,22px); margin-bottom: 6px; }
.disclaimer .small { font-size: 13px; color: rgba(255,250,238,.65); }
.flow { background: var(--orange); border: 3px solid var(--ink); border-radius: 26px; box-shadow: var(--shadow-3); padding: 40px 34px; text-align: center; color: #fff; margin: 8px 0; }
.flow .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; opacity: .85; }
.flow h2 { font-family: var(--serif); font-weight: 900; color: #fff; font-size: clamp(24px, 3.4vw, 36px); line-height: 1.2; margin: 12px 0 14px; font-variation-settings: "SOFT" 100, "opsz" 144; }
.flow p { font-size: 15.5px; max-width: 560px; margin: 0 auto 26px; color: rgba(255,255,255,.92); }
.flow-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.flow .btn { border-color: var(--ink); }
.refs { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-direction: column; gap: 12px; }
.refs li { background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 14px 18px; display: flex; gap: 14px; align-items: flex-start; }
.refs .tag { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #fff; background: var(--ink); }
.refs .nm { font-weight: 700; font-size: 14.5px; }
.refs .nm a { color: var(--orange-deep); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.refs .mt { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.share { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.share .lbl { font-weight: 700; font-size: 14px; margin-right: 4px; }
.footer { background: var(--ink); color: var(--cream); padding: 60px 28px 40px; text-align: center; }
.footer-mark { display: inline-flex; align-items: center; gap: 12px; color: var(--cream); }
.footer-mark .brand-logo { height: 36px; width: 81px; color: var(--cream); }
.footer-mark .labs-tag { font-family: var(--mono); font-size: 12px; font-weight: 500; background: var(--yellow); color: var(--ink); padding: 4px 12px; border-radius: 999px; letter-spacing: .1em; text-transform: uppercase; }
.footer-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; color: rgba(255,250,238,.6); margin-top: 10px; text-transform: uppercase; }
.footer-links { margin-top: 28px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.footer-links a { color: var(--cream); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 16px; border-radius: 999px; transition: background .15s; }
.footer-links a:hover { background: rgba(255,250,238,.1); }
.footer-coffee { margin-top: 32px; font-family: var(--hand); font-size: 24px; color: var(--yellow); }
.footer-copyright { margin-top: 16px; font-family: var(--mono); font-size: 11px; color: rgba(255,250,238,.4); letter-spacing: .1em; }
.stamp { position: absolute; width: 112px; height: 112px; border: 4px solid var(--orange-deep); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 900; color: var(--orange-deep); background: rgba(255,250,238,.5); text-align: center; font-size: 16px; line-height: 1.25; pointer-events: none; z-index: 4; font-variation-settings: "SOFT" 100, "opsz" 144; letter-spacing: .04em; opacity: .9; }
.stamp::before { content: ''; position: absolute; inset: 7px; border: 2px solid var(--orange-deep); border-radius: 50%; opacity: .45; }
.stamp.s-hero { bottom: -18px; right: 24px; transform: rotate(-13deg); }
@media (max-width: 720px) { .stamp.s-hero { display: none; } }
.accuracy-note { border: 2.5px solid var(--orange-deep); border-radius: 14px; background: var(--yellow-soft); padding: 16px 20px; margin: 22px 0; font-size: 14.5px; line-height: 1.75; }
.accuracy-note .note-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-deep); font-weight: 700; display: block; margin-bottom: 8px; }

/* ============ インタラクティブ図版（本研究用に追加） ============ */
.tool-card { background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: var(--shadow-2); padding: 20px 18px; margin: 24px 0; }
.tool-canvas-wrap { position: relative; border: 2.5px solid var(--ink); border-radius: 14px; overflow: hidden; background: #070b16; }
.tool-canvas-wrap canvas { display: block; width: 100%; }
.tool-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(7,11,22,.7); color: #cfe8ff; font-family: var(--mono); font-size: 13px; }
.ctrls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 18px; margin: 18px 0 4px; }
@media (max-width: 560px) { .ctrls { grid-template-columns: 1fr 1fr; } }
.ctrl { font-size: 13px; }
.ctrl .lab { display: flex; justify-content: space-between; font-weight: 700; color: var(--ink-2); }
.ctrl .lab b { color: var(--ink); font-family: var(--mono); }
.ctrl input[type=range] { width: 100%; accent-color: var(--orange); margin-top: 4px; }
.ctrl select { width: 100%; margin-top: 4px; padding: 7px 8px; border: 2px solid var(--ink); border-radius: 8px; font-family: var(--sans); font-weight: 600; background: #fff; }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg button { padding: 8px 14px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fff; font-weight: 700; font-size: 13px; cursor: pointer; }
.seg button.on { background: var(--orange); color: #fff; }
.tool-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.verdict { border-radius: 14px; padding: 14px 18px; text-align: center; font-weight: 800; border: 2.5px solid var(--ink); box-shadow: var(--shadow-1); margin: 16px 0; }
.verdict.bad { background: var(--orange); color: #fff; }
.verdict.ok { background: var(--mint); color: var(--ink); }
.verdict .sub { display: block; font-weight: 600; font-size: 12.5px; margin-top: 4px; opacity: .9; }
.statgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
@media (max-width: 560px) { .statgrid { grid-template-columns: 1fr 1fr; } }
.statgrid .s { background: var(--paper); border: 2px solid var(--ink); border-radius: 12px; padding: 10px 12px; }
.statgrid .s .k { font-family: var(--mono); font-size: 10px; letter-spacing: .04em; color: var(--ink-2); text-transform: uppercase; }
.statgrid .s .v { font-family: var(--serif); font-weight: 900; font-size: 19px; color: var(--orange-deep); line-height: 1.15; }
.viol { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.viol li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 9px 13px; }
.viol li .x { font-weight: 800; color: var(--orange-deep); }
.viol li .o { font-weight: 800; color: #1a8a4a; }
.place { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
@media (max-width: 560px) { .place { grid-template-columns: 1fr; } }
.place .card { border: 2.5px solid var(--ink); border-radius: 12px; padding: 12px 14px; background: #fff; box-shadow: var(--shadow-1); }
.place .card .h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.place .card .dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--ink); }
.place .card .co { font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.place .card a { display: inline-block; margin-top: 6px; font-weight: 700; font-size: 13px; color: var(--orange-deep); }
.tool-note { font-family: var(--mono); font-size: 11px; color: var(--warm-gray); margin: 10px 2px 0; line-height: 1.6; }
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal-anim { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
  html.js .reveal-anim.in { opacity: 1; transform: none; }
}
