/* ===============================
   Chingu-net Renewal — Design Tokens
   =============================== */
:root {
  /* ============ Light blue base + Korean Obangsaek (五方色) accents ============
     Obangsaek — the five cardinal colors:
       청 (青) blue   — east  → primary subaccent
       적 (赤) red    — south → energy / CTA
       황 (黄) yellow — center → highlight
       백 (白) white  — west  → space
       흑 (黒) black  — north → ink
  */
  --bg: #f1f6fc;          /* pale sky base */
  --bg-2: #e3eef8;        /* cooler pale blue */
  --bg-paper: #ffffff;    /* paper white (백) */
  --ink: #1a1a1a;         /* deep ink (흑) */
  --ink-2: #3d4654;       /* body text, blue-tinted */
  --muted: #8294a8;       /* muted blue-grey */
  --line: #d9e4f0;        /* soft blue line */

  /* === Obangsaek 五方色 === */
  --ob-blue: #2e5bba;       /* 청 — east */
  --ob-blue-deep: #1f3f8c;
  --ob-blue-soft: #cfdcf2;
  --ob-red: #c8252c;        /* 적 — south */
  --ob-red-soft: #f4cdce;
  --ob-yellow: #e8b339;     /* 황 — center */
  --ob-yellow-soft: #f7e3a3;
  --ob-white: #ffffff;      /* 백 — west */
  --ob-black: #1a1a1a;      /* 흑 — north */

  /* Page primary (light blue family) */
  --sky: #4a8fd6;
  --sky-mid: #7fb1e3;
  --sky-soft: #c4dcf2;
  --sky-pale: #eaf3fb;

  /* === Legacy aliases (mapped to Obangsaek so existing rules adopt the palette) === */
  --green: var(--ob-blue);
  --green-deep: var(--ob-blue-deep);
  --green-soft: var(--sky-soft);
  --terra: var(--ob-red);
  --terra-soft: var(--ob-red-soft);
  --yellow: var(--ob-yellow);
  --yellow-soft: var(--ob-yellow-soft);
  --pink: var(--ob-red-soft);
  --mint: var(--sky-mid);

  --radius-sm: 10px;
  --radius: 20px;
  --radius-lg: 32px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 0 rgba(46,91,186,0.06);
  --shadow-md: 0 12px 32px -14px rgba(46,91,186,0.30);
  --shadow-lg: 0 32px 64px -22px rgba(31,63,140,0.28);

  /* Obangsaek (五方色) stripe — used on placeholder image bottom edges & accents */
  --ob-stripe: linear-gradient(90deg,
    var(--ob-blue) 0 20%,
    var(--ob-red) 20% 40%,
    var(--ob-yellow) 40% 60%,
    var(--ob-white) 60% 80%,
    var(--ob-black) 80% 100%);

  /* フォント統一：全ページを丸ゴシック（Zen Maru Gothic）に統一 */
  --f-head: "Zen Maru Gothic", "Noto Sans KR", sans-serif;
  --f-body: "Zen Maru Gothic", "Noto Sans KR", system-ui, sans-serif;
  --f-accent: "Zen Maru Gothic", "Noto Sans KR", sans-serif;

  --container: 1200px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
html { overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============ Header / Nav ============ */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  padding: 18px 0;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}
.site-header.scrolled {
  background: rgba(241,246,252,0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--line);
  padding: 12px 0;
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}
.logo {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--f-head);
  font-size: 19px; font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.02em;
  background: rgba(255,255,255,0.88);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 6px 20px 6px 7px;
  box-shadow: 0 2px 10px rgba(60,40,20,0.08);
  transition: box-shadow .3s;
  background-image: linear-gradient(rgba(255,255,255,0.94), rgba(255,255,255,0.94)), linear-gradient(90deg, #4285f4 0%, #4285f4 25%, #db4437 25%, #db4437 50%, #f4b400 50%, #f4b400 72%, #2f2f2f 72%, #2f2f2f 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}
.logo:hover { box-shadow: 0 4px 16px rgba(60,40,20,0.14); }
.logo-mark {
  width: 36px; height: 36px;
  border-radius: 6px;
  background: var(--green);
  color: #ffffff;
  display: grid; place-items: center;
  font-family: var(--f-head);
  font-size: 16px;
  flex: 0 0 auto;
  position: relative;
  transition: transform 0.4s;
}
.logo:hover .logo-mark { transform: rotate(-12deg) scale(1.05); }
.logo-mark::after {
  content: "";
  position: absolute; inset: -4px;
  border-radius: 8px;
  border: 1px dashed var(--green);
  opacity: 0.5;
}
.logo small {
  font-family: var(--f-body);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--muted);
  display: block;
  line-height: 1;
}
.logo-name span { font-size: 17px; line-height: 1.15; }
.logo-name { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.logo-name span, .logo-name small { white-space: nowrap; }
.nav-links {
  display: flex; gap: 28px; align-items: center;
  font-size: 14px; font-weight: 500;
}
.nav-links a { position: relative; padding: 6px 0; }
.nav-links a::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  width: 0; height: 2px; background: var(--terra);
  transition: all 0.3s ease; transform: translateX(-50%);
}
.nav-links a:hover::after { width: 100%; }
.nav-links a .kr {
  font-size: 10px; color: var(--muted);
  display: block; text-align: center; letter-spacing: 0.15em;
  margin-top: -2px;
}
.nav-links a.nav-cta {
  padding: 6px;
  border-radius: var(--radius-pill);
  background: var(--green-deep);
  color: #ffffff !important;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex; align-items: center; gap: 8px;
}
.nav-cta:hover {
  background: var(--green-deep);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.nav-cta::after { display: none !important; }

.hamburger {
  display: none;
  width: 44px; height: 44px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: var(--ink);
  color: var(--bg-paper);
  border-radius: 50%;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
  transition: background 0.3s;
  z-index: 60;
  position: relative;
  cursor: pointer;
}
.hamburger span {
  display: block; width: 18px; height: 2px;
  flex: 0 0 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 55;
  padding: 100px 32px 40px;
  display: flex; flex-direction: column; gap: 6px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1), visibility 0.4s;
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); visibility: visible; }
.mobile-menu a {
  padding: 22px 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-head);
  font-size: 22px;
  display: flex; justify-content: space-between; align-items: baseline;
}
.mobile-menu a .kr { font-size: 12px; color: var(--muted); letter-spacing: 0.15em; }
.menu-close {
  position: absolute; top: 18px; right: 18px;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--bg-paper);
  color: var(--ink);
  display: grid; place-items: center;
  font-size: 20px; line-height: 1;
  cursor: pointer;
  padding: 0;
  z-index: 2;
}
.menu-close:hover { background: var(--ink); color: var(--bg-paper); }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600; font-size: 15px;
  transition: all 0.3s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green-deep);
  color: #ffffff;
}
.btn-primary:hover {
  background: #6a9972;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: var(--ink);
  color: #ffffff;
  transform: translateY(-2px);
}
.btn-terra {
  background: var(--terra);
  color: #ffffff;
}
.btn-terra:hover {
  background: #e88d8d;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn .arrow {
  width: 28px; height: 28px; border-radius: 50%;
  background: #ffffff; color: var(--ink);
  display: grid; place-items: center;
  font-size: 14px;
  transition: transform 0.3s;
}
.btn:hover .arrow { transform: translateX(4px); }
.btn-outline .arrow { background: var(--ink); color: #ffffff; }
.btn-outline:hover .arrow { background: #ffffff; color: var(--ink); }

/* ============ Sections / Typography ============ */
section { position: relative; padding: 72px 0; }
@media (max-width: 768px) { section { padding: 52px 0; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; letter-spacing: 0.25em;
  font-weight: 700; color: var(--green-deep);
  text-transform: uppercase;
}
.eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--green-deep);
}
.eyebrow .kr { color: var(--terra); letter-spacing: 0.1em; font-family: var(--f-accent); }

h1, h2, h3, h4 {
  font-family: var(--f-head); font-weight: 500; line-height: 1.35; margin: 0;
  /* Avoid stranded single-character/particle orphans on the last line at
     arbitrary widths (not just fixed breakpoints). word-break stays at its
     default (not keep-all) — Japanese sentences have no inter-word spaces,
     so keep-all leaves too few break points and makes orphans worse. */
  text-wrap: pretty;
  overflow-wrap: break-word;
}
h1 { font-size: clamp(36px, 5.5vw, 68px); letter-spacing: 0.02em; }
h2 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: 0.04em; }
h3 { font-size: clamp(20px, 2.2vw, 26px); }
p  { margin: 0 0 1em; color: var(--ink-2); text-wrap: pretty; }

/* SP: 不自然な改行の抑制（全ページ共通） */
@media (max-width: 620px) {
  h1, h2, h3, h4 { text-wrap: pretty; line-break: strict; overflow-wrap: normal; }
  .section-head p, .pb-lead, .cost-card p, .notes-box li, .sb-list li { line-break: strict; text-wrap: pretty; }
  .ptable th, .ptable td { white-space: nowrap; }
  .ptable td:first-child, .ptable th:first-child { white-space: normal; }
  .btn { white-space: nowrap; }
  .snb { white-space: nowrap; }
  .free-banner b, .free-banner span { line-break: strict; }
}
.section-head { text-align: center; max-width: 860px; margin: 0 auto 40px; }
.section-head :is(h1, h2) { margin: 10px 0 12px; text-wrap: balance; }
/* section-head 内の h1 は h2 と同じ見た目に揃える（見出しレベルはSEO上の構造用） */
.section-head h1 { font-size: clamp(28px, 3.6vw, 44px); letter-spacing: 0.04em; }
.section-head p { color: var(--ink-2); }

/* ============ Placeholders ============ */
.ph {
  position: relative; overflow: hidden;
  background:
    repeating-linear-gradient(135deg,
      rgba(46,91,186,0.10) 0 10px,
      rgba(46,91,186,0.18) 10px 20px),
    var(--sky-pale);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid; place-items: center;
  color: var(--ink-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px; letter-spacing: 0.08em;
  text-align: center; padding: 16px 16px 22px;
}
/* Obangsaek (五方色) stripe along the bottom of every placeholder image */
.ph::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 6px;
  background: var(--ob-stripe);
  pointer-events: none;
}
/* A real photo dropped into a .ph slot — keeps the rounded corners / bottom
   stripe, just swaps the striped placeholder fill for an actual image. */
.ph.photo { padding: 0; background: var(--bg-2); }
.ph.photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.ph.dark {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.10) 0 10px,
      rgba(255,255,255,0.20) 10px 20px),
    var(--ob-blue-deep);
  color: #ffffff;
  border-color: transparent;
}
.ph.terra {
  background:
    repeating-linear-gradient(135deg,
      rgba(200,37,44,0.18) 0 10px,
      rgba(200,37,44,0.30) 10px 20px),
    var(--ob-red-soft);
  color: var(--ob-red);
}

/* ============ Scroll reveal ============ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.in { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }

/* JSが動かない／モーション低減設定の環境でも内容が必ず見えるようにする。
   .reveal は既定で opacity:0 のため、フォールバックが無いと本文全体が不可視になる。 */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============ Footer ============ */
.site-footer {
  background: linear-gradient(180deg, var(--sky-soft) 0%, #b2cee8 100%);
  color: var(--ink);
  padding: 80px 0 30px;
  margin-top: 0;
  position: relative;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px;
  height: 40px;
  background: radial-gradient(circle at 20px 0, var(--sky-soft) 20px, transparent 21px) repeat-x;
  background-size: 40px 40px;
  pointer-events: none;
}
.site-footer::after {
  content: ""; position: absolute; left: 0; right: 0; top: 38px;
  height: 4px;
  background: var(--ob-stripe);
  opacity: 0.85;
  pointer-events: none;
}
.site-footer h4 {
  color: var(--ink);
  font-family: var(--f-accent);
  font-size: 16px; margin-bottom: 18px;
  letter-spacing: 0.08em;
}
.site-footer a { color: var(--ink-2); opacity: 0.85; transition: opacity 0.2s, color 0.2s; font-size: 14px; }
.site-footer a:hover { opacity: 1; color: var(--terra); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(87,83,110,0.12);
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 620px) {
  .site-header .logo { min-width: 0; flex-wrap: wrap; padding: 6px 12px 6px 6px; }
  .site-header .logo-name span { font-size: 14px; }
  .site-header .logo small { display: none; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .site-footer .logo { min-width: 0; flex-wrap: wrap; padding: 6px 14px 6px 7px; }
  .site-footer .logo-name span { font-size: 15px; }
}
.footer-brand p { color: var(--ink-2); font-size: 13px; line-height: 1.9; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 30px;
  font-size: 12px; color: var(--muted);
}
.footer-bottom .kr { font-family: var(--f-head); letter-spacing: 0.1em; }

/* ============ Page header (inner pages) ============ */
.page-hero {
  padding: 180px 0 80px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.page-hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 40% 50% at 15% 60%, rgba(169,207,163,0.35), transparent 60%),
    radial-gradient(ellipse 35% 45% at 85% 40%, rgba(246,197,212,0.40), transparent 60%),
    radial-gradient(ellipse 30% 40% at 60% 80%, rgba(217,200,232,0.30), transparent 60%);
  pointer-events: none;
}
.page-hero h1 { font-size: clamp(36px, 5vw, 56px); position: relative; }
.page-hero .kr-title {
  font-family: var(--f-head);
  font-size: 14px; letter-spacing: 0.3em;
  color: var(--terra); margin-bottom: 14px;
  display: block;
}
.page-hero .crumb {
  display: inline-flex; gap: 10px; align-items: center;
  font-size: 12px; color: var(--muted); letter-spacing: 0.1em;
  margin-top: 24px; position: relative;
}
.page-hero .crumb a { color: var(--ink-2); }
.page-hero .crumb span:last-child { color: var(--terra); }

/* ============ Korean flourishes ============ */
.stamp {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 6px;
  background: var(--terra); color: #ffffff;
  font-family: var(--f-head); font-size: 20px;
  transform: rotate(-4deg);
  box-shadow: 0 4px 0 rgba(74,68,85,0.08);
  letter-spacing: 0;
}

/* ============ Decorative pastel shapes ============ */
.deco { position: absolute; pointer-events: none; z-index: 0; }
.deco svg { display: block; width: 100%; height: 100%; }
.deco.float { animation: floaty 6s ease-in-out infinite; }
.deco.float.d2 { animation-delay: -2s; animation-duration: 7s; }
.deco.float.d3 { animation-delay: -4s; animation-duration: 8s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-10px) rotate(calc(var(--r, 0deg) + 3deg)); }
}
.sec-rel { position: relative; overflow: hidden; }
.sec-rel > .container { position: relative; z-index: 2; }
.hide-sm { display: block; }
@media (max-width: 900px) { .hide-sm { display: none !important; } }

/* ============ Util ============ */
.text-center { text-align: center; }
.mono { font-family: ui-monospace, Menlo, monospace; letter-spacing: 0.05em; }
.kr-accent { font-family: var(--f-head); color: var(--terra); }

/* ============ Scalloped wave dividers (reference-site vibe) ============ */
.wave-top, .wave-bottom {
  position: absolute; left: 0; right: 0;
  height: 40px;
  pointer-events: none;
  z-index: 2;
  --wave-color: var(--bg);
}
.wave-top {
  top: -1px;
  background:
    radial-gradient(circle at 20px 0, var(--wave-color) 20px, transparent 21px) repeat-x;
  background-size: 40px 40px;
}
.wave-bottom {
  bottom: -1px;
  background:
    radial-gradient(circle at 20px 40px, var(--wave-color) 20px, transparent 21px) repeat-x;
  background-size: 40px 40px;
}
section { overflow: visible; }
section.has-waves { position: relative; }


/* ============ Fixed Mobile CTA Bar (sticky bottom, mobile only) ============ */
.mobile-fixed-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  display: none;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px -10px rgba(74,68,85,0.18);
  gap: 10px;
}
.mobile-fixed-cta a {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 999px;
  font-family: var(--f-accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  transition: transform 0.2s, box-shadow 0.2s;
  min-height: 48px;
}
.mobile-fixed-cta a:active { transform: translateY(1px); }
.mobile-fixed-cta a.trial {
  background: var(--terra);
  color: #ffffff;
  box-shadow: 0 8px 20px -10px rgba(255,122,138,0.6);
}
.mobile-fixed-cta a.line {
  background: #06c755;
  color: #ffffff;
  box-shadow: 0 8px 20px -10px rgba(6,199,85,0.5);
}
.mobile-fixed-cta a .ic {
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: grid; place-items: center;
  font-size: 12px;
  font-family: var(--f-head);
}
@media (max-width: 860px) {
  .mobile-fixed-cta { display: flex; }
  body { padding-bottom: 78px; }
}

/* ============ Floating LINE button (desktop, all pages) ============ */
.float-line {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 65;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 14px 16px;
  border-radius: 999px;
  background: #06c755;
  color: #ffffff !important;
  font-family: var(--f-accent);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  box-shadow: 0 14px 32px -10px rgba(6,199,85,0.45);
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
}
.float-line:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -12px rgba(6,199,85,0.55); }
body.hero-in-view .float-line { opacity: 0; pointer-events: none; transform: translateY(10px); }
.float-line .line-ic {
  width: 34px; height: 34px; border-radius: 50%;
  background: #ffffff;
  color: #06c755;
  display: grid; place-items: center;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 16px;
}
.float-line .kr {
  font-size: 10px;
  opacity: 0.85;
  display: block;
  letter-spacing: 0.15em;
  line-height: 1;
  margin-top: 2px;
}
@media (max-width: 860px) {
  .float-line { display: none; }
}

/* ============ Scroll-to-top button (mobile) ============ */
.to-top {
  position: fixed;
  right: 14px;
  bottom: 90px;
  z-index: 65;
  width: 46px; height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,0.94);
  color: var(--ink);
  display: none;
  align-items: center; justify-content: center;
  box-shadow: 0 8px 22px -8px rgba(60,40,20,0.35);
  opacity: 0; pointer-events: none;
  transform: translateY(8px);
  transition: opacity .3s, transform .3s;
  cursor: pointer;
  padding: 0;
}
.to-top svg { width: 17px; height: 17px; }
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
@media (max-width: 860px) { .to-top { display: flex; } }

/* ============ Instagram Tiles (top page) ============ */
.insta-section { background: var(--bg-2); position: relative; }
.insta-section::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 40px;
  background: radial-gradient(circle at 20px 0, var(--bg) 20px, transparent 21px) repeat-x;
  background-size: 40px 40px;
  pointer-events: none; z-index: 2;
}
.insta-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 40px; flex-wrap: wrap; gap: 16px;
}
.insta-head .left .eyebrow { margin-bottom: 10px; }
.insta-head h2 { margin: 0; }
.insta-head .handle {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-accent); font-weight: 700;
  color: var(--ink);
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s;
}
.insta-head .handle:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.insta-head .handle .ig-ic {
  width: 26px; height: 26px; border-radius: 7px;
  background: linear-gradient(135deg, #f56040, #fcaf45 40%, #e4405f 70%, #833ab4);
  color: #ffffff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 11px;
  font-family: var(--f-head);
}
.insta-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
@media (max-width: 900px) { .insta-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .insta-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; } }
.insta-grid .ph {
  aspect-ratio: 1;
  border-radius: 10px;
  font-size: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}
.insta-grid .ph::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(0,0,0,0.25));
  opacity: 0;
  transition: opacity 0.3s;
}
.insta-grid a:hover .ph { transform: scale(1.03); }
.insta-grid a:hover .ph::after { opacity: 1; }

/* ============ Combined-page sticky sub-nav (for course / teachers pages) ============ */
.sub-nav {
  position: sticky;
  top: 72px;
  z-index: 40;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.sub-nav-inner {
  display: flex; gap: 22px; align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sub-nav-inner::-webkit-scrollbar { display: none; }
.sub-nav-inner a {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  transition: all 0.2s;
  font-family: var(--f-accent);
}
.sub-nav-inner a:hover, .sub-nav-inner a.active {
  background: var(--terra-soft);
  color: #c15268;
}
.sub-nav-inner .sub-kr {
  font-size: 12px;
  color: var(--terra);
  font-family: var(--f-head);
  letter-spacing: 0.2em;
  margin-right: 8px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}
@media (max-width: 700px) {
  .sub-nav { top: 64px; padding: 8px 0; }
  .sub-nav-inner .sub-kr { display: none; }
}

/* ============ Teacher cards ============ */
.teacher-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
@media (max-width: 900px) { .teacher-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .teacher-grid { grid-template-columns: 1fr; } }
.teacher-card {
  background: var(--bg-paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex; flex-direction: column;
}
.teacher-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.teacher-card .ph { aspect-ratio: 1 / 1.1; border-radius: 0; border: 0; border-bottom: 1px solid var(--line); }
.teacher-card-body { padding: 26px 26px 28px; }
.teacher-card .role-kr {
  font-family: var(--f-head);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--terra);
  display: block;
  margin-bottom: 6px;
}
.teacher-card h3 {
  margin: 0 0 4px;
  font-size: 22px;
}
.teacher-card .role {
  font-size: 12px; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 14px;
  display: block;
}
.teacher-card p { font-size: 13px; line-height: 1.9; color: var(--ink-2); margin: 0 0 14px; }
.teacher-card .t-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.teacher-card .t-tags span {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sky-soft);
  color: var(--ink-2);
}
.teacher-card .t-tags span:nth-child(2) { background: var(--terra-soft); color: #c15268; }
.teacher-card .t-tags span:nth-child(3) { background: var(--yellow-soft); color: #8a6e1a; }


/* ============ Print hide ============ */
@media print {
  .mobile-fixed-cta, .float-line { display: none !important; }
}


/* ============ Instagram Feed ============ */
.insta { background: var(--bg); position: relative; padding-top: 70px; padding-bottom: 90px; }
.insta-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px;
  max-width: 1200px; margin: 0 auto;
}
@media (max-width: 900px) { .insta-grid { grid-template-columns: repeat(3, 1fr); } }
.insta-tile {
  position: relative; aspect-ratio: 1 / 1; border-radius: 14px; overflow: hidden;
  background: var(--bg-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); font-size: 12px; letter-spacing: 0.05em;
  text-decoration: none; transition: transform .25s ease, box-shadow .25s ease;
}
.insta-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.insta-tile .ig-badge {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px;
  border-radius: 6px; background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px;
}
.insta-tile.t1 { background: var(--green-soft); }
.insta-tile.t2 { background: var(--terra-soft); color: #7a1b2b; }
.insta-tile.t3 { background: var(--yellow-soft); }
.insta-tile.t4 { background: var(--bg-2); }
.insta-tile.t5 { background: #dfe7f6; }
.insta-tile.t6 { background: var(--green-soft); }
.insta-cta { text-align: center; margin-top: 36px; }
.insta-cta a {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px; text-decoration: none;
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%);
  color: #fff; font-weight: 700; letter-spacing: 0.06em;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.insta-cta a:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }


/* ==================================================
   Decoration Pack v2 — 手書き感・スタンプ・吹き出し
   ================================================== */

/* ---- ① 手描きアンダーライン / マーカー（h1 em 向け） ---- */
.hero h1 em {
  position: relative;
  font-style: normal;
  color: var(--terra);
  display: inline-block;
}
.hero h1 em::after {
  content: "";
  position: absolute;
  left: -4%; right: -4%;
  bottom: -6px;
  height: 14px;
  background:
    radial-gradient(ellipse 50% 80% at 30% 50%, var(--yellow-soft) 40%, transparent 42%),
    radial-gradient(ellipse 50% 80% at 70% 50%, var(--yellow-soft) 40%, transparent 42%);
  border-radius: 999px;
  z-index: -1;
  animation: hlSwipe 1.6s ease-out .6s both;
  transform-origin: left center;
}
@keyframes hlSwipe { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* セクション見出しの波線下線 */
.section-head :is(h1, h2) {
  position: relative;
  padding-bottom: 22px;
}
.section-head :is(h1, h2)::after {
  content: "";
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 72px; height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='72' height='10' viewBox='0 0 72 10'><path d='M2 6 Q 10 1 18 6 T 34 6 T 50 6 T 66 6' fill='none' stroke='%23ff7a8a' stroke-width='2.4' stroke-linecap='round'/></svg>") no-repeat center / contain;
}

/* ---- ② スタンプ／バッジ ---- */
.stamp-badge {
  position: absolute;
  width: 110px; height: 110px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-head);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  letter-spacing: 0.04em;
  transform: rotate(-8deg);
  box-shadow: 0 6px 18px -8px rgba(0,0,0,0.2);
  z-index: 3;
  user-select: none;
}
.stamp-badge.bg-yellow { background: var(--yellow); color: #6a4a00; border: 3px dashed #c9961a; }
.stamp-badge.bg-pink { background: var(--terra); color: #fff; border: 3px dashed #d65a6b; }
.stamp-badge.bg-green { background: var(--green); color: #fff; border: 3px dashed #4fb64a; }
.stamp-badge.bg-sky { background: #4cc4e0; color: #fff; border: 3px dashed #2a9bb8; }
.stamp-badge .big { font-size: 22px; display: block; margin: 2px 0; }
.stamp-badge .small { font-size: 10px; opacity: 0.85; }
.stamp-badge.tilt-r { transform: rotate(10deg); }
.stamp-badge.tilt-l { transform: rotate(-12deg); }

@media (max-width: 720px) {
  .stamp-badge { width: 82px; height: 82px; font-size: 10px; }
  .stamp-badge .big { font-size: 16px; }
}

/* ---- ③ ハングル超薄巨大背景 ---- */
.kr-huge-bg {
  position: absolute;
  font-family: var(--f-head);
  font-weight: 900;
  font-size: clamp(240px, 28vw, 420px);
  color: var(--terra-soft);
  opacity: 0.32;
  line-height: 0.85;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  letter-spacing: -0.04em;
}
.kr-huge-bg.bg-yellow { color: var(--yellow-soft); opacity: 0.28; }
.kr-huge-bg.bg-green { color: var(--green-soft); opacity: 0.26; }
.kr-huge-bg.bg-sky { color: #c4e4ec; opacity: 0.28; }
.kr-huge-bg.bg-pink { color: var(--terra-soft); opacity: 0.26; }

/* 3-D dot grid scatter */
.dot-scatter { position: absolute; pointer-events: none; z-index: 1; }
.dot-scatter i {
  position: absolute;
  border-radius: 50%;
}

/* ---- ④ セクション間の手描き区切り線 ---- */
.hand-divider {
  display: block;
  width: 100%;
  height: 22px;
  background-repeat: repeat-x;
  background-position: center;
  background-size: 160px 22px;
}
.hand-divider.wavy {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='22' viewBox='0 0 160 22'><path d='M0 11 Q 20 2 40 11 T 80 11 T 120 11 T 160 11' fill='none' stroke='%23ff7a8a' stroke-width='2' stroke-linecap='round' opacity='0.55'/></svg>");
}
.hand-divider.dashed {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='22' viewBox='0 0 160 22'><g stroke='%237acf5a' stroke-width='2.4' stroke-linecap='round' opacity='0.6'><line x1='4' y1='11' x2='18' y2='11'/><line x1='28' y1='11' x2='42' y2='11'/><line x1='52' y1='11' x2='66' y2='11'/><line x1='76' y1='11' x2='90' y2='11'/><line x1='100' y1='11' x2='114' y2='11'/><line x1='124' y1='11' x2='138' y2='11'/><line x1='148' y1='11' x2='160' y2='11'/></g></svg>");
}
.hand-divider.dots {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='22' viewBox='0 0 160 22'><g fill='%234cc4e0' opacity='0.6'><circle cx='10' cy='11' r='2.4'/><circle cx='30' cy='11' r='2.4'/><circle cx='50' cy='11' r='2.4'/><circle cx='70' cy='11' r='2.4'/><circle cx='90' cy='11' r='2.4'/><circle cx='110' cy='11' r='2.4'/><circle cx='130' cy='11' r='2.4'/><circle cx='150' cy='11' r='2.4'/></g></svg>");
}
.hand-divider.zigzag {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='22' viewBox='0 0 160 22'><path d='M0 15 L 20 7 L 40 15 L 60 7 L 80 15 L 100 7 L 120 15 L 140 7 L 160 15' fill='none' stroke='%23ffcc29' stroke-width='2.4' stroke-linejoin='round' stroke-linecap='round' opacity='0.75'/></svg>");
}
.hand-divider-wrap { padding: 28px 0; text-align: center; }

/* ---- ⑤ カードホバーでポップアップ ---- */
.course-card { position: relative; }
.course-card::after {
  content: "★";
  position: absolute;
  top: 12px; right: 12px;
  width: 28px; height: 28px;
  background: var(--yellow);
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px;
  opacity: 0;
  transform: scale(0.2) rotate(-30deg);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
  pointer-events: none;
}
.course-card:hover::after {
  opacity: 1;
  transform: scale(1) rotate(12deg);
}
.course-card::before {
  content: "♡";
  position: absolute;
  bottom: 20px; left: 12px;
  color: var(--terra);
  font-size: 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.35s 0.05s ease-out;
  pointer-events: none;
}
.course-card:hover::before {
  opacity: 0.9;
  transform: translateY(-10px);
}

/* ---- ⑥ 吹き出しキャプション ---- */
.speech-bubble {
  position: absolute;
  background: #fff;
  padding: 12px 18px;
  border-radius: 18px;
  font-family: var(--f-accent);
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  box-shadow: 0 6px 16px -6px rgba(0,0,0,0.15);
  border: 2.5px solid var(--ink);
  z-index: 4;
  line-height: 1.5;
  max-width: 200px;
  transform: rotate(-3deg);
  animation: bubbleBob 3.5s ease-in-out infinite;
}
.speech-bubble.tilt-r { transform: rotate(4deg); animation-delay: -1.5s; }
.speech-bubble.theme-pink { background: var(--terra); color: #fff; border-color: #b34555; }
.speech-bubble.theme-yellow { background: var(--yellow); color: #6a4a00; border-color: #b38515; }
.speech-bubble.theme-green { background: var(--green); color: #fff; border-color: #4fb64a; }
.speech-bubble .kr-sub {
  display: block;
  font-size: 10px;
  opacity: 0.7;
  letter-spacing: 0.08em;
  margin-top: 2px;
  font-family: var(--f-head);
}
.speech-bubble::after {
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  background: inherit;
  border: inherit;
  border-top: 0; border-left: 0;
  bottom: -11px; left: 28px;
  transform: rotate(45deg);
}
.speech-bubble.arrow-tr::after { left: auto; right: 28px; }
.speech-bubble.arrow-top::after { top: -11px; bottom: auto; transform: rotate(225deg); }
@keyframes bubbleBob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -6px; }
}
@media (max-width: 720px) {
  .speech-bubble { font-size: 11px; max-width: 150px; padding: 8px 14px; }
}
