/* 041 ぴこラボ ― 色はここだけ触れば差し替わる */
:root {
  --c-bg: #f6f2ff;
  --c-purple: #6c2bd9;
  --c-accent-text: #5b21b6;
  --c-yellow: #ffd23f;
  --c-mint: #2dd4bf;
  --c-pink: #ffb3d1;
  --c-ink: #1e1240;
  --c-text: #374151;
  --c-sub: #4b5563;
  --font: "M PLUS Rounded 1c", sans-serif;
  --font-head: "Mochiy Pop One", sans-serif;
  --font-dot: "DotGothic16", monospace;
  --line: 3px solid var(--c-ink);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-weight: 500; font-size: 16px; line-height: 1.85; color: var(--c-text); background: var(--c-bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
h1, h2, h3, p, dd, li { word-break: auto-phrase; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.tag { display: inline-block; font-family: var(--font-dot); font-size: 18px; letter-spacing: .08em; background: var(--c-purple); color: #fff; padding: 2px 14px; border-radius: 8px; margin-bottom: 16px; white-space: nowrap; }
.tag--ink { background: var(--c-ink); }
.h2 { font-family: var(--font-head); font-size: clamp(26px, 4.2vw, 44px); line-height: 1.4; color: var(--c-ink); margin-bottom: 28px; }
.note { margin-top: 16px; font-size: 15px; color: var(--c-sub); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 14px; font-weight: 800; text-decoration: none; white-space: nowrap; flex: none; border: var(--line); transition: transform .15s, box-shadow .15s; }
.btn--yellow { background: var(--c-yellow); color: var(--c-ink); box-shadow: 0 5px 0 var(--c-ink); }
.btn--yellow:hover, .btn--yellow:focus-visible { transform: translateY(2px); box-shadow: 0 3px 0 var(--c-ink); }
.btn--line { background: #fff; color: var(--c-ink); box-shadow: 0 5px 0 var(--c-ink); }
.btn--line:hover, .btn--line:focus-visible { transform: translateY(2px); box-shadow: 0 3px 0 var(--c-ink); }
.btn--lg { min-height: 58px; padding: 0 28px; font-size: 17px; }
.btn--xl { min-height: 72px; padding: 0 40px; font-size: clamp(18px, 2.2vw, 22px); font-family: var(--font-head); font-weight: 400; }

/* ===== 読み込み（A06） ===== */
.loader { display: none; }
.is-loading .loader {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  background: var(--c-purple); color: #fff;
  animation: loader-safety .4s 2.6s forwards; /* JSが途中で止まっても、2.6秒で必ず消える */
}
.loader__pico { width: 120px; height: 140px; }
.loader__num { font-family: var(--font-dot); font-size: 44px; line-height: 1; letter-spacing: .08em; }
.loader__bar { width: 200px; height: 10px; border: 3px solid #fff; border-radius: 6px; overflow: hidden; }
.loader__bar span { display: block; height: 100%; background: var(--c-yellow); transform-origin: 0 50%; transform: scaleX(0); }
@keyframes loader-safety { to { opacity: 0; visibility: hidden; } }

/* ===== ヘッダー ===== */
.header { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 50; }
.header__inner { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 8px 0 14px; background: #fff; border: var(--line); border-radius: 20px; box-shadow: 0 5px 0 var(--c-ink); }
.logo { display: flex; align-items: center; gap: 6px; min-height: 48px; text-decoration: none; color: var(--c-ink); font-family: var(--font-head); font-size: 21px; white-space: nowrap; flex: none; }
.logo__pico { width: 32px; height: 38px; }
.gnav { display: none; }
.header__btn { margin-left: auto; min-height: 44px; padding: 0 14px; font-size: 15px; box-shadow: none; border-width: 2px; }
@media (min-width: 1080px) {
  .header { top: 20px; left: 32px; right: 32px; }
  .header__inner { height: 76px; padding: 0 14px 0 24px; gap: 28px; }
  .logo { font-size: 26px; }
  .gnav { display: flex; gap: 24px; margin-left: auto; }
  .gnav a { display: flex; align-items: center; min-height: 44px; font-weight: 800; text-decoration: none; color: var(--c-ink); }
  .gnav a:hover { color: var(--c-accent-text); }
  .header__btn { margin-left: 0; padding: 0 22px; }
}
.spmenu { flex: none; }
.spmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 12px; background: var(--c-mint); border: var(--line); color: var(--c-ink); }
.spmenu summary::-webkit-details-marker { display: none; }
.spmenu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spmenu__bar, .spmenu__bar::before, .spmenu__bar::after { display: block; width: 18px; height: 3px; border-radius: 2px; background: currentColor; position: relative; }
.spmenu__bar::before, .spmenu__bar::after { content: ""; position: absolute; left: 0; }
.spmenu__bar::before { top: -6px; } .spmenu__bar::after { top: 6px; }
.spmenu[open] .spmenu__bar { background: transparent; }
.spmenu[open] .spmenu__bar::before { top: 0; transform: rotate(45deg); }
.spmenu[open] .spmenu__bar::after { top: 0; transform: rotate(-45deg); }
.spmenu__nav { position: absolute; left: 0; right: 0; top: calc(100% + 10px); background: #fff; border: var(--line); border-radius: 20px; box-shadow: 0 5px 0 var(--c-ink); padding: 8px 20px; display: flex; flex-direction: column; }
.spmenu__nav a { display: flex; align-items: center; min-height: 52px; font-weight: 800; font-size: 17px; color: var(--c-ink); text-decoration: none; border-bottom: 2px dashed rgba(30, 18, 64, .2); }
.spmenu__nav a:last-child { border-bottom: 0; }
@media (min-width: 1080px) { .spmenu { display: none; } }

/* ===== メインビジュアル（E04 のスクランブル） ===== */
.hero { background: var(--c-purple); color: #fff; padding: 112px 20px 72px; overflow: hidden; position: relative;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 2px, transparent 2.5px); background-size: 28px 28px; }
.hero__inner { max-width: 1200px; margin: 0 auto; display: grid; gap: 48px; }
.hero__code { font-family: var(--font-dot); font-size: clamp(17px, 2vw, 22px); letter-spacing: .06em; color: var(--c-yellow); min-height: 1.6em; }
.hero__title { font-family: var(--font-head); font-size: clamp(42px, 8.4vw, 96px); line-height: 1.25; margin: 8px 0 20px; text-shadow: 4px 4px 0 var(--c-ink); }
.hero__lead { font-size: 17px; margin-bottom: 28px; color: #fff; }
.hero__btns { display: flex; flex-wrap: wrap; gap: 16px; }
.hero__visual { position: relative; margin: 0 8px 24px 0; }
.hero__photo { border: var(--line); border-radius: 28px; overflow: hidden; transform: rotate(2deg); box-shadow: 10px 10px 0 var(--c-yellow); }
.hero__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero__robot { position: absolute; width: 42%; left: -6%; bottom: -14%; filter: drop-shadow(4px 4px 0 var(--c-ink)); }
.pixel { position: absolute; width: 22px; height: 22px; border: 3px solid var(--c-ink); }
.pixel--1 { background: var(--c-mint); right: -4px; top: -24px; }
.pixel--2 { background: var(--c-yellow); right: 30%; top: -40px; width: 14px; height: 14px; }
.pixel--3 { background: var(--c-pink); right: -12px; bottom: 20%; }
@media (min-width: 1080px) {
  .hero { padding: 160px 6vw 120px; }
  .hero__inner { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 64px; }
}

/* ===== 身につくこと ===== */
.learn { padding: 112px 0; }
.powers { display: grid; gap: 20px; }
.power { border: var(--line); border-radius: 24px; padding: 28px 24px; box-shadow: 6px 6px 0 var(--c-ink); color: var(--c-ink); }
.power--mint { background: #a7f0e4; } .power--yellow { background: #ffe58a; } .power--pink { background: var(--c-pink); }
.power__no { font-family: var(--font-dot); font-size: 28px; line-height: 1; }
.power h3 { font-family: var(--font-head); font-size: 24px; margin: 8px 0; }
.power p:last-child { font-weight: 500; }
@media (min-width: 900px) { .powers { grid-template-columns: repeat(3, 1fr); gap: 28px; } .learn { padding: 160px 0; } }

/* ===== コース ===== */
.course { padding: 0 0 112px; }
.courses { display: grid; gap: 24px; }
.ccard { background: #fff; border: var(--line); border-radius: 24px; overflow: hidden; }
.ccard img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-bottom: var(--line); }
.ccard__body { padding: 24px; }
.ccard__who { display: inline-block; background: var(--c-bg); color: var(--c-accent-text); font-weight: 800; border-radius: 999px; padding: 0 12px; }
.ccard h3 { font-family: var(--font-head); font-size: 22px; color: var(--c-ink); margin: 10px 0 8px; }
@media (min-width: 900px) { .courses { grid-template-columns: repeat(3, 1fr); gap: 28px; } .course { padding-bottom: 160px; } }

/* ===== 発表会 ===== */
.event { background: var(--c-mint); border-top: var(--line); border-bottom: var(--line); padding: 96px 0; }
.event__inner { display: grid; gap: 40px; }
.event__photo { border: var(--line); border-radius: 24px; overflow: hidden; transform: rotate(-2deg); background: #fff; }
.event__photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.event__body { color: var(--c-ink); }
.event__body > p:not(.tag) { font-weight: 500; }
.event__voice { margin-top: 24px; background: #fff; border: var(--line); border-radius: 20px; padding: 16px 20px; font-weight: 800 !important; }
.event__voice small { display: block; font-size: 15px; font-weight: 500; color: var(--c-sub); }
@media (min-width: 900px) { .event { padding: 140px 0; } .event__inner { grid-template-columns: 1fr 1fr; align-items: center; gap: 72px; } }

/* ===== 料金 ===== */
.price { padding: 112px 0; }
.table-scroll { overflow-x: auto; }
.fee { width: 100%; min-width: 360px; border-collapse: separate; border-spacing: 0; background: #fff; border: var(--line); border-radius: 20px; overflow: hidden; }
.fee th, .fee td { padding: 16px; text-align: left; border-bottom: 2px solid #e6dcff; }
.fee tr:last-child th, .fee tr:last-child td { border-bottom: 0; }
.fee thead th { background: var(--c-ink); color: #fff; font-weight: 800; }
.fee tbody th { font-weight: 800; color: var(--c-ink); white-space: nowrap; }
.fee th, .fee td { padding-left: 12px; padding-right: 12px; }
.fee td:last-child { font-family: var(--font-dot); font-size: 19px; color: var(--c-ink); white-space: nowrap; }

/* ===== 無料体験 ===== */
.trial { background: var(--c-purple); padding: 112px 20px; text-align: center; color: #fff;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 2px, transparent 2.5px); background-size: 28px 28px; }
.trial__title { font-family: var(--font-head); font-size: clamp(32px, 6vw, 64px); line-height: 1.3; margin-bottom: 16px; text-shadow: 4px 4px 0 var(--c-ink); }
.trial p { margin-bottom: 36px; font-weight: 800; }

/* ===== アクセス ===== */
.access { padding: 112px 0 160px; }
.access__inner { display: grid; gap: 16px; }
.info div { display: grid; gap: 2px; padding: 16px 0; border-bottom: 2px dashed rgba(30, 18, 64, .25); }
.info dt { font-weight: 800; color: var(--c-ink); }
@media (min-width: 768px) { .access__inner { grid-template-columns: 1fr 2fr; gap: 64px; } .info div { grid-template-columns: 7em 1fr; gap: 24px; } }

/* ===== 演出③（G01）：右下の隅からのぞくピコ ===== */
.peek { position: fixed; z-index: 40; right: 0; bottom: 0; width: 210px; height: 150px; pointer-events: none; }
.peek__pico { position: absolute; right: -14px; bottom: -34px; width: 96px; height: 112px; transform: rotate(-10deg); }
.peek__bubble { position: absolute; right: 70px; bottom: 82px; background: #fff; color: var(--c-ink); border: var(--line); border-radius: 16px; padding: 4px 12px; font-weight: 800; font-size: 15px; line-height: 1.6; white-space: nowrap; box-shadow: 3px 3px 0 var(--c-ink); }
.peek__bubble::after { content: ""; position: absolute; right: 12px; bottom: -11px; width: 16px; height: 16px; background: #fff; border-right: var(--line); border-bottom: var(--line); transform: rotate(45deg); }
@media (max-width: 767px) {
  .peek__pico { width: 72px; height: 84px; right: -12px; bottom: -26px; }
  .peek__bubble { right: 44px; bottom: 58px; }
}
@media (min-width: 1080px) {
  .peek { width: 280px; height: 200px; }
  .peek__pico { width: 128px; height: 150px; right: -16px; bottom: -44px; }
  .peek__bubble { right: 96px; bottom: 112px; font-size: 17px; padding: 6px 16px; }
}
/* 動く版：スマホでは吹き出しを、ひとことが変わったときだけ出す */
.is-motion .peek__bubble.is-quiet { opacity: 0; transform: translateY(8px) scale(.9); }
.peek__bubble { transition: opacity .3s, transform .3s; transform-origin: 90% 100%; }

/* ===== フッター ===== */
.footer { background: var(--c-ink); color: #ece6ff; padding: 64px 20px 32px; text-align: center; font-size: 15px; }
.footer__logo { font-family: var(--font-head); font-size: 36px; color: var(--c-yellow); }
.footer__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 24px; margin: 16px 0; }
.footer__nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 800; }
.footer__fiction { margin-top: 24px; }
.nowrap { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .is-loading .loader { display: none; }
}
