/* ==========================================================================
   Web Assist v2.0 — Common Stylesheet
   Brand tokens sourced from: Web_Assist_Brand_Guidelines.pdf
   Naming convention: wa- prefix (per 20_UIコンポーネント設計書)
   ========================================================================== */

:root {
  /* --- Brand & core colors --- */
  --wa-primary: #2563eb;       /* スマートブルー：信頼・未来 */
  --wa-primary-dark: #1d4ed8;
  --wa-secondary: #1e293b;     /* スレートネイビー：高級感・知性 */
  --wa-accent: #06b6d4;        /* シアン：AI・爽快感・先進性 */
  --wa-neutral: #64748b;       /* スレートグレー：洗練・補助 */

  /* --- Feedback / status --- */
  --wa-success: #10b981;
  --wa-warning: #f59e0b;
  --wa-error: #ef4444;
  --wa-caution: #fb923c;

  /* --- Base / surface hierarchy --- */
  --wa-surface: #ffffff;
  --wa-bg: #f8fafc;
  --wa-section: #f1f5f9;
  --wa-text-main: #0f172a;
  --wa-text-sub: #475569;
  --wa-border: #e2e8f0;

  /* --- LINE brand (single external accent, used only for LINE CTA) --- */
  --wa-line: #06c755;
  --wa-line-dark: #05a648;

  /* --- Typography --- */
  --wa-font-jp: "Noto Sans JP", "Hiragino Sans", sans-serif;
  --wa-font-en: "Inter", system-ui, -apple-system, sans-serif;

  /* --- Spacing (8px grid) --- */
  --wa-space-1: 8px;
  --wa-space-2: 16px;
  --wa-space-3: 24px;
  --wa-space-4: 32px;
  --wa-space-6: 48px;
  --wa-space-8: 64px;

  /* --- Radius / shadow / transition --- */
  --wa-radius-s: 8px;
  --wa-radius-m: 14px;
  --wa-radius-l: 20px;
  --wa-radius-pill: 999px;
  --wa-shadow-s: 0 1px 2px rgba(15, 23, 42, 0.06), 0 1px 1px rgba(15, 23, 42, 0.04);
  --wa-shadow-m: 0 8px 24px rgba(15, 23, 42, 0.08);
  --wa-shadow-l: 0 20px 48px rgba(15, 23, 42, 0.14);
  --wa-transition: 180ms ease;

  --wa-container: 1120px;

  /* --- Signature gradient accent (multi-hue, used sparingly for delight) --- */
  --wa-gradient-brand: linear-gradient(92deg, #f59e0b 0%, #d946ef 46%, #06b6d4 100%);
  --wa-gradient-brand-soft: linear-gradient(92deg, rgba(245,158,11,0.16) 0%, rgba(217,70,239,0.16) 46%, rgba(6,182,212,0.16) 100%);
}

/* ==========================================================================
   Reset & base
   ========================================================================== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Prevent horizontal scroll caused by off-canvas drawers / decorative
   background images translated outside the viewport (SP optimization). */
html, body { overflow-x: hidden; width: 100%; }

body {
  margin: 0;
  font-family: var(--wa-font-jp), var(--wa-font-en);
  color: var(--wa-text-main);
  background: var(--wa-bg);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

.wa-container {
  max-width: var(--wa-container);
  margin: 0 auto;
  padding: 0 var(--wa-space-3);
}

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--wa-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wa-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--wa-primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.wa-skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ==========================================================================
   Scroll progress bar
   ========================================================================== */
.wa-scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 300;
  background: transparent;
  pointer-events: none;
}
.wa-scroll-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--wa-gradient-brand);
  transform-origin: left;
  transition: width 80ms linear;
}

/* ==========================================================================
   Scroll reveal (IntersectionObserver-driven)
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 620ms cubic-bezier(0.16, 1, 0.3, 1), transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--wa-reveal-delay, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Typography scale
   ========================================================================== */
.wa-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--wa-font-en);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wa-accent);
  background: rgba(6, 182, 212, 0.1);
  padding: 6px 14px;
  border-radius: var(--wa-radius-pill);
  border: 1px solid transparent;
  background:
    linear-gradient(var(--wa-bg), var(--wa-bg)) padding-box,
    var(--wa-gradient-brand) border-box;
}

h1, .wa-h1 { font-size: clamp(1.9rem, 4.6vw, 3rem); font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; }
h2, .wa-h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); font-weight: 700; line-height: 1.4; letter-spacing: -0.01em; }
h3, .wa-h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 700; line-height: 1.5; }

.wa-lead { font-size: clamp(1rem, 1.6vw, 1.15rem); color: var(--wa-text-sub); }
.wa-section-desc { color: var(--wa-text-sub); max-width: 880px; }

/* ==========================================================================
   Buttons (Primary / Secondary / Outline / LINE)
   ========================================================================== */
.wa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--wa-radius-pill);
  font-weight: 700;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform var(--wa-transition), box-shadow var(--wa-transition), background var(--wa-transition), color var(--wa-transition);
  white-space: nowrap;
  min-height: 48px;
}
.wa-btn:active { transform: translateY(1px); }

.wa-btn--primary {
  background: var(--wa-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}
.wa-btn--primary:hover { background: var(--wa-primary-dark); box-shadow: 0 10px 24px rgba(37, 99, 235, 0.36); }

.wa-btn--secondary {
  background: var(--wa-secondary);
  color: #fff;
}
.wa-btn--secondary:hover { background: #0f172a; }

.wa-btn--outline {
  background: transparent;
  border-color: var(--wa-primary);
  color: var(--wa-primary);
}
.wa-btn--outline:hover { background: rgba(37, 99, 235, 0.08); }

.wa-btn--ghost {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}
.wa-btn--ghost:hover { background: rgba(255, 255, 255, 0.24); }

.wa-btn--line {
  background: var(--wa-line);
  color: #fff;
  box-shadow: 0 8px 20px rgba(6, 199, 85, 0.28);
}
.wa-btn--line:hover { background: var(--wa-line-dark); }

.wa-btn--sm { padding: 10px 18px; min-height: 40px; font-size: 0.85rem; }
.wa-btn--block { width: 100%; }

.wa-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ==========================================================================
   Header
   ========================================================================== */
.wa-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--wa-border);
  transition: box-shadow var(--wa-transition);
}
.wa-header.is-scrolled { box-shadow: var(--wa-shadow-s); }

.wa-header__inner {
  max-width: var(--wa-container);
  margin: 0 auto;
  padding: 14px var(--wa-space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wa-space-3);
}

.wa-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.wa-logo__icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #4f75ff 0%, #3a5bff 50%, #7b42f6 100%);
  box-shadow: 0 2px 8px rgba(79, 117, 255, 0.22);
  color: #fff;
  font-family: var(--wa-font-en);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wa-logo__text-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.wa-logo__brand-text {
  font-family: var(--wa-font-en);
  font-size: 19px;
  font-weight: 700;
  color: #1e2432;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.wa-logo--invert .wa-logo__brand-text { color: #fff; }
.wa-logo__bar {
  width: 100%;
  height: 2px;
  border-radius: 9999px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    #22d3ee 25%,
    #6366f1 50%,
    #ec4899 75%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: waShimmerUnderline 3.5s ease-in-out infinite;
}
@keyframes waShimmerUnderline {
  0% { background-position: 100% 0%; }
  50% { background-position: 0% 0%; }
  100% { background-position: 100% 0%; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-logo__bar { animation: none; }
}

.wa-nav {
  display: none;
  align-items: center;
  gap: clamp(14px, 1.6vw, 24px);
  flex-wrap: nowrap;
}
.wa-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--wa-text-main);
  padding: 8px 2px;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}
.wa-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--wa-primary);
  transform: scaleX(0);
  transition: transform var(--wa-transition);
}
.wa-nav a:hover::after { transform: scaleX(1); }

.wa-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wa-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid var(--wa-border);
  border-radius: var(--wa-radius-s);
  color: var(--wa-secondary);
}

@media (min-width: 1040px) {
  .wa-nav { display: flex; }
  .wa-menu-btn { display: none; }
}
@media (max-width: 1039px) {
  /* Only the hamburger stays in the header on mobile — LINE/diagnosis CTAs
     already live in the drawer and the sticky bottom bar, and keeping them
     here too pushed the hamburger off-screen. */
  .wa-header__actions .wa-btn { display: none; }
}

/* Mobile drawer */
.wa-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
}
.wa-mobile-nav[data-open="true"] { visibility: visible; }
.wa-mobile-nav__scrim {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, 0.5);
  opacity: 0;
  transition: opacity var(--wa-transition);
}
.wa-mobile-nav[data-open="true"] .wa-mobile-nav__scrim { opacity: 1; }
.wa-mobile-nav__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(86vw, 340px);
  background: #fff;
  padding: var(--wa-space-3);
  transform: translateX(100%);
  transition: transform 240ms ease;
  display: flex;
  flex-direction: column;
  gap: var(--wa-space-3);
  overflow-y: auto;
}
.wa-mobile-nav[data-open="true"] .wa-mobile-nav__panel { transform: translateX(0); }
.wa-mobile-nav__close {
  align-self: flex-end;
  width: 40px; height: 40px;
  border: 1px solid var(--wa-border);
  border-radius: var(--wa-radius-s);
  background: none;
}
.wa-mobile-nav__panel a:not(.wa-btn) {
  display: block;
  padding: 14px 4px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--wa-secondary);
  border-bottom: 1px solid var(--wa-border);
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.wa-breadcrumb {
  padding: var(--wa-space-2) 0;
  font-size: 0.82rem;
  color: var(--wa-neutral);
}
.wa-breadcrumb a { color: var(--wa-neutral); }
.wa-breadcrumb a:hover { color: var(--wa-primary); }
.wa-breadcrumb span[aria-hidden] { margin: 0 6px; }
.wa-breadcrumb .is-current { color: var(--wa-text-main); font-weight: 600; }

/* ==========================================================================
   Hero
   ========================================================================== */
.wa-hero {
  position: relative;
  overflow: hidden;
  /* Same flat gradient as the GET STARTED band, for a consistent blue across the page. */
  background: linear-gradient(120deg, var(--wa-secondary), var(--wa-primary-dark));
  color: #fff;
  padding: var(--wa-space-8) 0 var(--wa-space-8);
}

.wa-hero__glow {
  position: absolute;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,0.30), transparent 70%);
  top: -220px; right: -160px;
  filter: blur(10px);
  transform: translateY(calc(var(--wa-scroll-parallax, 0px) * 0.4));
  transition: transform 60ms linear;
  z-index: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .wa-hero__glow { transform: none !important; }
}

.wa-hero__inner {
  position: relative;
  z-index: 1;
  max-width: var(--wa-container);
  margin: 0 auto;
  padding: 0 var(--wa-space-3);
}
/* Text-only hero — wide, centered layout (no photo collage). */
.wa-hero__inner--wide {
  text-align: center;
  max-width: 1040px;
}
.wa-hero__inner--wide .wa-hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.wa-hero__inner--wide .wa-hero__eyebrow { margin-left: auto; margin-right: auto; }
.wa-hero__inner--wide h1 { max-width: none; }
.wa-hero__inner--wide .wa-hero__sub { max-width: 760px; margin-left: auto; margin-right: auto; }
.wa-hero__inner--wide .wa-hero__cta { justify-content: center; }

.wa-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--wa-font-en);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a5f3fc;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 6px 14px;
  border-radius: var(--wa-radius-pill);
  margin-bottom: var(--wa-space-3);
}
.wa-hero h1 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.wa-nowrap { white-space: nowrap; }

/* Emphasized headline word — bigger than the surrounding line and animated
   with a moving rainbow gradient so "信頼できる" reads as the headline's focal point. */
.wa-hero__trust {
  display: inline-block;
  font-size: clamp(2.6rem, 8vw, 4.6rem);
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(90deg, #ff5f6d, #ffc371, #47e0a0, #38bdf8, #a78bfa, #ff5f6d);
  background-size: 300% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: wa-rainbow-move 6s linear infinite;
}
@keyframes wa-rainbow-move {
  to { background-position: -300% center; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-hero__trust { animation: none; }
}

.wa-hero__sub {
  margin-top: var(--wa-space-2);
  max-width: 46ch;
  color: rgba(255,255,255,0.82);
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
}
.wa-hide-mobile { display: none; }
@media (min-width: 640px) { .wa-hide-mobile { display: inline; } }
.wa-mobile-only { display: inline; }
@media (min-width: 640px) { .wa-mobile-only { display: none; } }
.wa-hero__cta {
  margin-top: var(--wa-space-4);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.wa-hero__note {
  margin-top: var(--wa-space-3);
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   Sections
   ========================================================================== */
.wa-section { padding: var(--wa-space-8) 0; }
.wa-section--alt { background: var(--wa-section); }
.wa-section__head { max-width: 880px; margin-bottom: var(--wa-space-4); }
.wa-section__head h2 { margin-top: var(--wa-space-2); }

.wa-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wa-space-3);
}
@media (min-width: 720px) { .wa-grid-3 { grid-template-columns: repeat(3, 1fr); } }

.wa-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wa-space-3);
}
@media (min-width: 560px) { .wa-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .wa-grid-4 { grid-template-columns: repeat(4, 1fr); } }

.wa-grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wa-space-4);
  align-items: stretch;
}
@media (min-width: 860px) { .wa-grid-2 { grid-template-columns: 1.1fr 0.9fr; } }

/* EDUCATION section — its own grid so the mobile stacking order (desc →
   preview → CTA/note) can differ from the desktop 2-column layout without
   touching the generic .wa-grid-2 used elsewhere. */
.wa-edu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wa-space-4);
  grid-template-areas:
    "head"
    "desc"
    "preview"
    "foot";
}
@media (min-width: 860px) {
  .wa-edu-grid {
    grid-template-columns: 1.1fr 0.9fr;
    grid-template-areas:
      "head    preview"
      "desc    preview"
      "foot    preview";
    align-items: start;
  }
}
.wa-edu-grid__head { grid-area: head; }
.wa-edu-grid__desc { grid-area: desc; }
.wa-edu-grid__preview { grid-area: preview; }
.wa-edu-grid__foot { grid-area: foot; }

/* wa-card */
.wa-card {
  background:
    linear-gradient(var(--wa-surface), var(--wa-surface)) padding-box,
    linear-gradient(var(--wa-border), var(--wa-border)) border-box;
  border: 1px solid transparent;
  border-radius: var(--wa-radius-m);
  padding: var(--wa-space-3);
  box-shadow: var(--wa-shadow-s);
  transition: box-shadow var(--wa-transition), transform var(--wa-transition), background var(--wa-transition);
}
.wa-card:hover {
  box-shadow: var(--wa-shadow-m);
  transform: translateY(-4px);
  background:
    linear-gradient(var(--wa-surface), var(--wa-surface)) padding-box,
    var(--wa-gradient-brand) border-box;
}
.wa-card__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--wa-primary);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--wa-space-2);
}
.wa-card h3 { margin-bottom: 8px; }
.wa-card p { color: var(--wa-text-sub); font-size: 0.94rem; }

/* Step (診る・整える・育てる) */
.wa-step {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wa-space-3);
  align-items: center;
  padding: var(--wa-space-4) var(--wa-space-3);
  margin: 0 calc(var(--wa-space-3) * -1);
  border-bottom: 1px solid var(--wa-border);
  border-radius: var(--wa-radius-m);
  transition: background var(--wa-transition), padding-left var(--wa-transition);
}
.wa-step:last-child { border-bottom: none; }
@media (min-width: 760px) { .wa-step { grid-template-columns: 120px 1fr auto; } }
.wa-step__num {
  font-family: var(--wa-font-en);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--wa-accent);
  opacity: 0.5;
  transition: opacity var(--wa-transition), background var(--wa-transition);
}
.wa-step__title { color: var(--wa-primary); font-weight: 700; font-size: 0.95rem; margin-bottom: 6px; }

/* Active step highlight (driven by IntersectionObserver in main.js) */
.wa-step.is-active {
  background: var(--wa-section);
}
.wa-step.is-active .wa-step__num {
  opacity: 1;
  background: var(--wa-gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Plan cards */
.wa-plan {
  background: var(--wa-surface);
  border: 1px solid var(--wa-border);
  border-radius: var(--wa-radius-m);
  padding: var(--wa-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--wa-space-2);
  position: relative;
}
.wa-plan--recommended {
  border-color: transparent;
  background:
    linear-gradient(var(--wa-surface), var(--wa-surface)) padding-box,
    var(--wa-gradient-brand) border-box;
  border-width: 2px;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.08), var(--wa-shadow-m);
}
.wa-plan__badge {
  position: absolute;
  top: -13px; left: 20px;
  background: var(--wa-gradient-brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--wa-radius-pill);
}
.wa-plan__name { font-weight: 700; font-size: 1.05rem; }
.wa-plan__desc { color: var(--wa-text-sub); font-size: 0.9rem; flex-grow: 1; }
.wa-plan__position {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--wa-font-en);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--wa-accent);
  background: rgba(6, 182, 212, 0.1);
  border-radius: var(--wa-radius-pill);
  padding: 3px 10px;
}
.wa-plan__price { font-family: var(--wa-font-en); font-weight: 700; font-size: 1.5rem; color: var(--wa-secondary); }
.wa-plan__price span { font-size: 0.85rem; font-weight: 500; color: var(--wa-neutral); }
.wa-webcare-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 1.1em;
  font-size: 0.88rem;
  color: var(--wa-text-sub);
  line-height: 1.5;
}
.wa-webcare-list li { list-style: disc; }

/* Plan detail card (plans.html §6) */
.wa-plan-detail {
  background: var(--wa-surface);
  border: 1px solid var(--wa-border);
  border-radius: var(--wa-radius-l);
  padding: var(--wa-space-4);
  position: relative;
}
.wa-plan-detail + .wa-plan-detail { margin-top: var(--wa-space-4); }
.wa-plan-detail--recommended {
  border-color: transparent;
  background:
    linear-gradient(var(--wa-surface), var(--wa-surface)) padding-box,
    var(--wa-gradient-brand) border-box;
  border-width: 2px;
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(217, 70, 239, 0.08), var(--wa-shadow-m);
}
.wa-plan-detail__badge {
  position: absolute;
  top: -13px; left: var(--wa-space-4);
  background: var(--wa-gradient-brand);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--wa-radius-pill);
}
.wa-plan-detail__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.wa-plan-detail__name {
  font-family: var(--wa-font-en);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--wa-secondary);
}
.wa-plan-detail__price {
  font-family: var(--wa-font-en);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--wa-primary);
}
.wa-plan-detail__price small { font-size: 0.9rem; font-weight: 500; color: var(--wa-neutral); }
.wa-plan-detail__tagline {
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--wa-text-main);
}
.wa-plan-detail__desc { margin-top: var(--wa-space-2); color: var(--wa-text-sub); }
.wa-plan-detail__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wa-space-3);
  margin-top: var(--wa-space-3);
}
@media (min-width: 720px) { .wa-plan-detail__grid { grid-template-columns: 1fr 1fr; } }
.wa-plan-detail__grid h4 { font-size: 0.88rem; font-weight: 700; color: var(--wa-secondary); margin-bottom: 8px; }
.wa-plan-detail__grid ul { display: flex; flex-direction: column; gap: 6px; padding-left: 1.1em; font-size: 0.9rem; color: var(--wa-text-sub); }
.wa-plan-detail__grid li { list-style: disc; }
.wa-plan-detail__outcome {
  margin-top: var(--wa-space-3);
  padding: var(--wa-space-2) var(--wa-space-3);
  background: var(--wa-section);
  border-radius: var(--wa-radius-m);
  font-size: 0.9rem;
}
.wa-plan-detail__outcome strong { display: block; font-size: 0.78rem; letter-spacing: 0.04em; color: var(--wa-primary); margin-bottom: 4px; }

/* Glossary block (plans.html §12) */
.wa-glossary {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wa-space-3);
}
@media (min-width: 720px) { .wa-glossary { grid-template-columns: repeat(2, 1fr); } }
.wa-glossary dt { font-weight: 700; color: var(--wa-secondary); margin-bottom: 4px; }
.wa-glossary dd { color: var(--wa-text-sub); font-size: 0.92rem; margin: 0; }

/* Process steps, ordered list (plans.html §15) */
.wa-process-list {
  counter-reset: wa-process;
  display: flex;
  flex-direction: column;
  gap: var(--wa-space-2);
}
.wa-process-list li {
  counter-increment: wa-process;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: var(--wa-space-2) 0;
  border-bottom: 1px solid var(--wa-border);
}
.wa-process-list li:last-child { border-bottom: none; }
.wa-process-list li::before {
  content: counter(wa-process);
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--wa-section);
  color: var(--wa-primary);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Works (placeholder) */
.wa-works-empty {
  border: 1px dashed var(--wa-border);
  border-radius: var(--wa-radius-m);
  padding: var(--wa-space-4);
  text-align: center;
  color: var(--wa-text-sub);
  background: var(--wa-surface);
}

/* ==========================================================================
   networkmap preview (TOP page) — lightweight decorative SVG, not the iframe
   ========================================================================== */
.wa-networkmap-preview {
  position: relative;
  display: block;
  background: linear-gradient(160deg, #0b1226 0%, #111c3d 60%, #0b1730 100%);
  border-radius: var(--wa-radius-l);
  overflow: hidden;
  min-height: 260px;
  height: 100%;
  box-shadow: var(--wa-shadow-l);
  transition: transform var(--wa-transition), box-shadow var(--wa-transition);
}
.wa-networkmap-preview:hover,
.wa-networkmap-preview:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--wa-shadow-l), 0 0 0 2px rgba(6, 182, 212, 0.5);
}
.wa-networkmap-preview__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
  transition: transform 400ms ease;
}
.wa-networkmap-preview:hover .wa-networkmap-preview__frame { transform: scale(1.04); }

.wa-disclaimer {
  display: flex;
  gap: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--wa-radius-s);
  padding: var(--wa-space-2);
  font-size: 0.85rem;
  color: #78500a;
  line-height: 1.7;
}
.wa-disclaimer svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; color: var(--wa-warning); }

/* Quiet, low-emphasis caption for legally-necessary but non-alarming notes
   (used instead of .wa-disclaimer's boxed warning style where a subtler tone fits). */
.wa-note-subtle {
  font-size: 0.78rem;
  color: var(--wa-neutral);
  line-height: 1.7;
  opacity: 0.85;
}

/* Full embed (ai-marketing page) */
.wa-networkmap-embed {
  position: relative;
  border-radius: var(--wa-radius-l);
  overflow: hidden;
  box-shadow: var(--wa-shadow-l);
  background: #06060a;
  aspect-ratio: 16 / 11;
}
.wa-networkmap-embed iframe {
  width: 100%; height: 100%; border: 0; display: block;
}
@media (max-width: 720px) {
  .wa-networkmap-embed { aspect-ratio: 3 / 4; }
}

/* Full-bleed variant — breaks out of the container to use nearly the entire
   viewport, per request to maximize the networkmap's display area. */
.wa-networkmap-embed--full {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: auto;
  height: calc(100vh - 81px);
  min-height: 640px;
}
@media (max-width: 720px) {
  .wa-networkmap-embed--full {
    height: calc(100vh - 65px);
    min-height: 480px;
  }
}

/* ==========================================================================
   FAQ search / category filter / guided selector (WA-V2-FAQ-001)
   ========================================================================== */
.wa-faq-category__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--wa-secondary);
  margin: var(--wa-space-4) 0 var(--wa-space-2);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--wa-border);
}
.wa-faq-category:first-of-type .wa-faq-category__title { margin-top: 0; }
.wa-faq-category__more { display: none; }
.wa-faq-category.has-more .wa-faq-category__more { display: inline-flex; }

.wa-faq-empty {
  display: none;
  gap: 10px;
  background: var(--wa-section);
  border-radius: var(--wa-radius-m);
  padding: var(--wa-space-3);
  color: var(--wa-text-sub);
}
.wa-faq-empty.is-visible { display: flex; flex-direction: column; align-items: flex-start; gap: var(--wa-space-2); }
.wa-faq-empty .wa-hero__cta { margin-top: 0; }

.wa-faq__related {
  margin-top: var(--wa-space-2);
  padding-top: var(--wa-space-2);
  border-top: 1px dashed var(--wa-border);
}
.wa-faq__related:empty { display: none; }
.wa-faq__related-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--wa-neutral);
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: block;
}
.wa-faq__related a {
  display: block;
  font-size: 0.88rem;
  color: var(--wa-primary);
  padding: 4px 0;
}
.wa-faq__related a:hover { text-decoration: underline; }

/* Guided selector ("質問を選んで探す") */
.wa-faq-guide {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.wa-faq-guide[data-open="true"] { display: flex; }
.wa-faq-guide__scrim {
  position: absolute; inset: 0;
  background: rgba(15,23,42,0.5);
}
.wa-faq-guide__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 82vh;
  background: var(--wa-surface);
  border-radius: var(--wa-radius-l) var(--wa-radius-l) 0 0;
  padding: var(--wa-space-3);
  overflow-y: auto;
  box-shadow: var(--wa-shadow-l);
}
@media (min-width: 640px) {
  .wa-faq-guide { align-items: center; }
  .wa-faq-guide__panel { border-radius: var(--wa-radius-l); max-height: 78vh; }
}
.wa-faq-guide__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wa-space-2);
  margin-bottom: var(--wa-space-2);
}
.wa-faq-guide__close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--wa-border);
  background: none;
  flex-shrink: 0;
}
.wa-faq-guide__crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--wa-neutral);
  margin-bottom: var(--wa-space-2);
}
.wa-faq-guide__crumbs button { color: var(--wa-primary); font-weight: 600; }
.wa-faq-guide__options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wa-faq-guide__options button {
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--wa-radius-m);
  border: 1px solid var(--wa-border);
  background: var(--wa-surface);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--wa-text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.wa-faq-guide__options button:hover { border-color: var(--wa-primary); background: var(--wa-section); }
.wa-faq-guide__answer {
  background: var(--wa-section);
  border-radius: var(--wa-radius-m);
  padding: var(--wa-space-3);
  font-size: 0.95rem;
  line-height: 1.8;
}
.wa-faq-guide__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: var(--wa-space-3);
}

/* ==========================================================================
   FAQ teaser search (TOP page) — chatbot-style input that hands the query
   off to the full FAQ page, since the dedicated question page is easy to miss.
   ========================================================================== */
.wa-faq-chat {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--wa-surface);
  border: 1px solid var(--wa-border);
  border-radius: var(--wa-radius-pill);
  padding: 8px 8px 8px 18px;
  box-shadow: var(--wa-shadow-s);
  flex: 1;
  min-width: 260px;
}
.wa-faq-chat:focus-within { border-color: var(--wa-primary); }
.wa-faq-chat__icon { color: var(--wa-primary); flex-shrink: 0; display: flex; }
.wa-faq-chat__input {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  font-size: 0.95rem;
  color: var(--wa-text-main);
}
.wa-faq-chat__input:focus { outline: none; }
/* Icon-only, circular search submit. */
.wa-faq-chat__submit {
  flex-shrink: 0;
  padding: 0;
  width: 40px;
  height: 40px;
  min-height: 0;
  border-radius: 50%;
}

/* Search bar + "view all questions" link, side by side. */
.wa-faq-searchbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 880px;
}
.wa-faq-searchbar__link { flex-shrink: 0; white-space: nowrap; }

.wa-faq-cta-note { color: var(--wa-text-sub); font-size: 0.9rem; text-align: center; }

/* Sliding keyword tags (TOP page FAQ teaser) — horizontal auto-scroll,
   pauses on hover/focus, each pill links straight to the FAQ page. */
.wa-faq-tags {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 56px, #000 calc(100% - 56px), transparent 100%);
}
.wa-faq-tags__track {
  display: flex;
  width: max-content;
  gap: 12px;
  animation: wa-faq-tags-scroll 34s linear infinite;
}
.wa-faq-tags:hover .wa-faq-tags__track,
.wa-faq-tags__track:has(:focus-visible) {
  animation-play-state: paused;
}
.wa-faq-tags__pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: var(--wa-radius-pill);
  background: var(--wa-surface);
  border: 1px solid var(--wa-border);
  color: var(--wa-text-sub);
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--wa-transition), border-color var(--wa-transition), color var(--wa-transition), transform var(--wa-transition);
}
.wa-faq-tags__pill:hover,
.wa-faq-tags__pill:focus-visible {
  background: var(--wa-primary);
  border-color: var(--wa-primary);
  color: #fff;
  transform: translateY(-2px);
}
@keyframes wa-faq-tags-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .wa-faq-tags__track { animation: none; }
  .wa-faq-tags { overflow-x: auto; }
}

/* ==========================================================================
   FAQ accordion
   ========================================================================== */
.wa-faq { display: flex; flex-direction: column; gap: 10px; }
.wa-faq__item {
  background: var(--wa-surface);
  border: 1px solid var(--wa-border);
  border-radius: var(--wa-radius-s);
  overflow: hidden;
}
.wa-faq__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wa-space-2);
  padding: var(--wa-space-2) var(--wa-space-3);
  background: none;
  border: none;
  text-align: left;
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--wa-text-main);
  min-height: 56px;
}
.wa-faq__icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(37,99,235,0.1);
  color: var(--wa-primary);
  transition: transform 200ms ease;
}
.wa-faq__q[aria-expanded="true"] .wa-faq__icon { transform: rotate(45deg); }
.wa-faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms ease;
}
.wa-faq__a-inner {
  padding: 0 var(--wa-space-3) var(--wa-space-2);
  color: var(--wa-text-sub);
  font-size: 0.92rem;
}

/* <details>/<summary>-based FAQ items (pages/faq.html): native, works without JS.
   UA stylesheet already hides non-open children via display:none, so the
   max-height:0 rule above must be neutralized while open. */
.wa-faq__item summary.wa-faq__q { cursor: pointer; list-style: none; }
.wa-faq__item summary.wa-faq__q::-webkit-details-marker { display: none; }
.wa-faq__item[open] > summary.wa-faq__q .wa-faq__icon { transform: rotate(45deg); }
.wa-faq__item[open] .wa-faq__a { max-height: none; overflow: visible; }
.wa-faq__item[data-hidden="true"] { display: none; }

/* ==========================================================================
   Final CTA band
   ========================================================================== */
.wa-cta-band {
  background: linear-gradient(120deg, var(--wa-secondary), var(--wa-primary-dark));
  color: #fff;
  padding: var(--wa-space-6) 0;
  text-align: center;
}
.wa-cta-band h2 { color: #fff; }
.wa-cta-band .wa-hero__cta { justify-content: center; margin-top: var(--wa-space-3); }

/* ==========================================================================
   Footer
   ========================================================================== */
.wa-footer { background: var(--wa-secondary); color: #cbd5e1; padding: var(--wa-space-6) 0 var(--wa-space-3); }
.wa-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--wa-space-4);
  padding-bottom: var(--wa-space-4);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (min-width: 760px) { .wa-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.wa-footer__brand p { color: #94a3b8; font-size: 0.88rem; margin-top: 10px; max-width: 34ch; }
.wa-footer__col h4 { color: #fff; font-size: 0.85rem; margin-bottom: 12px; letter-spacing: 0.04em; }
.wa-footer__col ul { display: flex; flex-direction: column; gap: 8px; }
.wa-footer__col a { color: #94a3b8; font-size: 0.88rem; }
.wa-footer__col a:hover { color: #fff; }
.wa-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--wa-space-3);
  font-size: 0.8rem;
  color: #64748b;
}
.wa-footer__line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #86efac;
}

/* ==========================================================================
   Sticky mobile CTA bar (SP optimization)
   ========================================================================== */
.wa-mobile-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 150;
  display: flex;
  gap: 8px;
  padding: 10px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--wa-border);
  box-shadow: 0 -6px 20px rgba(15,23,42,0.08);
}
.wa-mobile-cta .wa-btn { flex: 1; padding: 12px 10px; font-size: 0.86rem; }
@media (min-width: 900px) { .wa-mobile-cta { display: none; } }
@media (max-width: 899px) { body { padding-bottom: 72px; } }

/* ==========================================================================
   Utility
   ========================================================================== */
.wa-mt-1{margin-top:var(--wa-space-1)}.wa-mt-2{margin-top:var(--wa-space-2)}
.wa-mt-3{margin-top:var(--wa-space-3)}.wa-mt-4{margin-top:var(--wa-space-4)}
.wa-center{text-align:center;margin-left:auto;margin-right:auto}
.wa-visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ==========================================================================
   Inner pages — alerts, tables, forms (about/plans/webcare/company/contact/
   diagnosis/works, legal pages)
   ========================================================================== */
.wa-alert {
  display: flex;
  gap: 10px;
  padding: var(--wa-space-2) var(--wa-space-3);
  border-radius: var(--wa-radius-m);
  font-size: 0.9rem;
  line-height: 1.7;
}
.wa-alert--info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; }
.wa-alert--warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

.wa-table-scroll { overflow-x: auto; }
.wa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.wa-table th, .wa-table td {
  padding: var(--wa-space-2);
  border-bottom: 1px solid var(--wa-border);
  text-align: left;
  vertical-align: top;
}
.wa-table thead th {
  background: var(--wa-section);
  font-weight: 700;
  color: var(--wa-text-main);
}
.wa-table tbody th { white-space: nowrap; color: var(--wa-text-main); font-weight: 600; }
.wa-table .wa-table__col--recommended { background: rgba(37, 99, 235, 0.06); }

.wa-form-group { margin-bottom: var(--wa-space-3); }
.wa-form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--wa-text-main);
  margin-bottom: 6px;
}
.wa-form-label .wa-form-required { color: var(--wa-error); font-weight: 600; font-size: 0.78rem; margin-left: 4px; }
.wa-form-input, .wa-form-textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--wa-radius-s);
  border: 1px solid var(--wa-border);
  background: var(--wa-surface);
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--wa-text-main);
}
.wa-form-input:focus-visible, .wa-form-textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 1px;
  border-color: var(--wa-primary);
}
.wa-form-textarea { resize: vertical; min-height: 120px; }
.wa-form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--wa-text-sub);
  line-height: 1.6;
}
.wa-form-check input { margin-top: 4px; flex-shrink: 0; }
.wa-form-error { color: var(--wa-error); font-size: 0.88rem; min-height: 1.2em; }
.wa-form-success { color: var(--wa-success); font-size: 0.88rem; }

.wa-info-table { max-width: 720px; }
.wa-legal { max-width: 760px; }
.wa-legal h2 { margin-top: var(--wa-space-4); margin-bottom: var(--wa-space-1); }
.wa-legal h2:first-of-type { margin-top: var(--wa-space-3); }
.wa-legal p, .wa-legal li { color: var(--wa-text-sub); line-height: 1.85; }
.wa-legal ul { padding-left: 1.4em; margin: var(--wa-space-1) 0; }
