/* ============================================================
   THE SEED — style.css
   Base styles, CSS variables, reset, layout foundations
   ============================================================ */

/* ------------------------------------------------------------
   1. CSS VARIABLES
   ------------------------------------------------------------ */
:root {
  /* Brand Colors */
  --color-navy:        #1a3557;
  --color-navy-dark:   #0d1f35;
  --color-navy-light:  #24497a;
  --color-white:       #ffffff;
  --color-light-gray:  #f5f7fa;
  --color-gray:        #e8ecf0;
  --color-text:        #2d3748;
  --color-text-light:  #718096;
  --color-accent:      #4a9f6e;   /* leaf green — growth accent */

  /* Semantic UI Colors */
  --color-danger:       #ef4444;
  --color-danger-light: rgba(239,68,68,0.12);
  --color-warning:      #f59e0b;
  --color-warning-light: rgba(245,158,11,0.12);
  --color-info:         #3b82f6;
  --color-info-light:   rgba(59,130,246,0.12);
  --color-purple:       #a855f7;

  /* Typography */
  --font-en: 'Inter', sans-serif;
  --font-ja: 'Noto Sans JP', sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.7;

  /* Spacing */
  --section-padding-y:  96px;
  --container-max:      1160px;
  --container-pad:      24px;

  /* Transitions */
  --transition-base:    0.3s ease;
  --transition-slow:    0.6s ease;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(26, 53, 87, 0.08);
  --shadow-md:  0 8px 32px rgba(26, 53, 87, 0.12);
  --shadow-lg:  0 16px 64px rgba(26, 53, 87, 0.16);

  /* Border radius */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-xl:  24px;
}

/* ------------------------------------------------------------
   2. CSS RESET
   ------------------------------------------------------------ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ja), var(--font-en), sans-serif;
  font-weight: 400;
  line-height: var(--line-height-base);
  color: var(--color-text);
  background-color: var(--color-white);
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ------------------------------------------------------------
   3. ACCESSIBILITY UTILITIES
   ------------------------------------------------------------ */

/* Screen-reader only: visually hidden but accessible to assistive technology */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------------
   4. LAYOUT UTILITIES
   ------------------------------------------------------------ */
.section__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.section {
  padding: var(--section-padding-y) 0;
}

.section__header {
  text-align: center;
  margin-bottom: 64px;
}

/* Section label (EN small caps above heading) */
.section-label {
  display: inline-block;
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 12px;
}

/* Section headings */
.section-title {
  font-family: var(--font-ja), var(--font-en), sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.3;
  margin-bottom: 20px;
}

.section-lead {
  font-size: 1rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ------------------------------------------------------------
   4. HEADER / NAV
   ------------------------------------------------------------ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background-color: transparent;
  transition: background-color var(--transition-base),
              box-shadow var(--transition-base);
}

.site-header.is-scrolled {
  background-color: var(--color-navy-dark);
  box-shadow: var(--shadow-md);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 20px var(--container-pad);
}

/* Logo */
.nav-logo {
  font-family: var(--font-en);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-white);
}

.nav-logo__d {
  position: relative;
  display: inline-block;
  color: var(--color-accent);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition-base);
}

.nav-links a:hover {
  color: var(--color-white);
}

.nav-cta {
  background-color: var(--color-accent);
  color: var(--color-white) !important;
  padding: 10px 24px;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-base) !important;
}

.nav-cta:hover {
  background-color: #3a8a5e !important;
}

/* Hamburger toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-white);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* ------------------------------------------------------------
   5. HERO SECTION
   ------------------------------------------------------------ */
.section--hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0d1f35 0%, #1a3557 55%, #0d2a20 100%);
  padding-top: 80px; /* offset for fixed header */
  position: relative;
  overflow: hidden;
}

/* Subtle background radial glow */
.section--hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(ellipse at center, rgba(74, 159, 110, 0.08) 0%, transparent 65%);
  pointer-events: none;
}

.hero-content {
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  position: relative;
  z-index: 1;
}

/* Split layout: text left, mockup right (desktop) */
.hero-content--split {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  gap: 48px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero-text-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  flex: 0 0 auto;
  max-width: 520px;
}

.hero-mockup-col {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Logo */
.hero-logo {
  opacity: 0;
  transform: scale(0.85) translateY(10px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-logo.is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.hero-logo__svg {
  width: min(420px, 85vw);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 4px 24px rgba(74, 159, 110, 0.25));
}

/* Logo leaf animation */
.logo-leaf {
  transform-origin: 378px 28px;
  animation: leafSway 4s ease-in-out infinite;
}

@keyframes leafSway {
  0%, 100% { transform: rotate(0deg); }
  30%       { transform: rotate(3deg); }
  70%       { transform: rotate(-2deg); }
}

/* Hero Tagline */
.hero-tagline {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
  font-family: var(--font-ja), sans-serif;
  font-size: clamp(1.1rem, 3vw, 1.625rem);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.08em;
  line-height: 1.5;
}

.hero-tagline.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Sub-tagline: value proposition (task1388) */
.hero-sub-tagline {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
  font-family: var(--font-ja), sans-serif;
  font-size: clamp(0.875rem, 1.8vw, 1rem);
  font-weight: 400;
  color: rgba(74, 159, 110, 0.9);
  letter-spacing: 0.05em;
  line-height: 1.6;
}

.hero-sub-tagline.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* CTA Buttons */
.hero-cta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s;
}

.hero-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Secondary CTA row */
.hero-cta-secondary {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Enlarged primary CTA for hero (task1388) */
.btn--primary-hero {
  padding: 18px 48px;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  box-shadow: 0 4px 20px rgba(74, 159, 110, 0.3);
}

.btn--primary-hero:hover {
  box-shadow: 0 8px 32px rgba(74, 159, 110, 0.45);
}

/* Smaller secondary buttons for hero (task1388) */
.btn--secondary-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* ---- Product mockup visual (task1388) ---- */
.hero-mockup {
  width: 380px;
  max-width: 100%;
  filter: drop-shadow(0 24px 48px rgba(0, 0, 0, 0.4));
  animation: mockupFloat 6s ease-in-out infinite;
}

@keyframes mockupFloat {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

.hero-mockup__browser {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.hero-mockup__bar {
  background: rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-mockup__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: inline-block;
}
.hero-mockup__dot:first-child { background: rgba(255, 80, 80, 0.6); }
.hero-mockup__dot:nth-child(2) { background: rgba(255, 190, 0, 0.6); }
.hero-mockup__dot:nth-child(3) { background: rgba(74, 159, 110, 0.7); }

.hero-mockup__url {
  flex: 1;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-en), monospace;
}

.hero-mockup__screen {
  padding: 16px;
}

.hero-mockup__chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-mockup__msg {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.hero-mockup__msg--user {
  flex-direction: row-reverse;
}

.hero-mockup__avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: rgba(74, 159, 110, 0.25);
  border: 1px solid rgba(74, 159, 110, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #4a9f6e;
  font-family: var(--font-en), sans-serif;
}

.hero-mockup__bubble {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  max-width: 75%;
  font-family: var(--font-ja), sans-serif;
}

.hero-mockup__msg--user .hero-mockup__bubble {
  background: rgba(74, 159, 110, 0.18);
  border-color: rgba(74, 159, 110, 0.3);
}

.hero-mockup__typing {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4a9f6e;
  margin-right: 4px;
  vertical-align: middle;
  animation: typingPulse 1.2s ease-in-out infinite;
}

@keyframes typingPulse {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50%       { opacity: 1; transform: scale(1.2); }
}

.hero-mockup__deploy {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(74, 159, 110, 0.12);
  border: 1px solid rgba(74, 159, 110, 0.3);
  border-radius: 6px;
  font-size: 0.7rem;
  color: #4a9f6e;
  font-family: var(--font-ja), sans-serif;
  font-weight: 500;
  align-self: flex-start;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  border-radius: var(--radius-md);
  font-family: var(--font-ja), var(--font-en), sans-serif;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base),
              transform var(--transition-base),
              box-shadow var(--transition-base);
  text-decoration: none;
  line-height: 1;
}

.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-white);
  border: 2px solid var(--color-accent);
}

.btn--primary:hover {
  background-color: #3a8a5e;
  border-color: #3a8a5e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74, 159, 110, 0.35);
}

.btn--ghost {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.45);
}

.btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

/* CTA section specific buttons */
.btn--white {
  background-color: var(--color-white);
  color: var(--color-navy);
  border: 2px solid var(--color-white);
}

.btn--white:hover {
  background-color: var(--color-light-gray);
  border-color: var(--color-light-gray);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn--ghost-white {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn--ghost-white:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

/* Video button */
.btn--video {
  background-color: transparent;
  color: rgba(255, 255, 255, 0.88);
  border: 2px solid rgba(74, 159, 110, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn--video:hover {
  background-color: rgba(74, 159, 110, 0.12);
  border-color: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* ============================================================
   MODAL ANIMATIONS (task1336) — shared keyframes
   ============================================================ */
@keyframes modalOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modalOverlayOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes modalContainerIn {
  from {
    opacity: 0;
    transform: scale(0.82) translateY(28px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes modalContainerOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.88) translateY(16px);
  }
}

/* Video Modal */
.video-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Hidden by default: invisible + non-interactive */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Remove old [hidden] rule — now controlled by .is-open / .is-closing */
.video-modal[hidden] {
  display: flex; /* keep layout so animation works; visibility hides it */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* Open state */
.video-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

/* Closing state — plays exit animation before [hidden] is restored */
.video-modal.is-closing {
  opacity: 1;
  pointer-events: none;
  visibility: visible;
}

.video-modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(13, 31, 53, 0.92);
  cursor: pointer;
}
.video-modal.is-open .video-modal__overlay {
  animation: modalOverlayIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.video-modal.is-closing .video-modal__overlay {
  animation: modalOverlayOut 0.24s cubic-bezier(0.55, 0, 1, 0.45) both;
}

.video-modal__container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 900px;
  background-color: #0d1f35;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.video-modal.is-open .video-modal__container {
  animation: modalContainerIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.video-modal.is-closing .video-modal__container {
  animation: modalContainerOut 0.24s cubic-bezier(0.55, 0, 1, 0.45) both;
}

.video-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  height: 40px;
  width: auto;
  padding: 0 10px 0 14px;
  gap: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  transition: background-color var(--transition-base);
}

.video-modal__close:hover {
  background-color: rgba(255, 255, 255, 0.22);
}

.video-modal__close-label {
  font-family: var(--font-en);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-white);
  line-height: 1;
  white-space: nowrap;
}

.video-modal__iframe-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}

.video-modal__iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Cover overlay to hide Google Drive external-link icon (top-right) */
.video-modal__gdrive-cover {
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 48px;
  z-index: 3;
  background: linear-gradient(135deg, rgba(13, 31, 53, 0.0) 0%, #0d1f35 60%);
  pointer-events: auto;
  cursor: pointer;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--font-en);
  font-size: 0.6875rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0;
  animation: scrollFadeIn 1s ease 2.8s forwards;
}

.scroll-indicator__arrow {
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollFadeIn {
  to { opacity: 1; }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* ============================================================
   SEED ANIMATION OVERLAY
   ============================================================ */
.seed-animation {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0d1f35;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.seed-animation.is-done {
  opacity: 0;
  pointer-events: none;
}

.seed-animation.is-hidden {
  display: none;
}

.seed-svg {
  width: 160px;
  height: auto;
  overflow: visible;
}

/* Phase 1: Seed appears */
.seed {
  opacity: 0;
  animation: seedAppear 0.5s ease 0.2s forwards;
}

@keyframes seedAppear {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* Phase 2: Stem grows (stroke-dasharray trick) */
.stem {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: stemGrow 0.8s ease 0.8s forwards;
}

@keyframes stemGrow {
  to { stroke-dashoffset: 0; }
}

/* Phase 3: Leaves open */
.leaf--left {
  animation: leafOpen 0.45s ease 1.5s forwards;
  transform-origin: 100px 195px;
}

.leaf--right {
  animation: leafOpen 0.45s ease 1.65s forwards;
  transform-origin: 100px 195px;
}

.leaf--upper-left {
  animation: leafOpen 0.45s ease 1.8s forwards;
  transform-origin: 100px 175px;
}

.leaf--upper-right {
  animation: leafOpen 0.45s ease 1.95s forwards;
  transform-origin: 100px 175px;
}

@keyframes leafOpen {
  from { opacity: 0; transform: scale(0.3); }
  to   { opacity: 1; transform: scale(1); }
}

/* Soil line pulse */
.soil-line {
  animation: soilFade 0.4s ease 0.1s both;
}

@keyframes soilFade {
  from { opacity: 0; }
  to   { opacity: 0.5; }
}

/* ------------------------------------------------------------
   6. ABOUT SECTION
   ------------------------------------------------------------ */
.section--about {
  background-color: var(--color-white);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.about-card {
  text-align: center;
  padding: 40px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray);
  background-color: var(--color-white);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.about-card__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.about-card__title {
  font-family: var(--font-ja), sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.about-card__text {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* ------------------------------------------------------------
   7b. VISION SECTION
   ------------------------------------------------------------ */
.section--vision {
  background: linear-gradient(160deg, #0d1f35 0%, #1a3557 60%, #0d2a20 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section--vision::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(ellipse at center, rgba(74, 159, 110, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.section--vision .section__header {
  margin-bottom: 48px;
}

.section-title--white {
  color: var(--color-white);
}

.vision-body {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.vision-block {
  margin-bottom: 36px;
}

.vision-block:last-child {
  margin-bottom: 0;
}

.vision-block--highlight {
  background: rgba(74, 159, 110, 0.08);
  border-left: 3px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 32px 36px;
  margin-left: -36px;
  margin-right: -36px;
}

.vision-text {
  font-size: 1.05rem;
  line-height: 2;
  color: rgba(255, 255, 255, 0.8);
}

.vision-text strong {
  color: var(--color-white);
  font-weight: 700;
}

.vision-text--contrast {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
}

.vision-text--belief {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}

.vision-text--mission {
  font-size: 1.05rem;
}

.pc-only {
  display: inline;
}

@media (max-width: 768px) {
  .pc-only {
    display: none;
  }

  .vision-block--highlight {
    padding: 24px 20px;
    margin-left: 0;
    margin-right: 0;
  }

  .vision-text {
    font-size: 0.95rem;
  }

  .vision-text--belief {
    font-size: 1rem;
  }
}

/* ------------------------------------------------------------
   8. HOW IT WORKS SECTION
   ------------------------------------------------------------ */
.section--how-it-works {
  background-color: var(--color-white);
}

.steps-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  position: relative;
}

.step {
  text-align: center;
  padding: 0 24px;
  position: relative;
}

.step__number {
  font-family: var(--font-en);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(74, 159, 110, 0.15);
  line-height: 1;
  margin-bottom: 16px;
  position: relative;
}

.step__number::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background-color: var(--color-accent);
  margin: 12px auto 0;
  border-radius: 2px;
}

.step__connector {
  position: absolute;
  top: 24px;
  right: -1px;
  width: 50%;
  height: 2px;
  background: linear-gradient(to right, transparent, rgba(74, 159, 110, 0.3));
  pointer-events: none;
}

.step:first-child .step__connector {
  right: auto;
  left: 50%;
  background: linear-gradient(to right, rgba(74, 159, 110, 0.3), rgba(74, 159, 110, 0.3));
}

.step__connector--last {
  display: none;
}

.step__content {
  padding-top: 8px;
}

.step__title {
  font-family: var(--font-ja), sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.step__text {
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.8;
}

/* ------------------------------------------------------------
   9. CTA SECTION
   ------------------------------------------------------------ */
.section--cta {
  background: linear-gradient(140deg, #0d1f35 0%, #1a3557 50%, #0d2a20 100%);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.section--cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse at center, rgba(74, 159, 110, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.cta-label {
  color: rgba(74, 159, 110, 0.9);
}

.cta-title {
  font-family: var(--font-ja), var(--font-en), sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
  margin-bottom: 20px;
}

.cta-lead {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------
   10. FOOTER
   ------------------------------------------------------------ */
.site-footer {
  background-color: var(--color-navy-dark);
  padding: 0;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  padding: 56px 0 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  font-family: var(--font-en);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-white);
}

.footer-logo__link {
  color: inherit;
  text-decoration: none;
}

.footer-tagline {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 6px;
  letter-spacing: 0.05em;
}

.footer-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.footer-nav__list a {
  font-family: var(--font-en);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-base);
}

.footer-nav__list a:hover {
  color: var(--color-white);
}

.footer-social {
  display: flex;
  gap: 16px;
  align-items: center;
}

.footer-social__link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  transition: background-color var(--transition-base), color var(--transition-base);
}

.footer-social__link:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
}

.footer-copy {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ------------------------------------------------------------
   11. SCROLL ANIMATIONS
   ------------------------------------------------------------ */
.fade-in-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-section {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ------------------------------------------------------------
   12. RESPONSIVE BREAKPOINTS
   ------------------------------------------------------------ */

/* ---- Tablet: 768px ---- */
@media (max-width: 768px) {
  :root {
    --section-padding-y: 64px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 32px;
    background-color: var(--color-navy-dark);
    z-index: 800;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.125rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
  }

  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 910;
  }

  .nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .section__header {
    margin-bottom: 40px;
  }

  /* About */
  .about-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .about-card {
    padding: 32px 24px;
  }

  .about-card__icon svg {
    width: 48px;
    height: 48px;
  }

  /* Steps */
  .steps-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .step__connector {
    display: none;
  }

  .step__number {
    font-size: 2.25rem;
  }

  .step__content {
    padding-top: 4px;
  }

  .step__title {
    font-size: 1rem;
  }

  /* CTA */
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .cta-buttons .btn {
    width: 100%;
    max-width: 360px;
    min-height: 52px;
    font-size: 1.05rem;
  }

  /* Footer */
  .footer-top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 28px;
    padding: 40px 0 32px;
  }

  .footer-nav__list {
    justify-content: center;
  }

  /* Video modal responsive */
  .video-modal {
    padding: 12px;
  }

  .video-modal__container {
    border-radius: var(--radius-md);
  }

  .video-modal__iframe-wrap {
    padding-top: 56.25%;
  }

  /* Hero responsive — tablet / mobile: collapse split layout */
  .hero-content {
    gap: 24px;
    padding: 0 16px;
  }

  .hero-content--split {
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 32px;
    padding: 0 16px;
  }

  .hero-text-col {
    align-items: center;
    max-width: 100%;
  }

  .hero-mockup-col {
    width: 100%;
    max-width: 360px;
  }

  .hero-mockup {
    width: 100%;
  }

  .hero-cta {
    align-items: center;
    gap: 12px;
  }

  .hero-cta-secondary {
    justify-content: center;
  }

  .hero-logo__svg {
    width: min(340px, 88vw);
  }

  .btn {
    padding: 13px 28px;
    font-size: 0.9rem;
  }

  .btn--primary-hero {
    padding: 16px 36px;
    font-size: 1rem;
  }

  .scroll-indicator {
    display: none;
  }

  .seed-svg {
    width: 120px;
  }
}

/* ---- Small mobile: 375px ---- */
@media (max-width: 400px) {
  .hero-logo__svg {
    width: 88vw;
  }

  .btn--primary,
  .btn--ghost {
    width: 100%;
    max-width: 260px;
  }

  .btn--primary-hero {
    width: 100%;
    max-width: 280px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-cta-secondary {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .about-card {
    padding: 24px 16px;
  }
}

/* ---- Desktop: 1200px ---- */
@media (min-width: 1200px) {
  :root {
    --section-padding-y: 120px;
  }

  .nav-container {
    padding: 24px var(--container-pad);
  }

  .about-grid {
    gap: 40px;
  }
}

/* ============================================================
   SLIDE MODAL (詳しく見る — Googleスライド)
   task1330
============================================================ */
.slide-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Hidden by default */
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.slide-modal[hidden] {
  display: flex;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.slide-modal.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.slide-modal.is-closing {
  opacity: 1;
  pointer-events: none;
  visibility: visible;
}

.slide-modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(13, 31, 53, 0.92);
  cursor: pointer;
}
.slide-modal.is-open .slide-modal__overlay {
  animation: modalOverlayIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.slide-modal.is-closing .slide-modal__overlay {
  animation: modalOverlayOut 0.24s cubic-bezier(0.55, 0, 1, 0.45) both;
}

.slide-modal__container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1100px;
  background-color: #0d1f35;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.slide-modal.is-open .slide-modal__container {
  animation: modalContainerIn 0.38s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.slide-modal.is-closing .slide-modal__container {
  animation: modalContainerOut 0.24s cubic-bezier(0.55, 0, 1, 0.45) both;
}

.slide-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 10;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  transition: background-color var(--transition-base);
}

.slide-modal__close:hover {
  background-color: rgba(255, 255, 255, 0.22);
}

/* スライドコンテンツ領域のアスペクト比 (1100:620 ≈ 56.36%)
   Google Slides ツールバー（上部 ~40px・下部 ~40px）をクリップするため
   iframeを上方向にずらし（top: -40px）高さを拡張して overflow:hidden でカット */
.slide-modal__iframe-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.36%;
  overflow: hidden;
}

.slide-modal__iframe-wrap iframe {
  position: absolute;
  /* 上部ツールバー分（約40px）を負のオフセットで見切れさせる */
  top: -40px;
  left: 0;
  width: 100%;
  /* 上部（40px）＋下部（40px）ツールバー分を追加して両端を overflow:hidden でカット */
  height: calc(100% + 80px);
  border: none;
  display: block;
}

/* Google Slides ツールバー・リンクへのクリックを防止するオーバーレイ */
.slide-modal__iframe-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none; /* スライド操作は通す — 遷移リンクはiframe内なので干渉しない */
}

/* レスポンシブ: タブレット以下 */
@media (max-width: 768px) {
  .slide-modal {
    padding: 12px;
  }

  .slide-modal__container {
    border-radius: var(--radius-md);
  }

  .slide-modal__iframe-wrap {
    padding-top: 56.36%;
  }

  .slide-modal__iframe-wrap iframe {
    top: -30px;
    height: calc(100% + 60px);
  }
}

/* ============================================================
   AUTH STYLES (register.php / login.php)
   ============================================================ */

/* nav-register: 新規登録ボタン（ヘッダーナビ） */
.nav-register {
  background-color: transparent !important;
  color: var(--color-accent) !important;
  border: 1.5px solid var(--color-accent);
  padding: 8px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-ja) !important;
  font-size: 0.8rem !important;
  font-weight: 500 !important;
  transition: background-color var(--transition-base) !important, color var(--transition-base) !important;
}

.nav-register:hover {
  background-color: var(--color-accent) !important;
  color: var(--color-white) !important;
}

/* auth-main: 認証ページ共通レイアウト */
.auth-main {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--color-navy-dark) 0%, var(--color-navy) 60%, #1e4a6e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px var(--container-pad) 48px;
}

.auth-container {
  width: 100%;
  max-width: 480px;
}

.auth-card {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-lg);
  padding: 48px 40px 40px;
  backdrop-filter: blur(12px);
}

/* ロゴ */
.auth-logo {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo a {
  text-decoration: none;
}

.auth-logo .nav-logo__text {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-white);
}

/* タイトル */
.auth-title {
  font-family: var(--font-ja);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  text-align: center;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-family: var(--font-ja);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  margin-bottom: 32px;
}

/* アラート（エラー） */
.auth-alert {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 24px;
}

.auth-alert--error {
  background-color: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.35);
}

.auth-alert__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.auth-alert__list li {
  font-family: var(--font-ja);
  font-size: 0.875rem;
  color: #f87171;
  padding: 2px 0;
}

.auth-alert__list li + li {
  margin-top: 4px;
}

/* フォーム */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-family: var(--font-ja);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.auth-required {
  font-size: 0.75rem;
  color: var(--color-accent);
  margin-left: 6px;
}

.auth-input {
  width: 100%;
  padding: 12px 16px;
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  font-family: var(--font-ja);
  font-size: 1rem;
  color: var(--color-white);
  transition: border-color var(--transition-base), background-color var(--transition-base);
  box-sizing: border-box;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.30);
}

.auth-input:focus {
  outline: none;
  border-color: var(--color-accent);
  background-color: rgba(255, 255, 255, 0.10);
}

.auth-input--error {
  border-color: rgba(220, 53, 69, 0.60);
}

textarea.auth-input {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.auth-hint {
  font-family: var(--font-ja);
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.40);
  margin: 0;
}

/* 送信ボタン */
.auth-btn {
  width: 100%;
  padding: 14px;
  background-color: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-ja);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-base), transform 0.1s ease;
  margin-top: 8px;
}

.auth-btn:hover {
  background-color: #3a8a5e;
}

.auth-btn:active {
  transform: scale(0.99);
}

/* ログイン / 新規登録 切り替えリンク */
.auth-switch {
  font-family: var(--font-ja);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.50);
  text-align: center;
  margin-top: 28px;
  margin-bottom: 0;
}

.auth-switch__link {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-base);
}

.auth-switch__link:hover {
  color: #6abf8e;
}

/* レスポンシブ: スマートフォン */
@media (max-width: 520px) {
  .auth-card {
    padding: 36px 24px 32px;
  }
}

@media (max-width: 768px) {
  .nav-register {
    display: inline-block;
    margin-top: 8px;
  }
}

/* ------------------------------------------------------------
   auth-alert--success: 成功アラート（task1342 mypage）
   ------------------------------------------------------------ */
.auth-alert--success {
  background-color: rgba(74, 159, 110, 0.15);
  border: 1px solid rgba(74, 159, 110, 0.40);
  font-family: var(--font-ja);
  font-size: 0.875rem;
  color: #6abf8e;
}

/* ------------------------------------------------------------
   mypage: マイページ固有スタイル（task1342）
   ------------------------------------------------------------ */
.mypage-main {
  align-items: flex-start;
  padding-top: 100px;
  padding-bottom: 64px;
}

.mypage-container {
  max-width: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* フルワイド用グリッド: プロフィール編集とパスワード変更を横並び */
.mypage-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .mypage-cards-grid {
    grid-template-columns: 1fr;
  }
}

.mypage-section-title {
  font-family: var(--font-ja);
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.70);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.mypage-info-card {
  padding: 28px 40px;
}

.mypage-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mypage-info-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.mypage-info-label {
  font-family: var(--font-ja);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  min-width: 120px;
  flex-shrink: 0;
}

.mypage-info-value {
  font-family: var(--font-ja);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.90);
  word-break: break-all;
}

@media (max-width: 520px) {
  .mypage-info-card {
    padding: 24px 24px;
  }

  .mypage-info-row {
    flex-direction: column;
    gap: 4px;
  }

  .mypage-info-label {
    min-width: unset;
  }
}

/* ------------------------------------------------------------
   admin_accounts: 管理者アカウント管理ページ（task-admin-accounts）
   ------------------------------------------------------------ */

/* コンテナ: テーブルがあるので幅を広げる */
.admin-main {
  align-items: flex-start;
  padding-top: 100px;
  padding-bottom: 64px;
}

.admin-container {
  max-width: none;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 検索バー */
.admin-search-card {
  padding: 20px 28px;
}

.admin-search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-search-input {
  flex: 1;
  min-width: 200px;
}

.admin-search-btn {
  padding: 12px 24px;
  background-color: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-ja);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-base);
  white-space: nowrap;
}

.admin-search-btn:hover {
  background-color: #3a8a5e;
}

.admin-search-clear {
  color: rgba(255, 255, 255, 0.50);
  font-family: var(--font-ja);
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition-base);
  white-space: nowrap;
}

.admin-search-clear:hover {
  color: rgba(255, 255, 255, 0.80);
}

.admin-count-text {
  font-family: var(--font-ja);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 10px;
}

/* テーブルカード */
.admin-table-card {
  padding: 28px;
  overflow: hidden;
}

.admin-table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-ja);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.85);
  min-width: 700px;
}

.admin-table thead th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  white-space: nowrap;
}

.admin-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background-color var(--transition-base);
}

.admin-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.04);
}

.admin-table tbody tr.admin-table__row--self {
  background-color: rgba(74, 159, 110, 0.06);
}

.admin-table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
}

.admin-table__id {
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.8125rem;
  width: 40px;
}

.admin-table__email {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
  word-break: break-all;
}

.admin-table__date {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

/* ロールバッジ */
.admin-role-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.admin-role-badge--admin {
  background-color: rgba(74, 159, 110, 0.20);
  color: #6abf8e;
  border: 1px solid rgba(74, 159, 110, 0.35);
}

.admin-role-badge--user {
  background-color: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-role-badge--super_admin {
  background-color: rgba(147, 51, 234, 0.20);
  color: #c084fc;
  border: 1px solid rgba(147, 51, 234, 0.40);
}

/* ステータスバッジ（有効・無効） */
.admin-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.admin-status-badge--active {
  background-color: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.admin-status-badge--inactive {
  background-color: var(--color-danger-light, rgba(239, 68, 68, 0.12));
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.30);
}

/* 有効化/無効化アクションボタン */
.admin-action-btn--activate {
  background-color: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.admin-action-btn--activate:hover {
  background-color: rgba(34, 197, 94, 0.22);
}

.admin-action-btn--deactivate {
  background-color: var(--color-danger-light, rgba(239, 68, 68, 0.10));
  border-color: rgba(239, 68, 68, 0.30);
  color: #f87171;
}

.admin-action-btn--deactivate:hover {
  background-color: rgba(239, 68, 68, 0.20);
}

/* アクションボタン */
.admin-table__actions {
  white-space: nowrap;
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-action-btn {
  padding: 5px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ja);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color var(--transition-base), border-color var(--transition-base);
}

.admin-action-btn--edit {
  background-color: rgba(74, 159, 110, 0.15);
  border-color: rgba(74, 159, 110, 0.35);
  color: #6abf8e;
}

.admin-action-btn--edit:hover {
  background-color: rgba(74, 159, 110, 0.25);
}

.admin-action-btn--delete {
  background-color: var(--color-danger-light, rgba(239, 68, 68, 0.12));
  border-color: rgba(239, 68, 68, 0.30);
  color: #f87171;
}

.admin-action-btn--delete:hover {
  background-color: rgba(239, 68, 68, 0.22);
}

.admin-action-self {
  font-family: var(--font-ja);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.30);
}

/* 空セル表示 */
.admin-table__none {
  color: rgba(255,255,255,0.3);
  font-style: italic;
}

/* ページネーション */
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.admin-page-btn {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ja);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.60);
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  transition: background-color var(--transition-base), color var(--transition-base);
  text-decoration: none;
}

.admin-page-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}

.admin-page-btn--active {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-white);
  font-weight: 600;
  pointer-events: none;
}

/* 追加フォーム: 2カラムレイアウト */
.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.admin-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.4)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.admin-select option {
  background-color: #1a3557;
  color: #ffffff;
}

.admin-add-btn {
  max-width: 240px;
  align-self: flex-end;
}

/* 編集モーダル */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-modal[hidden] {
  display: none;
}

.admin-modal__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.70);
  backdrop-filter: blur(2px);
}

.admin-modal__container {
  position: relative;
  z-index: 1;
  background: linear-gradient(135deg, #1e3a5f 0%, #162d4a 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  margin: 16px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.50);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-modal__close:hover {
  color: rgba(255, 255, 255, 0.85);
}

.admin-modal__title {
  font-family: var(--font-ja);
  font-size: 1.125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.90);
  margin: 0;
}

.admin-modal__divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 16px 0;
}

.admin-modal__helper {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.admin-modal__balance {
  color: var(--color-info, #3b82f6);
  font-weight: 600;
}

.admin-modal__subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

/* レスポンシブ: スマートフォン */
@media (max-width: 768px) {
  .admin-container {
    max-width: 100%;
  }

  .admin-form-row {
    grid-template-columns: 1fr;
  }

  .admin-add-btn {
    max-width: 100%;
    align-self: stretch;
  }

  .admin-table-card {
    padding: 20px 16px;
  }

  .admin-search-card {
    padding: 16px 20px;
  }
}

/* ------------------------------------------------------------
   register: 新規登録フォーム拡張スタイル（task1352）
   ------------------------------------------------------------ */

/* ラジオボタングループ */
.auth-radio-group {
  display: flex;
  gap: 24px;
  padding-top: 4px;
}

.auth-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-ja);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition-base);
}

.auth-radio-label:hover {
  color: var(--color-white);
}

.auth-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.30);
  border-radius: 50%;
  background-color: transparent;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--transition-base), background-color var(--transition-base);
  position: relative;
}

.auth-radio:checked {
  border-color: var(--color-accent);
  background-color: var(--color-accent);
  box-shadow: inset 0 0 0 3px rgba(26, 26, 46, 0.95);
}

.auth-radio:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(74, 159, 110, 0.30), inset 0 0 0 3px rgba(26, 26, 46, 0.95);
}

/* セレクトボックス */
.auth-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.40)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

.auth-select option {
  background-color: #1a1a2e;
  color: var(--color-white);
}

.auth-select option:first-child {
  color: rgba(255, 255, 255, 0.40);
}

/* 会社名フィールドのアニメーション */
.auth-field--company {
  overflow: hidden;
  transition: opacity 0.2s ease;
}

/* 登録完了（メール送信後）成功メッセージ */
.auth-success-message {
  text-align: center;
  padding: 8px 0 24px;
}

.auth-success-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--color-accent);
}

.auth-success-text {
  font-family: var(--font-ja);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.8;
  margin: 0 0 20px;
}

.auth-success-note {
  font-family: var(--font-ja);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.7;
  margin: 0;
  padding: 16px;
  background-color: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-success-note strong {
  color: rgba(255, 255, 255, 0.70);
}

/* ============================================================
   MYPAGE — 2カラムレイアウト（サイドバー＋メインコンテンツ）
   v=20260305-mypage-coaching
   ============================================================ */

/* ----------------------------------------------------------
   ラッパー: Flexboxで左サイドバー＋右メイン
   ---------------------------------------------------------- */
.mypage-wrapper {
  display: flex;
  min-height: 100vh; /* ヘッダーなし */
  width: 100%;
  background-color: var(--color-light-gray);
}

/* ----------------------------------------------------------
   サイドバー
   ---------------------------------------------------------- */
.mypage-sidebar {
  width: 260px;
  flex-shrink: 0;
  background-color: var(--color-navy-dark);
  color: var(--color-white);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0; /* ヘッダーなし */
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.mypage-sidebar__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px 0;
}

/* ユーザー情報 */
.mypage-sidebar__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}

.mypage-sidebar__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--color-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-ja);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-white);
  flex-shrink: 0;
}

.mypage-sidebar__name {
  font-family: var(--font-ja);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-white);
  margin: 0 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.mypage-sidebar__email {
  font-family: var(--font-en);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

/* ナビゲーション */
.mypage-nav {
  flex: 1;
  padding: 0 12px;
}

.mypage-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mypage-nav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: var(--font-ja);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.mypage-nav__link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

.mypage-nav__item--active .mypage-nav__link {
  background-color: rgba(74, 159, 110, 0.2);
  color: var(--color-accent);
}

.mypage-nav__icon {
  flex-shrink: 0;
  opacity: 0.8;
}

.mypage-nav__item--active .mypage-nav__icon {
  opacity: 1;
}

/* サイドバーナビ バッジ（オープンチケット数） */
.mypage-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: auto;
  border-radius: 9px;
  background-color: var(--color-danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1;
}

/* サイドバーフッター（ログアウト） */
.mypage-sidebar__footer {
  padding: 16px 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.mypage-sidebar__logout {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ja);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.mypage-sidebar__logout:hover {
  color: rgba(255, 255, 255, 0.85);
}

/* ----------------------------------------------------------
   メインコンテンツ
   ---------------------------------------------------------- */
.mypage-main {
  flex: 1;
  min-width: 0;
  padding: 32px 40px;
  overflow-x: hidden;
}

/* モバイルトグルボタン（デスクトップでは非表示） */
.mypage-mobile-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: var(--font-ja);
  font-size: 0.875rem;
  color: var(--color-text);
  cursor: pointer;
  margin-bottom: 20px;
  transition: background-color 0.2s ease;
}

.mypage-mobile-toggle:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

/* ページヘッダー */
.mypage-content-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mypage-content-title {
  font-family: var(--font-ja);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--color-navy-dark);
  margin: 0 0 6px;
}

.mypage-content-sub {
  font-family: var(--font-ja);
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin: 0;
}

/* ----------------------------------------------------------
   セクション共通スタイル
   ---------------------------------------------------------- */
.mypage-section {
  background-color: var(--color-white);
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  margin-bottom: 24px;
  overflow: hidden;
}

.mypage-section__header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background-color: rgba(26, 53, 87, 0.02);
}

.mypage-section__title {
  font-family: var(--font-ja);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0;
}

.mypage-section__body {
  padding: 24px;
}

/* プレースホルダーテキスト */
.mypage-placeholder-text {
  font-family: var(--font-ja);
  font-size: 0.875rem;
  color: var(--color-text-light);
  text-align: center;
  padding: 24px 0;
  margin: 0;
}

/* ----------------------------------------------------------
   モバイルオーバーレイ
   ---------------------------------------------------------- */
.mypage-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mypage-overlay.is-visible {
  display: block;
  opacity: 1;
}

/* ----------------------------------------------------------
   レスポンシブ対応
   ---------------------------------------------------------- */

/* タブレット（1024px以下）: サイドバー幅を縮小 */
@media (max-width: 1024px) {
  .mypage-sidebar {
    width: 220px;
  }

  .mypage-main {
    padding: 28px 28px;
  }
}

/* モバイル（768px以下）: サイドバーをオフキャンバスに変更 */
@media (max-width: 768px) {
  .mypage-wrapper {
    display: block;
    min-height: auto;
  }

  .mypage-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    transform: translateX(-100%);
    z-index: 200;
  }

  .mypage-sidebar.is-open {
    transform: translateX(0);
  }

  .mypage-mobile-toggle {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background-color: var(--color-bg, #f5f7fa);
    margin-bottom: 0;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .mypage-main {
    padding: 20px 16px;
    padding-top: 70px;
  }

  .mypage-content-title {
    font-size: 1.375rem;
  }

  .mypage-section__header {
    padding: 16px 20px;
  }

  .mypage-section__body {
    padding: 20px;
  }
}

/* ============================================================
   LIFECYCLE STATUS — 育成ステータス Section A
   v=20260305-mypage-lifecycle
   ============================================================ */

/* ----------------------------------------------------------
   CSS Variables (lifecycle-specific)
   ---------------------------------------------------------- */
:root {
  /* Seed phase */
  --lc-seed-color:       #8B6914;
  --lc-seed-light:       #FEF3C7;
  --lc-seed-mid:         #F59E0B;
  --lc-seed-dark:        #78350F;

  /* Sprout phase */
  --lc-sprout-color:     #166534;
  --lc-sprout-light:     #DCFCE7;
  --lc-sprout-mid:       #22C55E;
  --lc-sprout-dark:      #14532D;

  /* Tree phase */
  --lc-tree-color:       #14532D;
  --lc-tree-light:       #BBF7D0;
  --lc-tree-mid:         #16A34A;
  --lc-tree-dark:        #052e16;
}

/* ----------------------------------------------------------
   Section header 拡張
   ---------------------------------------------------------- */
.lc-section .mypage-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lc-section__icon-wrap {
  margin-right: 4px;
  font-size: 1.1em;
}

/* フェーズバッジ */
.lc-phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-en), var(--font-ja), sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lc-phase-badge--seed   { background: var(--lc-seed-light);   color: var(--lc-seed-dark); }
.lc-phase-badge--sprout { background: var(--lc-sprout-light); color: var(--lc-sprout-dark); }
.lc-phase-badge--tree   { background: var(--lc-tree-light);   color: var(--lc-tree-dark); }

/* ----------------------------------------------------------
   3フェーズ ビジュアルトラック
   ---------------------------------------------------------- */
.lc-phases-track {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  padding: 8px 0 32px;
  position: relative;
}

/* 個別フェーズ */
.lc-phase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  min-width: 80px;
}

/* ノード（円） */
.lc-phase__node {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  border: 3px solid;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 完了済みフェーズ */
.lc-phase--done .lc-phase__node {
  background-color: var(--lc-sprout-mid);
  border-color: var(--lc-sprout-color);
  color: #fff;
}
.lc-phase--done .lc-phase__check {
  color: #fff;
  stroke: #fff;
}

/* アクティブフェーズ */
.lc-phase--active .lc-phase__node {
  background-color: var(--color-white);
  border-color: currentColor;
  animation: lc-pulse 2.4s ease-in-out infinite;
}
.lc-phase--active.lc-phase { color: var(--lc-sprout-color); }

/* phase-specific active colors */
.lc-phase--active[data-phase="seed"]   { color: var(--lc-seed-color); }
.lc-phase--active[data-phase="tree"]   { color: var(--lc-tree-color); }

/* 未来フェーズ */
.lc-phase--future .lc-phase__node {
  background-color: var(--color-gray);
  border-color: #cbd5e1;
  opacity: 0.55;
}
.lc-phase--future .lc-phase__emoji {
  filter: grayscale(1);
}

/* ラベル */
.lc-phase__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.lc-phase__label-en {
  font-family: var(--font-en), sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--color-navy);
}
.lc-phase--future .lc-phase__label-en {
  color: var(--color-text-light);
}
.lc-phase__label-ja {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.7rem;
  color: var(--color-text-light);
}

/* "現在" タグ */
.lc-phase__current-tag {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--lc-sprout-mid);
  color: #fff;
  font-family: var(--font-ja), sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 2;
}

/* フェーズ間コネクター */
.lc-phases-connector {
  flex: 1;
  height: 3px;
  background: #e2e8f0;
  margin-top: 28px; /* vertically center with node */
  border-radius: 2px;
  max-width: 120px;
  transition: background-color 0.6s ease;
}
.lc-phases-connector--done {
  background: var(--lc-sprout-mid);
}

/* Active phase: phase-specific ring color overrides */
.lc-phase--active .lc-phase__node {
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.15);
}

/* ----------------------------------------------------------
   パルスアニメーション（アクティブフェーズ）
   ---------------------------------------------------------- */
@keyframes lc-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.3), 0 0 0 6px rgba(34, 197, 94, 0.08); }
  50%       { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.15), 0 0 0 14px rgba(34, 197, 94, 0.04); }
}

/* ----------------------------------------------------------
   ステータスグリッド（下段カード群）
   ---------------------------------------------------------- */
.lc-status-grid {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 20px;
  align-items: start;
}

/* 汎用カードベース */
.lc-card {
  background: var(--color-light-gray);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(0,0,0,0.06);
}

/* ----------------------------------------------------------
   現フェーズ詳細カード (lc-card--primary)
   ---------------------------------------------------------- */
.lc-phase-card {
  border-left: 4px solid;
}
.lc-phase-card--seed   { border-left-color: var(--lc-seed-mid); }
.lc-phase-card--sprout { border-left-color: var(--lc-sprout-mid); }
.lc-phase-card--tree   { border-left-color: var(--lc-tree-mid); }

.lc-phase-card__header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}
.lc-phase-card__emoji {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
  animation: lc-grow 3s ease-in-out infinite;
}
@keyframes lc-grow {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

.lc-phase-card__phase-name {
  font-family: var(--font-en), sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-navy-dark);
  margin: 0 0 4px;
}
.lc-phase-card__phase-name-ja {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--color-text-light);
}
.lc-phase-card__phase-desc {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.5;
}

/* ------ プログレスバー ------ */
.lc-progress-wrap {
  margin-bottom: 14px;
}
.lc-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.lc-progress-label {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.78rem;
  color: var(--color-text-light);
}
.lc-progress-pct {
  font-family: var(--font-en), sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-navy);
}
.lc-progress-track {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.lc-progress-fill {
  height: 100%;
  border-radius: 999px;
  width: 0; /* animated via JS */
  position: relative;
  overflow: hidden;
}
/* fill shimmer */
.lc-progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.45) 50%, transparent 100%);
  animation: lc-shimmer 2s infinite;
}
@keyframes lc-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
.lc-progress-fill--seed   { background: linear-gradient(90deg, var(--lc-seed-mid), #FBBF24); }
.lc-progress-fill--sprout { background: linear-gradient(90deg, var(--lc-sprout-mid), #4ADE80); }
.lc-progress-fill--tree   { background: linear-gradient(90deg, var(--lc-tree-mid), #22C55E); }

/* ------ タスク行 ------ */
.lc-tasks-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.lc-tasks-label {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.8rem;
  color: var(--color-text-light);
}
.lc-tasks-value {
  font-family: var(--font-en), sans-serif;
  font-size: 0.875rem;
  color: var(--color-navy);
}
.lc-tasks-value strong {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--lc-sprout-color);
}
.lc-tasks-sep {
  color: var(--color-text-light);
  margin: 0 2px;
}

/* ------ 日数バッジ ------ */
.lc-days-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ja), sans-serif;
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin-top: 10px;
}

/* ----------------------------------------------------------
   ドーナツ達成率カード
   ---------------------------------------------------------- */
.lc-achievement-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 160px;
}
.lc-achievement-card__label {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.78rem;
  color: var(--color-text-light);
  text-align: center;
  margin: 0;
}
.lc-donut-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lc-donut {
  transform: rotate(0deg);
}
.lc-donut__bg {
  stroke: #e2e8f0;
}
.lc-donut__fill {
  transition: stroke-dasharray 0s; /* overridden by JS */
  stroke-linecap: round;
}
.lc-donut__fill--seed   { stroke: var(--lc-seed-mid); }
.lc-donut__fill--sprout { stroke: var(--lc-sprout-mid); }
.lc-donut__fill--tree   { stroke: var(--lc-tree-mid); }

.lc-donut__center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.lc-donut__pct {
  font-family: var(--font-en), sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-navy-dark);
  line-height: 1;
}
.lc-donut__unit {
  font-family: var(--font-en), sans-serif;
  font-size: 0.7rem;
  color: var(--color-text-light);
  line-height: 1;
}

/* ----------------------------------------------------------
   次フェーズカード
   ---------------------------------------------------------- */
.lc-next-card {
  min-width: 200px;
}
.lc-next-card__label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ja), sans-serif;
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lc-next-card__phase-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-en), sans-serif;
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--color-navy-dark);
  margin: 0 0 14px;
}
.lc-next-card__phase-emoji { font-size: 1.1em; }
.lc-next-card__phase-ja {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--color-text-light);
}

/* 移行条件リスト */
.lc-next-conditions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lc-next-condition {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-family: var(--font-ja), sans-serif;
  font-size: 0.78rem;
  color: var(--color-text);
  line-height: 1.45;
}
.lc-next-condition__icon {
  flex-shrink: 0;
  font-size: 0.85em;
  line-height: 1.3;
}
.lc-next-condition--met {
  color: var(--lc-sprout-color);
  font-weight: 600;
}
.lc-next-condition__remain {
  color: var(--color-text-light);
  font-size: 0.72rem;
  font-weight: 400;
}

/* ----------------------------------------------------------
   最高フェーズ（TREE到達）カード
   ---------------------------------------------------------- */
.lc-max-card {
  min-width: 200px;
  text-align: center;
  background: var(--lc-tree-light);
  border: 1px solid var(--lc-tree-mid);
}
.lc-max-card__emoji {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 10px;
  animation: lc-grow 3s ease-in-out infinite;
}
.lc-max-card__title {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--lc-tree-dark);
  margin: 0 0 6px;
}
.lc-max-card__desc {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.75rem;
  color: var(--lc-tree-color);
  margin: 0;
  line-height: 1.5;
}

/* ----------------------------------------------------------
   レスポンシブ（ライフサイクル Section）
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .lc-status-grid {
    grid-template-columns: 1fr 1fr;
  }
  .lc-card--primary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .lc-phases-track {
    padding: 8px 0 24px;
  }
  .lc-phase__node {
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
  .lc-phases-connector {
    max-width: 60px;
    margin-top: 22px;
  }
  .lc-status-grid {
    grid-template-columns: 1fr;
  }
  .lc-achievement-card {
    flex-direction: row;
    gap: 20px;
    justify-content: flex-start;
  }
  .lc-section .mypage-section__header {
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* ============================================================
   COACHING HUB — シード・コーチング・センター Section B
   v=20260305-task1383
   ============================================================ */

/* ----------------------------------------------------------
   Section Header overrides
   ---------------------------------------------------------- */
.ch-section .mypage-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-gray);
  margin-bottom: 20px;
}
.ch-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.ch-section__icon-wrap {
  margin-right: 6px;
  font-size: 1.1em;
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
.ch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-ja), sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
}
.ch-btn--primary {
  background-color: var(--color-accent);
  color: #fff;
}
.ch-btn--primary:hover {
  background-color: #3a8a5e;
}
.ch-btn--ghost {
  background-color: transparent;
  color: var(--color-text-light);
  border: 1px solid var(--color-gray);
}
.ch-btn--ghost:hover {
  background-color: var(--color-light-gray);
}
.ch-btn--outline-sm {
  background-color: transparent;
  color: var(--color-text-light);
  border: 1px solid var(--color-gray);
  padding: 5px 12px;
  font-size: 0.78rem;
}
.ch-btn--outline-sm:hover {
  border-color: var(--color-text-light);
  color: var(--color-text);
}

/* ----------------------------------------------------------
   Alert
   ---------------------------------------------------------- */
.ch-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 16px;
}
.ch-alert--error {
  background-color: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

/* ----------------------------------------------------------
   New Session Form (collapsible)
   ---------------------------------------------------------- */
.ch-new-session-form {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
}
.ch-new-session-form.is-open {
  max-height: 200px;
  opacity: 1;
  pointer-events: auto;
}
.ch-new-session-form__inner {
  background-color: var(--color-light-gray);
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ch-form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ch-form-label {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
}
.ch-form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background-color: #fff;
  transition: border-color var(--transition-base);
}
.ch-form-input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(74, 159, 110, 0.12);
}
.ch-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ----------------------------------------------------------
   Main Layout
   ---------------------------------------------------------- */
.ch-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

/* ----------------------------------------------------------
   Session Sidebar
   ---------------------------------------------------------- */
.ch-sidebar {
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #fff;
}
.ch-sidebar__header {
  padding: 12px 16px;
  background-color: var(--color-light-gray);
  border-bottom: 1px solid var(--color-gray);
}
.ch-sidebar__count {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.78rem;
  color: var(--color-text-light);
  font-weight: 500;
}
.ch-sidebar__empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.82rem;
  line-height: 1.6;
}
.ch-sidebar__empty-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 10px;
}

/* Session list */
.ch-session-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 480px;
  overflow-y: auto;
}
.ch-session-item {
  border-bottom: 1px solid var(--color-gray);
}
.ch-session-item:last-child {
  border-bottom: none;
}
.ch-session-item__link {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  transition: background-color var(--transition-base);
}
.ch-session-item__link:hover {
  background-color: var(--color-light-gray);
}
.ch-session-item--active .ch-session-item__link {
  background-color: #EEF8F2;
  border-left: 3px solid var(--color-accent);
}
.ch-session-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.ch-session-item__title {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ch-session-item__meta {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.ch-session-item__date,
.ch-session-item__count {
  font-family: var(--font-en), sans-serif;
  font-size: 0.72rem;
  color: var(--color-text-light);
}
.ch-session-item__preview {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Status badges */
.ch-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-family: var(--font-ja), sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.ch-status-badge--in_progress {
  background-color: #DBEAFE;
  color: #1D4ED8;
}
.ch-status-badge--completed {
  background-color: #DCFCE7;
  color: #166534;
}
.ch-status-badge--follow_up {
  background-color: #FEF3C7;
  color: #92400E;
}

/* ----------------------------------------------------------
   Chat Area
   ---------------------------------------------------------- */
.ch-chat-area {
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-md);
  background-color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 480px;
  overflow: hidden;
}

/* Empty state */
.ch-chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
  text-align: center;
}
.ch-chat-empty__icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.ch-chat-empty__title {
  font-family: var(--font-ja), sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 8px;
}
.ch-chat-empty__desc {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.875rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin: 0 0 24px;
}

/* Chat header */
.ch-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-gray);
  background-color: var(--color-light-gray);
  flex-wrap: wrap;
}
.ch-chat-header__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ch-chat-header__title {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.925rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ch-chat-header__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.ch-chat-header__date {
  font-family: var(--font-en), sans-serif;
  font-size: 0.75rem;
  color: var(--color-text-light);
}
.ch-chat-header__actions {
  flex-shrink: 0;
}

/* Messages scroll area */
.ch-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 300px;
  max-height: 400px;
}
.ch-messages__empty {
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.85rem;
  margin: auto;
}

/* Message bubbles */
.ch-message {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 80%;
}
.ch-message--user {
  flex-direction: row-reverse;
  align-self: flex-end;
}
.ch-message--ai {
  align-self: flex-start;
}

.ch-message__avatar {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
}
.ch-message__avatar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
}
.ch-message__avatar-inner--ai {
  background-color: #EEF8F2;
  font-size: 1.1rem;
}
.ch-message__avatar-inner--user {
  background-color: var(--color-navy);
  color: #fff;
  font-family: var(--font-en), sans-serif;
}

.ch-message__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ch-message--user .ch-message__body {
  align-items: flex-end;
}
.ch-message--ai .ch-message__body {
  align-items: flex-start;
}

.ch-message__bubble {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-ja), sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  word-break: break-word;
}
.ch-message--user .ch-message__bubble {
  background-color: var(--color-navy);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ch-message--ai .ch-message__bubble {
  background-color: var(--color-light-gray);
  color: var(--color-text);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--color-gray);
}

.ch-message__time {
  font-family: var(--font-en), sans-serif;
  font-size: 0.68rem;
  color: var(--color-text-light);
}

/* ----------------------------------------------------------
   Input Area
   ---------------------------------------------------------- */
.ch-input-area {
  border-top: 1px solid var(--color-gray);
  padding: 14px 16px;
  background-color: #fff;
}
.ch-input-area--closed {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ch-input-closed-msg {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin: 0;
}

.ch-input-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ch-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.ch-input-text {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-md);
  font-family: var(--font-ja), sans-serif;
  font-size: 0.875rem;
  resize: none;
  line-height: 1.5;
  transition: border-color var(--transition-base);
}
.ch-input-text:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(74, 159, 110, 0.12);
}

.ch-input-tool-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-md);
  background-color: #fff;
  color: var(--color-text-light);
  cursor: not-allowed;
  transition: color var(--transition-base), border-color var(--transition-base);
  opacity: 0.5;
}

.ch-input-send-btn {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-md);
  background-color: var(--color-accent);
  color: #fff;
  cursor: pointer;
  transition: background-color var(--transition-base), transform 0.15s ease;
}
.ch-input-send-btn:hover {
  background-color: #3a8a5e;
  transform: scale(1.04);
}
.ch-input-send-btn:active {
  transform: scale(0.97);
}

.ch-input-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-ja), sans-serif;
  font-size: 0.72rem;
  color: var(--color-text-light);
  margin: 0;
}

/* モバイル戻るボタン（デスクトップでは非表示） */
.ch-mobile-back-btn {
  display: none;
}

/* ----------------------------------------------------------
   Typing Indicator
   ---------------------------------------------------------- */
.ch-typing-indicator {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 4px;
}
.ch-typing-indicator.is-visible {
  display: flex;
}
.ch-typing-dots {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px 16px 16px 4px;
  padding: 10px 16px;
}
.ch-typing-dot {
  display: block;
  width: 8px;
  height: 8px;
  background-color: var(--color-text-light);
  border-radius: 50%;
  animation: ch-typing-bounce 1.2s ease-in-out infinite;
}
.ch-typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}
.ch-typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes ch-typing-bounce {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .ch-layout {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 768px) {
  /* モバイル: 切り替え式UI（セッション一覧 ↔ チャット画面） */
  .ch-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* デフォルト: セッション一覧を表示、チャットエリアを非表示 */
  .ch-sidebar {
    max-height: none;
    overflow-y: auto;
    display: block;
  }
  .ch-chat-area {
    display: none;
  }

  /* チャット表示モード: セッション一覧を非表示、チャットエリアを表示 */
  .ch-layout.ch-mobile-chat-view .ch-sidebar {
    display: none;
  }
  .ch-layout.ch-mobile-chat-view .ch-chat-area {
    display: flex;
    min-height: calc(100dvh - 200px);
  }

  .ch-session-list {
    max-height: none;
  }
  .ch-messages {
    max-height: 55vh;
    min-height: 200px;
  }
  .ch-message {
    max-width: 90%;
  }
  .ch-section .mypage-section__header {
    flex-wrap: wrap;
    gap: 10px;
  }

  /* モバイル: チャットヘッダーに戻るボタンエリア */
  .ch-chat-header {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 8px;
  }

  /* モバイル: 戻るボタン（チャット→セッション一覧） */
  .ch-mobile-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--color-gray);
    border-radius: var(--radius-md);
    background-color: #fff;
    color: var(--color-text-light);
    font-family: var(--font-ja), sans-serif;
    font-size: 0.78rem;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .ch-mobile-back-btn:active {
    background-color: var(--color-light-gray);
  }

  /* 入力エリア: textarea と ツールボタン幅を375px向けに最適化 */
  .ch-input-area {
    padding: 10px 12px;
  }
  .ch-input-row {
    gap: 6px;
    align-items: flex-end;
  }
  .ch-input-text {
    font-size: 0.875rem;
    padding: 9px 11px;
    min-width: 0;
  }
  .ch-input-tool-btn {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }
  .ch-input-send-btn {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
  }

  /* モバイル: disabled状態のファイル・音声ボタンを非表示 */
  .ch-input-tool-btn[disabled] {
    display: none;
  }

  /* チャット空状態もモバイルでは非表示（セッション一覧モードが代わり） */
  .ch-layout:not(.ch-mobile-chat-view) .ch-chat-empty {
    display: none;
  }
}

/* セッションが選択済みの場合、モバイルでは最初からチャット表示 */
@media (max-width: 768px) {
  .ch-layout.ch-has-active-session .ch-sidebar {
    display: none;
  }
  .ch-layout.ch-has-active-session .ch-chat-area {
    display: flex;
    min-height: calc(100dvh - 200px);
  }
}

/* ============================================================
   OPERATIONS & SAFETY — セクションC
   v=20260305-section-c
   ============================================================ */

/* ----------------------------------------------------------
   Section Header
   ---------------------------------------------------------- */
.op-section .mypage-section__header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.op-section__icon-wrap {
  font-size: 1.25em;
  line-height: 1;
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */
.op-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-ja), sans-serif;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-base), color var(--transition-base), box-shadow var(--transition-base), transform 0.12s ease;
  text-decoration: none;
  white-space: nowrap;
}
.op-btn:active { transform: scale(0.97); }

.op-btn--primary {
  background-color: var(--color-accent);
  color: #fff;
  padding: 9px 18px;
  font-size: 0.875rem;
}
.op-btn--primary:hover { background-color: #3a8a5e; }

.op-btn--ghost {
  background-color: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-gray);
  padding: 8px 16px;
  font-size: 0.875rem;
}
.op-btn--ghost:hover { background-color: var(--color-light-gray); }

.op-btn--danger {
  background-color: var(--color-danger);
  color: #fff;
  padding: 9px 18px;
  font-size: 0.875rem;
}
.op-btn--danger:hover { background-color: #dc2626; }

.op-btn--warn {
  background-color: var(--color-warning);
  color: #fff;
  padding: 9px 18px;
  font-size: 0.875rem;
}
.op-btn--warn:hover { background-color: #d97706; }

.op-btn--sm  { padding: 7px 14px; font-size: 0.8rem; }
.op-btn--xs  { padding: 4px 10px; font-size: 0.75rem; }

/* アイコンボタン */
.op-icon-btn {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-gray);
  background-color: #fff;
  cursor: pointer;
  color: var(--color-text-light);
  transition: color var(--transition-base), background-color var(--transition-base), border-color var(--transition-base);
}
.op-icon-btn:hover               { color: var(--color-text); background-color: var(--color-light-gray); }
.op-icon-btn--delete:hover       { color: var(--color-danger); border-color: #fecaca; background-color: #fef2f2; }
.op-icon-btn--cancel:hover       { color: var(--color-danger); border-color: #fecaca; background-color: #fef2f2; }

/* ----------------------------------------------------------
   Badges
   ---------------------------------------------------------- */
.op-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-ja), sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}
.op-badge--status.op-badge--pending     { background: #f1f5f9; color: #64748b; }
.op-badge--status.op-badge--in-progress { background: #dbeafe; color: #1d4ed8; }
.op-badge--status.op-badge--completed   { background: #dcfce7; color: #15803d; }
.op-badge--status.op-badge--cancelled   { background: #f1f5f9; color: #9ca3af; }
.op-badge--status.op-badge--scheduled   { background: #e0e7ff; color: #4338ca; }
.op-badge--status.op-badge--published   { background: #dcfce7; color: #15803d; }
.op-badge--overdue                      { background: #fee2e2; color: #b91c1c; }

.op-badge--prio                         { border: 1px solid transparent; }
.op-badge--prio-low                     { background: #f8fafc; color: #94a3b8; border-color: #e2e8f0; }
.op-badge--prio-medium                  { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.op-badge--prio-high                    { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }

/* ----------------------------------------------------------
   Alert
   ---------------------------------------------------------- */
.op-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-ja), sans-serif;
  font-size: 0.85rem;
  margin-bottom: 16px;
}
.op-alert--error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* ----------------------------------------------------------
   Panel (shared container)
   ---------------------------------------------------------- */
.op-panel {
  background: #fff;
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.op-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-gray);
  background-color: #fafbfc;
  flex-wrap: wrap;
}
.op-panel__title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ja), sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-navy-dark);
  margin: 0;
}
.op-panel__sub {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.75rem;
  color: var(--color-text-light);
}

/* ----------------------------------------------------------
   Filter Tabs
   ---------------------------------------------------------- */
.op-filter-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.op-filter-tab {
  padding: 11px 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-family: var(--font-ja), sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-text-light);
  background-color: transparent;
  border: 1px solid transparent;
  text-decoration: none;
  transition: color var(--transition-base), background-color var(--transition-base), border-color var(--transition-base);
}
.op-filter-tab:hover {
  color: var(--color-text);
  background-color: var(--color-light-gray);
}
.op-filter-tab--active {
  color: var(--color-navy-dark);
  background-color: #e8f4f0;
  border-color: var(--color-accent);
  font-weight: 700;
}

/* ----------------------------------------------------------
   Empty State
   ---------------------------------------------------------- */
.op-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 20px;
  color: var(--color-text-light);
  text-align: center;
}
.op-empty p {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.85rem;
  margin: 0;
}
.op-empty svg { opacity: 0.35; }
.op-empty--sm { padding: 20px; }

/* ----------------------------------------------------------
   Task List
   ---------------------------------------------------------- */
.op-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.op-task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-gray);
  transition: background-color var(--transition-base);
}
.op-task-item:last-child { border-bottom: none; }
.op-task-item:hover { background-color: #fafbfc; }

.op-task-item__left { flex-shrink: 0; padding-top: 2px; }

.op-task-check {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-gray);
  border-radius: 6px;
  background-color: #fff;
  cursor: pointer;
  transition: border-color var(--transition-base), background-color var(--transition-base);
  flex-shrink: 0;
}
.op-task-check:hover { border-color: var(--color-accent); }
.op-task-check--done {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.op-task-item__body { flex: 1; min-width: 0; }
.op-task-item__top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.op-task-item__title {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-navy-dark);
  line-height: 1.4;
  word-break: break-word;
}
.op-task-item__title--done {
  text-decoration: line-through;
  color: var(--color-text-light);
  font-weight: 400;
}
.op-task-item__badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.op-task-item__desc {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.8rem;
  color: var(--color-text-light);
  line-height: 1.5;
  margin: 0 0 6px;
  word-break: break-word;
}
.op-task-item__meta {
  display: flex;
  gap: 12px;
  align-items: center;
}
.op-task-item__due,
.op-task-item__created {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-en), sans-serif;
  font-size: 0.72rem;
  color: var(--color-text-light);
}
.op-task-item__due--over { color: #b91c1c; font-weight: 600; }

.op-task-item__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding-top: 2px;
}
.op-task-check-form { margin: 0; }

/* ----------------------------------------------------------
   Rollback History
   ---------------------------------------------------------- */
.op-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.op-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-gray);
  flex-wrap: wrap;
}
.op-history-item:last-child { border-bottom: none; }
.op-history-item__info {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.op-history-item__task {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-navy-dark);
}
.op-history-item__arrow {
  font-size: 0.9rem;
  color: var(--color-text-light);
}
.op-history-item__prev {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.78rem;
  color: var(--color-text-light);
}
.op-history-item__time {
  font-family: var(--font-en), sans-serif;
  font-size: 0.72rem;
  color: var(--color-text-light);
  white-space: nowrap;
}

/* ----------------------------------------------------------
   Schedule List
   ---------------------------------------------------------- */
.op-schedule-form-wrap {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 18px;
}
.op-schedule-form-wrap.is-open {
  max-height: 500px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--color-gray);
}

.op-schedule-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.op-schedule-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-gray);
  transition: background-color var(--transition-base);
}
.op-schedule-item:last-child { border-bottom: none; }
.op-schedule-item:hover { background-color: #fafbfc; }
.op-schedule-item--cancelled { opacity: 0.55; }

.op-schedule-item__datetime {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
  flex-shrink: 0;
}
.op-schedule-item__date {
  font-family: var(--font-en), sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-navy-dark);
  line-height: 1;
}
.op-schedule-item__time {
  font-family: var(--font-en), sans-serif;
  font-size: 0.7rem;
  color: var(--color-text-light);
  line-height: 1.3;
}
.op-schedule-item__body { flex: 1; min-width: 0; }
.op-schedule-item__title {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-navy-dark);
  display: block;
  margin-bottom: 2px;
}
.op-schedule-item__content {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.78rem;
  color: var(--color-text-light);
  margin: 0;
  line-height: 1.4;
}
.op-schedule-item__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ----------------------------------------------------------
   Form Elements
   ---------------------------------------------------------- */
.op-form { display: flex; flex-direction: column; gap: 14px; }
.op-form__row { display: flex; gap: 12px; flex-wrap: wrap; }
.op-form__row--2col > .op-form__field { flex: 1; min-width: 140px; }
.op-form__row--3col > .op-form__field { flex: 1; min-width: 110px; }
.op-form__field { display: flex; flex-direction: column; gap: 5px; }
.op-form__label {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
}
.op-form__required { color: var(--color-danger); }
.op-form__input,
.op-form__textarea,
.op-form__select {
  padding: 9px 12px;
  border: 1px solid var(--color-gray);
  border-radius: var(--radius-md);
  font-family: var(--font-ja), sans-serif;
  font-size: 0.875rem;
  color: var(--color-text);
  background-color: #fff;
  transition: border-color var(--transition-base);
  width: 100%;
  box-sizing: border-box;
}
.op-form__input:focus,
.op-form__textarea:focus,
.op-form__select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(74,159,110,0.12);
}
.op-form__textarea { resize: vertical; }
.op-form__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 4px;
}

/* ----------------------------------------------------------
   Modal
   ---------------------------------------------------------- */
.op-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.op-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}
.op-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.op-modal__box {
  position: relative;
  z-index: 1;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.22s ease;
}
.op-modal.is-open .op-modal__box {
  transform: translateY(0) scale(1);
}
.op-modal__box--sm { max-width: 420px; }

.op-modal__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--color-gray);
}
.op-modal__header--danger { background-color: #fef2f2; }
.op-modal__header--warn   { background-color: #fffbeb; }
.op-modal__danger-icon    { color: var(--color-danger); flex-shrink: 0; }
.op-modal__warn-icon      { color: var(--color-warning); flex-shrink: 0; }
.op-modal__title {
  flex: 1;
  font-family: var(--font-ja), sans-serif;
  font-size: 0.975rem;
  font-weight: 700;
  color: var(--color-navy-dark);
  margin: 0;
}
.op-modal__close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--color-text-light);
  transition: background-color var(--transition-base), color var(--transition-base);
  flex-shrink: 0;
}
.op-modal__close:hover { background-color: var(--color-light-gray); color: var(--color-text); }

.op-modal__form { padding: 18px 20px; }
.op-modal__body { padding: 18px 20px; }
.op-modal__msg {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.9rem;
  color: var(--color-text);
  margin: 0 0 8px;
  line-height: 1.5;
}
.op-modal__sub {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin: 0 0 16px;
}
.op-modal__warn {
  font-family: var(--font-ja), sans-serif;
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin: 0 0 16px;
}
.op-modal__footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 6px;
}
.op-modal__step2-warn {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 10px 14px;
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  font-family: var(--font-ja), sans-serif;
  font-size: 0.82rem;
  color: #92400e;
  margin-bottom: 16px;
  line-height: 1.5;
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .op-section .mypage-section__header {
    flex-wrap: wrap;
    gap: 10px;
  }
  .op-panel__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .op-filter-tabs { width: 100%; }
  .op-task-item { padding: 12px 14px; }
  .op-task-item__actions { flex-direction: column; gap: 4px; }
  .op-history-item { flex-direction: column; align-items: flex-start; }
  .op-schedule-item { flex-wrap: wrap; }
  .op-modal { padding: 12px; }
  .op-form__row--3col { flex-direction: column; }
}

/* ============================================================
   account.php / admin_accounts.php — 2カラムレイアウト対応
   mypage-section__body 内での info リスト色を白背景に合わせて上書き
   v=20260305-task1366
   ============================================================ */

/* mypage-section__body 内の info リストは白背景のため暗い文字色を使う */
.mypage-section__body .mypage-info-label {
  color: var(--color-text-light);
}

.mypage-section__body .mypage-info-value {
  color: var(--color-text);
}

/* account.php の 2カラムグリッド内セクションは高さを揃える */
.mypage-cards-grid .mypage-section {
  margin-bottom: 0;
}

/* account.php / admin_accounts.php フラッシュアラートが auth-main の外に出るため上書き */
.mypage-main .auth-alert {
  border-radius: var(--radius-md);
}

/* admin_accounts 検索フォームが mypage-section__body 内に入った場合の調整 */
.mypage-section__body .admin-search-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* -----------------------------------------------------------
   フォーム要素 (auth-label / auth-input) を白背景に対応させる
   ----------------------------------------------------------- */

/* ラベル: 白背景では white は不可視なので暗い色に上書き */
.mypage-section__body .auth-label {
  color: var(--color-text);
}

/* テキスト入力・セレクト: 白背景向けにボーダーと文字色を調整 */
.mypage-section__body .auth-input {
  background-color: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.18);
  color: var(--color-text);
}

.mypage-section__body .auth-input::placeholder {
  color: var(--color-text-light);
}

.mypage-section__body .auth-input:focus {
  background-color: var(--color-white);
  border-color: var(--color-accent);
}

/* ヒントテキスト */
.mypage-section__body .auth-hint {
  color: var(--color-text-light);
}

/* auth-btn は白背景でも見えるが念のため確認（元デザインはaccent色で問題なし） */

@media (max-width: 520px) {
  .mypage-section__body .mypage-info-row {
    flex-direction: column;
    gap: 4px;
  }

  .mypage-section__body .mypage-info-label {
    min-width: unset;
  }
}

/* ============================================================
   Section D: リソースダッシュボード — .rd-* / .rs-*
   v=20260305-task1373
   ============================================================ */

/* --- セクションヘッダー (フィルター横並び) --- */
.rd-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* --- 期間フィルターボタン群 --- */
.rd-period-filter {
  display: flex;
  gap: 4px;
}

.rd-period-btn {
  appearance: none;
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-sm);
  color: var(--color-text-light);
  cursor: pointer;
  font-family: var(--font-ja);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 14px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.rd-period-btn:hover {
  background: rgba(74, 159, 110, 0.08);
  border-color: rgba(74, 159, 110, 0.4);
  color: var(--color-accent);
}

.rd-period-btn--active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.rd-period-btn--active:hover {
  background: #3d8a5f;
  border-color: #3d8a5f;
  color: #fff;
}

/* --- セクションボディ --- */
.rd-body {
  padding: 24px;
}

/* --- ローディング状態 --- */
.rd-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 48px 24px;
}
.rd-loading[hidden] {
  display: none !important;
}

.rd-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(74, 159, 110, 0.2);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: rd-spin 0.7s linear infinite;
}

@keyframes rd-spin {
  to { transform: rotate(360deg); }
}

.rd-loading__text {
  font-family: var(--font-ja);
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin: 0;
}

/* --- エラー状態 --- */
.rd-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 40px 24px;
}
.rd-error[hidden] {
  display: none !important;
}

.rd-error__text {
  font-family: var(--font-ja);
  font-size: 0.875rem;
  color: #c0392b;
  margin: 0;
  text-align: center;
}

.rd-retry-btn {
  appearance: none;
  background: var(--color-accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  cursor: pointer;
  font-family: var(--font-ja);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 20px;
  transition: background 0.15s;
}

.rd-retry-btn:hover { background: #3d8a5f; }

/* --- KPI カードグリッド --- */
.rd-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.rd-kpi-card {
  background: var(--color-light-gray);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  min-width: 0; /* グリッドの縮小を許可 */
}

.rd-kpi-card__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rd-kpi-card__icon--blue   { background: rgba(26, 53, 87, 0.1);   color: var(--color-navy); }
.rd-kpi-card__icon--green  { background: rgba(74, 159, 110, 0.12); color: var(--color-accent); }
.rd-kpi-card__icon--orange { background: rgba(229, 115, 62, 0.12); color: #e5733e; }
.rd-kpi-card__icon--red    { background: rgba(192, 57, 43, 0.1);   color: #c0392b; }

.rd-kpi-card__body {
  min-width: 0;
}

.rd-kpi-card__label {
  font-family: var(--font-ja);
  font-size: 0.75rem;
  color: var(--color-text-light);
  margin: 0 0 4px;
  white-space: normal;
  overflow: hidden;
  line-height: 1.35;
}

.rd-kpi-card__value {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.1;
  margin: 0;
}

/* --- チャートグリッド --- */
.rd-charts-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
}

/* --- チャートパネル --- */
.rd-chart-panel {
  background: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.rd-chart-panel__header {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: rgba(26, 53, 87, 0.02);
}

.rd-chart-panel__title {
  font-family: var(--font-ja);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-navy);
  margin: 0;
}

.rd-chart-panel__body {
  padding: 16px 18px;
}

/* --- ドーナツチャートラップ --- */
.rs-doughnut-wrap {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 14px;
}

.rs-doughnut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.rs-doughnut-center__num {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.1;
  margin: 0;
}

.rs-doughnut-center__label {
  font-family: var(--font-ja);
  font-size: 0.7rem;
  color: var(--color-text-light);
  margin: 2px 0 0;
}

/* --- チケット凡例 --- */
.rs-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 4px;
}

.rs-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rs-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.rs-legend-label {
  font-family: var(--font-ja);
  font-size: 0.8rem;
  color: var(--color-text-light);
  flex: 1;
}

.rs-legend-val {
  font-family: var(--font-en);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ----------------------------------------------------------
   Responsive: Section D
   ---------------------------------------------------------- */
@media (max-width: 1024px) {
  .rd-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rd-charts-grid {
    grid-template-columns: 1fr;
  }
  .rd-chart-panel--doughnut .rd-chart-panel__body {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .rs-doughnut-wrap { margin-bottom: 0; }
  .rs-legend { flex-direction: row; flex-wrap: wrap; gap: 12px 20px; }
}

@media (max-width: 600px) {
  .rd-section__header { flex-direction: column; align-items: flex-start; }
  .rd-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .rd-kpi-card { padding: 12px 14px; gap: 10px; min-width: 0; }
  .rd-kpi-card__icon { width: 38px; height: 38px; flex-shrink: 0; }
  .rd-kpi-card__body { min-width: 0; overflow: hidden; }
  .rd-kpi-card__value { font-size: 1.25rem; }
  .rd-kpi-card__label { font-size: 0.7rem; line-height: 1.3; }
  .rd-body { padding: 16px; }
  .rd-chart-panel__body { padding: 12px 14px; }
}

/* ============================================================
   Section D — サポートインジケーター (.sp-*)
   ============================================================ */

.sp-indicator {
  margin-top: 28px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--color-gray);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* ヘッダー行 */
.sp-indicator__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.sp-indicator__title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sp-indicator__icon {
  color: var(--color-navy);
  flex-shrink: 0;
}

.sp-indicator__title {
  font-family: var(--font-ja);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0;
}

/* レベルバッジ */
.sp-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-family: var(--font-ja);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sp-level-badge--none {
  background: #f0f4f8;
  color: #718096;
}

.sp-level-badge--low {
  background: #dcfce7;
  color: #166534;
}

.sp-level-badge--medium {
  background: #fef3c7;
  color: #92400e;
}

.sp-level-badge--high {
  background: #fee2e2;
  color: #991b1b;
}

/* カウンター行 */
.sp-indicator__counters {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 20px;
  background: var(--color-light-gray);
  border-radius: 10px;
  overflow: hidden;
}

.sp-counter {
  flex: 1;
  min-width: 100px;
  padding: 14px 16px;
  text-align: center;
}

.sp-counter__divider {
  width: 1px;
  height: 40px;
  background: var(--color-gray);
  flex-shrink: 0;
}

.sp-counter__num {
  font-family: var(--font-en);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-navy);
  margin: 0 0 2px;
  line-height: 1;
}

.sp-counter__num--sm {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
}

.sp-counter__label {
  font-family: var(--font-ja);
  font-size: 0.72rem;
  color: var(--color-text-light);
  margin: 0;
}

.sp-counter--open .sp-counter__num {
  color: #c05621;
}

/* サポートリンク */
.sp-links__heading {
  font-family: var(--font-ja);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
}

.sp-links__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sp-links__item {
  flex: 0 0 auto;
}

.sp-links__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid var(--color-gray);
  border-radius: 7px;
  font-family: var(--font-ja);
  font-size: 0.82rem;
  color: var(--color-navy);
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.sp-links__link:hover,
.sp-links__link:focus {
  background: #eef2f8;
  border-color: var(--color-navy-light);
  box-shadow: 0 1px 4px rgba(26,53,87,0.12);
  outline: none;
}

.sp-links__link svg {
  flex-shrink: 0;
  color: var(--color-navy-light);
}

/* レスポンシブ */
@media (max-width: 600px) {
  .sp-indicator { padding: 14px 16px; }
  .sp-indicator__counters { flex-direction: column; }
  .sp-counter__divider { width: 100%; height: 1px; }
  .sp-counter { padding: 10px 12px; }
  .sp-links__list { flex-direction: column; }
  .sp-links__link { width: 100%; }
}

/* ============================================================
   フローティングアクションボタン (.fab-*)
   ============================================================ */

.fab-container {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

/* FABメインボタン */
.fab-button {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-navy);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(26,53,87,0.38), 0 2px 6px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.fab-button:hover {
  background: var(--color-navy-light);
  box-shadow: 0 6px 24px rgba(26,53,87,0.45), 0 3px 8px rgba(0,0,0,0.2);
}

.fab-button:focus {
  outline: 3px solid rgba(26,53,87,0.4);
  outline-offset: 3px;
}

.fab-button:active {
  transform: scale(0.94);
}

/* アイコン切り替え */
.fab-button__icon {
  position: absolute;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
}

.fab-button__icon--open {
  opacity: 1;
  transform: rotate(0deg);
}

.fab-button__icon--close {
  opacity: 0;
  transform: rotate(-90deg);
}

.fab-container--open .fab-button {
  background: #b91c1c;
  box-shadow: 0 4px 16px rgba(185,28,28,0.38);
}

.fab-container--open .fab-button:hover {
  background: #991b1b;
}

.fab-container--open .fab-button__icon--open {
  opacity: 0;
  transform: rotate(90deg);
}

.fab-container--open .fab-button__icon--close {
  opacity: 1;
  transform: rotate(0deg);
}

/* FABメニュー */
.fab-menu {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fab-container--open .fab-menu {
  pointer-events: auto;
  transform: translateY(0);
  opacity: 1;
}

.fab-menu__item {
  display: flex;
  justify-content: flex-end;
}

/* アクションボタン */
.fab-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px 9px 14px;
  background: #fff;
  border: 1px solid var(--color-gray);
  border-radius: 9999px;
  font-family: var(--font-ja);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: background 0.18s, border-color 0.18s, box-shadow 0.18s, transform 0.18s;
  white-space: nowrap;
}

.fab-action:hover,
.fab-action:focus {
  background: #eef2f8;
  border-color: var(--color-navy-light);
  box-shadow: 0 4px 12px rgba(26,53,87,0.16);
  transform: translateX(-4px);
  outline: none;
}

.fab-action__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.fab-action--coaching .fab-action__icon {
  background: #dcfce7;
  color: #166534;
}

.fab-action--task .fab-action__icon {
  background: #dbeafe;
  color: #1e40af;
}

.fab-action--support .fab-action__icon {
  background: #fef3c7;
  color: #92400e;
}

/* 背景オーバーレイ */
.fab-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: transparent;
  pointer-events: none;
  transition: background 0.22s;
}

.fab-overlay.is-visible {
  pointer-events: auto;
  background: rgba(13,31,53,0.15);
}

/* モバイル調整 */
@media (max-width: 600px) {
  .fab-container {
    bottom: 20px;
    right: 16px;
  }

  .fab-button {
    width: 52px;
    height: 52px;
  }

  .fab-action {
    font-size: 0.8rem;
    padding: 8px 14px 8px 12px;
  }

  .fab-action__icon {
    width: 28px;
    height: 28px;
  }
}

/* ============================================================
   account.php UI/UX改善 — task1379
   ============================================================ */

/* フラッシュメッセージ下マージン（インラインstyle→CSSクラス化） */
.auth-alert--flash-success {
  margin-bottom: 24px;
}

/* パスワード表示/非表示トグル */
.auth-pw-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-pw-wrapper .auth-input {
  padding-right: 44px; /* アイコン分の余白 */
}

.auth-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  transition: color 0.15s;
  line-height: 1;
}

.auth-pw-toggle:hover {
  color: var(--color-accent);
}

.auth-pw-toggle svg {
  display: block;
  pointer-events: none;
}

/* 白背景セクション内のトグルアイコン色 */
.mypage-section__body .auth-pw-toggle {
  color: rgba(0, 0, 0, 0.35);
}

.mypage-section__body .auth-pw-toggle:hover {
  color: var(--color-accent);
}

/* 登録日を プロフィール編集フォーム内に統合した際のスタイル */
.auth-registered-date {
  font-family: var(--font-ja);
  font-size: 0.8125rem;
  color: var(--color-text-light);
  margin-top: -4px;
  margin-bottom: 8px;
}

/* ============================================================
   mypage.php — Section C フィルタータブのタップ領域拡大
   WCAG 2.5.5 準拠: min-height 44px 確保
   v=20260305-task1384
   ============================================================ */

/* ============================================================
   PRICING SECTION — #1397 料金プランセクション
   v=20260305-task1397
   ============================================================ */

/* Section base */
.section--pricing {
  background-color: var(--color-light-gray);
}

.pricing-overview {
  margin-top: 56px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(74, 159, 110, 0.12), rgba(13, 47, 84, 0.08));
  border: 1px solid rgba(13, 47, 84, 0.08);
}

.pricing-overview__lead {
  margin: 0;
  font-size: 0.9875rem;
  line-height: 1.8;
  color: var(--color-text);
}

.pricing-overview__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.pricing-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(74, 159, 110, 0.18);
  font-family: var(--font-en);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-navy-dark);
}

.pricing-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.pricing-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  border: 1px solid rgba(13, 47, 84, 0.08);
  box-shadow: var(--shadow-sm);
}

.pricing-panel--accent {
  background: linear-gradient(180deg, rgba(74, 159, 110, 0.08), rgba(255, 255, 255, 0.98));
  border-color: rgba(74, 159, 110, 0.22);
}

.pricing-panel__head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pricing-panel__eyebrow {
  display: inline-flex;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(74, 159, 110, 0.12);
  color: var(--color-accent);
  font-family: var(--font-en);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-panel__title {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.25;
  color: var(--color-navy-dark);
}

.pricing-panel__description,
.pricing-panel__subnote {
  margin: 0;
  color: var(--color-text-light);
  line-height: 1.7;
}

.pricing-panel__subnote {
  font-weight: 600;
  color: var(--color-accent);
}

.pricing-panel__table-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.pricing-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
}

.pricing-table thead th {
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(13, 47, 84, 0.12);
  text-align: left;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-light);
}

.pricing-table tbody td {
  padding: 18px 0;
  border-bottom: 1px solid rgba(13, 47, 84, 0.08);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-text);
  vertical-align: top;
}

.pricing-table tbody td:first-child {
  font-family: var(--font-en);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-navy-dark);
}

.pricing-table tbody tr:last-child td {
  border-bottom: 0;
  padding-bottom: 0;
}

.pricing-table tbody td:not(:first-child) {
  padding-left: 18px;
}

.pricing-labs {
  margin-top: 32px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--color-white);
  border: 1px solid rgba(13, 47, 84, 0.08);
  box-shadow: var(--shadow-sm);
}

.pricing-labs__intro {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.pricing-lab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.pricing-lab-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 249, 251, 0.96), rgba(255, 255, 255, 1));
  border: 1px solid rgba(13, 47, 84, 0.08);
}

.pricing-lab-card--featured {
  background: linear-gradient(180deg, rgba(13, 47, 84, 0.98), rgba(32, 76, 124, 0.96));
  border-color: rgba(13, 47, 84, 0.98);
  box-shadow: var(--shadow-md);
}

.pricing-lab-card__header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pricing-lab-card__label {
  font-family: var(--font-en);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-navy-dark);
}

.pricing-lab-card__slot {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-light);
}

.pricing-lab-card__list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.pricing-lab-card__list div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(13, 47, 84, 0.08);
}

.pricing-lab-card__list dt {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-text-light);
}

.pricing-lab-card__list dd {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
}

.pricing-lab-card--featured .pricing-lab-card__label,
.pricing-lab-card--featured .pricing-lab-card__slot,
.pricing-lab-card--featured .pricing-lab-card__list dt,
.pricing-lab-card--featured .pricing-lab-card__list dd {
  color: var(--color-white);
}

.pricing-lab-card--featured .pricing-lab-card__list div {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.pricing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  background: rgba(13, 47, 84, 0.04);
}

.pricing-footer__text {
  margin: 0;
  max-width: 760px;
  line-height: 1.8;
  color: var(--color-text);
}

.pricing-footer__cta {
  flex-shrink: 0;
  min-width: 220px;
  text-align: center;
}

/* Full-width button modifier */
.btn--block {
  display: block;
  width: 100%;
  text-align: center;
}

/* Outline button style for pricing */
.btn--outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-ja), var(--font-en), sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  background: transparent;
  cursor: pointer;
  transition: background var(--transition-base), color var(--transition-base);
}

.btn--outline:hover {
  background: var(--color-accent);
  color: var(--color-white);
}

/* Primary button: ensure block compatibility */
.pricing-card__cta .btn--primary {
  display: block;
  width: 100%;
  text-align: center;
  padding: 14px 28px;
}

/* ---- Responsive ---- */
@media (max-width: 1080px) {
  .pricing-panels,
  .pricing-lab-grid {
    grid-template-columns: 1fr;
  }

  .pricing-footer {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 900px) {
  .pricing-panels {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .pricing-overview,
  .pricing-panel,
  .pricing-labs,
  .pricing-footer {
    padding: 24px;
  }

  .pricing-panel__title {
    font-size: 1.4rem;
  }

  .pricing-table {
    min-width: 520px;
  }

  .pricing-table thead th,
  .pricing-table tbody td {
    font-size: 0.875rem;
  }

  .pricing-table tbody td:first-child {
    font-size: 1rem;
  }

  .pricing-lab-card {
    padding: 20px;
    border-radius: 20px;
  }
}

/* ============================================================
   チャージ機能 (.cg-*)  Task #1675
============================================================ */

/* ---------- サイドバーチャージボタン ---------- */
.mypage-sidebar__charge {
  padding: 0 16px 8px;
}

.mypage-sidebar__charge-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}

.mypage-sidebar__charge-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.mypage-sidebar__charge-btn:active {
  transform: translateY(0);
}

/* ---------- オーバーレイ ---------- */
.cg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.cg-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---------- モーダル本体 ---------- */
.cg-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.cg-modal.is-open {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
}

.cg-modal__inner {
  position: relative;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 32px 72px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cg-modal__close {
  position: sticky;
  top: 0;
  float: right;
  margin: 14px 14px 0 0;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(241, 245, 249, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  transition: background 0.15s, color 0.15s;
  z-index: 2;
}

.cg-modal__close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* ---------- スクロール領域（head + welcome + body をまとめてスクロール） ---------- */
.cg-modal__scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* ---------- モーダルヘッド ---------- */
.cg-modal__head {
  padding: 28px 32px 18px;
}

.cg-modal__title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 6px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.cg-modal__lead {
  font-size: 0.875rem;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
}

/* ---------- モーダルボディ ---------- */
.cg-modal__body {
  padding: 24px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---------- プラングループ ---------- */
.cg-plan-group {
  border: none;
  padding: 0;
  margin: 0;
}

.cg-plan-group__legend {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.cg-plan-section {
  margin-bottom: 18px;
}

.cg-plan-section__title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 10px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.cg-plan-section__sub {
  font-size: 0.8125rem;
  font-weight: 400;
  color: #64748b;
}

/* ---------- プランカードグリッド ---------- */
.cg-plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.cg-plan-grid--lab {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* ---------- プランカード ---------- */
.cg-plan-card {
  position: relative;
  cursor: pointer;
  border-radius: 10px;
  border: 2px solid #e2e8f0;
  background: #f8fafc;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  display: block;
}

.cg-plan-card:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.cg-plan-card__radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cg-plan-card__radio:checked + .cg-plan-card__body {
  background: #eff6ff;
}

.cg-plan-card:has(.cg-plan-card__radio:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* AIおすすめバッジ */
.cg-plan-card--recommended {
  border-color: #4a9f6e !important;
  background: #f0fdf4 !important;
  box-shadow: 0 0 0 3px rgba(74, 159, 110, 0.18), 0 4px 12px rgba(74, 159, 110, 0.10) !important;
  position: relative;
}
.cg-plan-card__recommend {
  display: inline-block;
  background: linear-gradient(135deg, #4a9f6e, #38a169);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  line-height: 1.4;
  margin-bottom: 2px;
}

.cg-plan-card__body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-radius: 8px;
}

.cg-plan-card__price {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.cg-plan-card__price--inquiry {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 600;
}

.cg-plan-card__unit {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
}

.cg-plan-card__desc {
  font-size: 0.75rem;
  color: #64748b;
}

.cg-plan-card__label-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.cg-plan-card__label-badge--featured {
  background: #fef3c7;
  color: #92400e;
}

.cg-plan-card--featured {
  border-color: #fbbf24;
}

.cg-plan-card--featured:hover {
  border-color: var(--color-warning);
  background: #fffbeb;
}

.cg-plan-card--inquiry {
  background: #f8fafc;
}

/* ---------- 支払い方法 ---------- */
.cg-payment-group {
  border: none;
  padding: 0;
  margin: 0;
  transition: opacity 0.2s;
}

.cg-payment-group--hidden {
  display: none;
}

.cg-payment-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.cg-payment-option {
  cursor: pointer;
  display: block;
}

.cg-payment-option__radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cg-payment-option__body {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 0.875rem;
  font-weight: 600;
  color: #475569;
  transition: border-color 0.15s, background 0.15s;
}

.cg-payment-option__body:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.cg-payment-option:has(.cg-payment-option__radio:checked) .cg-payment-option__body {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1e293b;
}

/* ---------- 問い合わせ案内 ---------- */
.cg-inquiry-notice {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #fde68a;
}

.cg-inquiry-notice.is-visible {
  display: flex;
}

/* ---------- モーダルフッター ---------- */
.cg-modal__footer {
  padding: 16px 32px 24px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cg-modal__summary {
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  flex: 1;
  min-width: 0;
}

.cg-modal__actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* ---------- ボタン ---------- */
.cg-btn {
  padding: 10px 22px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s, transform 0.15s, background 0.15s;
}

.cg-btn--cancel {
  background: #f1f5f9;
  color: #475569;
}

.cg-btn--cancel:hover {
  background: #e2e8f0;
}

.cg-btn--primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
}

.cg-btn--primary:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.cg-btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ---------- Square カードフォーム（Task #1676） ---------- */
.cg-card-form {
  display: none;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.cg-card-form.is-visible {
  display: block;
}

.cg-card-form__label {
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 10px;
}

#cg-card-container {
  min-height: 56px;
}

.cg-card-form__error {
  min-height: 20px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-danger);
  line-height: 1.4;
}

/* 決済ボタン ローディング */
.cg-btn--pay {
  position: relative;
}

.cg-btn--pay.is-loading .cg-btn__text {
  opacity: 0.6;
}

.cg-btn__loading {
  display: none;
}

.cg-btn--pay.is-loading .cg-btn__loading {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cg-spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes cg-spin {
  to { transform: rotate(360deg); }
}

/* 決済完了メッセージ */
.cg-payment-result {
  display: none;
  margin-top: 20px;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.cg-payment-result[aria-hidden="false"] {
  display: block;
}

.cg-payment-result.is-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.cg-payment-result__icon {
  font-size: 32px;
  margin-bottom: 8px;
  color: #16a34a;
}

.cg-payment-result__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

.cg-payment-result__body {
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- 請求書払いフォーム（Task #1681） ---------- */
.cg-invoice-form {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.cg-invoice-form.is-visible {
  display: block;
}

.cg-invoice-form__title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 16px;
}

.cg-invoice-form__fields {
  display: grid;
  gap: 12px;
}

.cg-invoice-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cg-invoice-field__label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
}

.cg-invoice-field__label--required::after {
  content: ' *';
  color: var(--color-danger);
}

.cg-invoice-field__input {
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  color: #111827;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}

.cg-invoice-field__input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.1);
}

.cg-invoice-form__error {
  min-height: 20px;
  margin-top: 10px;
  color: var(--color-danger);
  font-size: 13px;
}

.cg-invoice-form__note {
  margin-top: 12px;
  font-size: 12px;
  color: #9ca3af;
  line-height: 1.5;
}

/* ---------- Lab Plan 問い合わせパネル（Task #1682） ---------- */
.cg-lab-inquiry {
  display: none;
  margin-top: 20px;
  padding: 20px;
  background: #f0f4ff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
}

.cg-lab-inquiry.is-visible {
  display: block;
}

.cg-lab-inquiry__head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.cg-lab-inquiry__icon {
  flex-shrink: 0;
  color: #4f46e5;
  margin-top: 2px;
}

.cg-lab-inquiry__title {
  font-size: 13px;
  font-weight: 700;
  color: #1e1b4b;
  margin-bottom: 4px;
}

.cg-lab-inquiry__lead {
  font-size: 12px;
  color: #4338ca;
  line-height: 1.6;
}

.cg-lab-inquiry__contact {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #4338ca;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: #e0e7ff;
  border-radius: 6px;
}

.cg-lab-inquiry__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cg-lab-inquiry__label {
  font-size: 12px;
  font-weight: 500;
  color: #4338ca;
}

.cg-lab-inquiry__textarea {
  padding: 9px 12px;
  border: 1px solid #a5b4fc;
  border-radius: 6px;
  font-size: 13px;
  color: #1e1b4b;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.cg-lab-inquiry__textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.cg-lab-inquiry__error {
  min-height: 18px;
  margin-top: 8px;
  color: var(--color-danger);
  font-size: 12px;
}

/* ---------- レスポンシブ ---------- */
@media (max-width: 640px) {
  .cg-modal__inner {
    max-height: 95vh;
    border-radius: 12px;
  }

  .cg-modal__head,
  .cg-modal__body,
  .cg-modal__footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .cg-plan-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cg-plan-grid--lab {
    grid-template-columns: 1fr;
  }

  .cg-modal__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .cg-modal__actions {
    justify-content: flex-end;
  }
}

/* ============================================================
   INVOICE MANAGEMENT ADMIN — .inv-* (Task #1683)
   ============================================================ */

.inv-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 720px;
}

.inv-th {
  background-color: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid rgba(255,255,255,0.06);
  white-space: nowrap;
}

.inv-th--id     { width: 60px; }
.inv-th--amount { width: 100px; }
.inv-th--status { width: 120px; }
.inv-th--date   { width: 90px; }
.inv-th--action { width: 110px; }

.inv-td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  vertical-align: middle;
  line-height: 1.45;
}

.inv-td--id     { color: rgba(255,255,255,0.40); font-size: 12px; }
.inv-td--amount { font-weight: 600; color: var(--color-info, #3b82f6); }
.inv-td--email  { font-size: 12px; color: rgba(255,255,255,0.45); word-break: break-all; }
.inv-td--date   { font-size: 12px; color: rgba(255,255,255,0.45); white-space: nowrap; }
.inv-td--action { white-space: nowrap; }

.inv-tr--pending {
  background-color: rgba(251,191,36,0.08);
}

.inv-tr--pending:hover {
  background-color: rgba(251,191,36,0.13);
}

.inv-tr:not(.inv-tr--pending):hover {
  background-color: rgba(255,255,255,0.03);
}

/* ステータスバッジ */
.inv-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.inv-badge--pending {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.inv-badge--completed {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.inv-badge--failed {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.inv-badge--refunded {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

/* 入金確認ボタン */
.inv-confirm-btn {
  display: inline-block;
  padding: 6px 14px;
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}

.inv-confirm-btn:hover:not(:disabled) {
  background-color: #3a8a5e;
}

.inv-confirm-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.inv-done-mark {
  color: #9ca3af;
  font-size: 13px;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .inv-table {
    font-size: 12px;
  }

  .inv-th,
  .inv-td {
    padding: 8px 8px;
  }
}

/* ============================================================
   Section E: 決済履歴 (.ph-*)
   ============================================================ */

/* セクションヘッダーアイコン */
.ph-section__header {
  border-left: 4px solid #6366f1;
}

.ph-section__icon-wrap {
  font-size: 1.1em;
  margin-right: 6px;
}

/* クレジット残高カード */
.ph-balance-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.ph-balance-card__label {
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.85;
  flex-basis: 100%;
  margin-bottom: -12px;
}

.ph-balance-card__amount {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  flex: 1;
}

.ph-balance-card__currency {
  font-size: 1.1rem;
  font-weight: 500;
  margin-right: 2px;
  opacity: 0.85;
}

.ph-balance-card__charge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.ph-balance-card__charge-btn:hover {
  background-color: rgba(255, 255, 255, 0.32);
}

/* エラー表示 */
.ph-error {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* テーブルラッパー（横スクロール対応） */
.ph-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

/* テーブル本体 */
.ph-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  min-width: 600px;
}

.ph-table__head {
  background-color: #f9fafb;
}

.ph-th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
}

.ph-th--amount {
  text-align: right;
}

.ph-tr:not(:last-child) {
  border-bottom: 1px solid #f3f4f6;
}

.ph-tr:hover {
  background-color: #fafafa;
}

.ph-td {
  padding: 11px 14px;
  color: #374151;
  vertical-align: middle;
}

.ph-td--date {
  color: #6b7280;
  font-size: 0.8rem;
  white-space: nowrap;
}

.ph-td--amount {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ステータスバッジ */
.ph-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.ph-badge--completed {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.ph-badge--pending {
  background-color: #fef9c3;
  color: #a16207;
  border: 1px solid #fde68a;
}

.ph-badge--pending_invoice {
  background-color: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.ph-badge--failed {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.ph-badge--refunded {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

/* 空状態 */
.ph-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: #9ca3af;
  text-align: center;
}

.ph-empty__icon {
  margin-bottom: 14px;
  opacity: 0.5;
}

.ph-empty__text {
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0;
}

/* レスポンシブ */
@media (max-width: 768px) {
  .ph-balance-card {
    padding: 16px 18px;
    gap: 14px;
  }

  .ph-balance-card__amount {
    font-size: 1.6rem;
  }

  .ph-th,
  .ph-td {
    padding: 9px 10px;
    font-size: 0.8rem;
  }
}

/* ============================================================
   クレジット残高管理 (Task #1702)
   ============================================================ */

/* クレジット残高カラム */
.admin-table__credits {
  text-align: right;
  white-space: nowrap;
}

.admin-credit-balance {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #60a5fa;
  font-size: 0.9rem;
}

/* クレジット調整ボタン */
.admin-action-btn--credit {
  background-color: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.35);
  color: #93c5fd;
}

.admin-action-btn--credit:hover {
  background-color: rgba(96, 165, 250, 0.22);
}

/* ============================================================
   ADMIN ACCOUNTS — UI Improvements (2026-03-17)
   ============================================================ */

/* ----------------------------------------------------------
   ソート可能テーブルヘッダー
   ---------------------------------------------------------- */
.admin-th--sortable {
  cursor: pointer;
  user-select: none;
}

.admin-th--sortable:hover {
  background: rgba(255, 255, 255, 0.06);
}

.admin-th--sort-asc,
.admin-th--sort-desc {
  color: rgba(255, 255, 255, 0.75) !important;
}

.admin-sort-icon {
  display: inline-block;
  margin-left: 4px;
  font-size: 0.7em;
  color: rgba(255, 255, 255, 0.35);
  vertical-align: middle;
}

.admin-th--sort-asc .admin-sort-icon,
.admin-th--sort-desc .admin-sort-icon {
  color: var(--color-accent);
}

/* ----------------------------------------------------------
   タイプバッジ（法人 / 個人）— 未定義の場合に備えて追加
   ---------------------------------------------------------- */
.admin-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.admin-type-badge--corporate {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.30);
}

.admin-type-badge--individual {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

/* ----------------------------------------------------------
   空状態
   ---------------------------------------------------------- */
.admin-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px 24px;
  color: rgba(255, 255, 255, 0.35);
  font-family: var(--font-ja);
  font-size: 0.9375rem;
  text-align: center;
}

.admin-empty-state svg {
  opacity: 0.4;
}

/* ----------------------------------------------------------
   モーダル モバイル最適化（ダークネイビーデザインは維持）
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .admin-modal__container {
    max-height: 90vh;
    overflow-y: auto;
    margin: 8px;
    padding: 28px 20px;
  }
}

/* ----------------------------------------------------------
   モバイルカードレイアウト
   ---------------------------------------------------------- */
.admin-cards {
  display: none;
}

@media (max-width: 768px) {
  .admin-table-wrap {
    display: none;
  }

  .admin-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}

.admin-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: var(--font-ja);
}

.admin-card--self {
  background: rgba(74, 159, 110, 0.06);
  border-color: rgba(74, 159, 110, 0.20);
}

/* カードヘッド: アバター + 名前・メール */
.admin-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-navy-light) 0%, var(--color-navy-dark) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.80);
  flex-shrink: 0;
}

.admin-card__info {
  flex: 1;
  min-width: 0;
}

.admin-card__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card__email {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.50);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* カードバッジ行 */
.admin-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

/* カードメタ情報 */
.admin-card__meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-card__meta-item {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.50);
}

.admin-card__meta-item strong {
  color: rgba(255, 255, 255, 0.80);
  font-weight: 600;
}

/* カードアクション行 */
.admin-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================================
   ADMIN ACCOUNTS — UI Improvements v3 (2026-03-17)
   Fix: table/card text visibility, section heading, etc.
   ============================================================ */

/* ----------------------------------------------------------
   FIX 1+2+3: アドミンページの各セクションをダークテーマに
   .mypage-section（白背景）を管理者ページ用にダーク化
   ---------------------------------------------------------- */
#section-search.mypage-section,
#section-user-list.mypage-section,
#section-invoice-mgmt.mypage-section,
#section-add-user.mypage-section {
  background-color: var(--color-navy-dark);
  border-color: rgba(255, 255, 255, 0.08);
}

#section-search .mypage-section__header,
#section-user-list .mypage-section__header,
#section-invoice-mgmt .mypage-section__header,
#section-add-user .mypage-section__header {
  background-color: rgba(255, 255, 255, 0.04);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* セクションタイトル（ダーク背景上の白テキスト） */
#section-search .mypage-section__title,
#section-user-list .mypage-section__title,
#section-invoice-mgmt .mypage-section__title,
#section-add-user .mypage-section__title {
  color: rgba(255, 255, 255, 0.90);
}

/* セクションボディ */
#section-search .mypage-section__body,
#section-user-list .mypage-section__body,
#section-invoice-mgmt .mypage-section__body,
#section-add-user .mypage-section__body {
  color: rgba(255, 255, 255, 0.85);
}

/* ----------------------------------------------------------
   FIX 1: テーブルテキスト可視化（admin-table tbody td）
   tbody td の color が rgba(white,0.35) になっていたため修正
   ---------------------------------------------------------- */
.admin-table tbody td {
  color: rgba(255, 255, 255, 0.85);
}

/* 名前カラム（太字・高コントラスト） */
.admin-table__name {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.90);
}

/* ----------------------------------------------------------
   FIX 2: 自分のrow（admin-table__row--self）のゴーストテキスト解消
   ダーク背景上でグリーンハイライトを正しく表示
   ---------------------------------------------------------- */
.admin-table tbody tr.admin-table__row--self {
  background-color: rgba(74, 159, 110, 0.14);
}

.admin-table tbody tr.admin-table__row--self td {
  color: rgba(255, 255, 255, 0.90);
}

/* ----------------------------------------------------------
   FIX 3: テーブルヘッダー可視化
   ダーク背景上でヘッダーテキストを可視化
   ---------------------------------------------------------- */
.admin-table thead th {
  color: rgba(255, 255, 255, 0.55);
  background-color: rgba(255, 255, 255, 0.03);
}

/* ----------------------------------------------------------
   FIX 4: モバイルカードテキスト可視化
   カードはダーク背景前提だが、セクション背景をダーク化したので正常表示されるはず
   ---------------------------------------------------------- */
.admin-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.admin-card--self {
  background: rgba(74, 159, 110, 0.12);
  border-color: rgba(74, 159, 110, 0.30);
}

/* ----------------------------------------------------------
   FIX 5: セクション見出しをアイコン付き左ボーダーアクセントに
   ---------------------------------------------------------- */
#section-user-list .mypage-section__title,
#section-invoice-mgmt .mypage-section__title,
#section-add-user .mypage-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border-left: 3px solid var(--color-accent, #4a9f6e);
  font-size: 1.0625rem;
}

/* ----------------------------------------------------------
   FIX 6: 空状態（empty state）のテキスト可視化
   ダーク背景上ではほぼ不可視だったため明度アップ
   ---------------------------------------------------------- */
.admin-empty-state {
  color: rgba(255, 255, 255, 0.50);
}

.admin-empty-state svg {
  opacity: 0.45;
}

/* ----------------------------------------------------------
   FIX 7: 検索セクション ユーザー数表示バッジ
   ---------------------------------------------------------- */
.admin-count-text {
  color: rgba(255, 255, 255, 0.55);
}

/* ----------------------------------------------------------
   FIX 8: アクションボタン整理（compact layout）
   ---------------------------------------------------------- */
.admin-table__actions {
  gap: 6px;
}

/* ----------------------------------------------------------
   検索フォーム ダーク背景対応
   ---------------------------------------------------------- */
#section-search .admin-search-input {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.90);
}

#section-search .admin-search-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

#section-search .admin-search-clear {
  color: rgba(255, 255, 255, 0.45);
}

#section-search .admin-search-clear:hover {
  color: rgba(255, 255, 255, 0.75);
}

/* ----------------------------------------------------------
   新規ユーザー追加フォーム ダーク背景対応
   ---------------------------------------------------------- */
#section-add-user label {
  color: rgba(255, 255, 255, 0.75);
}

#section-add-user .admin-form-input,
#section-add-user input[type="text"],
#section-add-user input[type="email"],
#section-add-user input[type="password"],
#section-add-user select {
  background-color: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.90);
}

#section-add-user .admin-form-input::placeholder,
#section-add-user input::placeholder {
  color: rgba(255, 255, 255, 0.30);
}

#section-add-user .admin-form-note,
#section-add-user .form-note,
#section-add-user small {
  color: rgba(255, 255, 255, 0.45);
}

/* ----------------------------------------------------------
   入金管理テーブル ダーク背景対応（既存 .inv-* ルールは維持）
   ---------------------------------------------------------- */
#section-invoice-mgmt .inv-table-wrap {
  background: transparent;
}

/* ----------------------------------------------------------
   モーダル内フォーム（既存ダークデザイン維持）
   ---------------------------------------------------------- */
.admin-modal__container {
  background-color: var(--color-navy-dark);
  color: rgba(255, 255, 255, 0.85);
}

.admin-modal__title {
  color: rgba(255, 255, 255, 0.92);
}

/* ----------------------------------------------------------
   mypage-content-header（ページタイトルエリア）アドミンページ用
   ---------------------------------------------------------- */
.admin-page .mypage-content-header h1,
.mypage-main .mypage-content-header {
  /* ページタイトルはライト背景上にあるのでそのまま維持 */
  color: var(--color-navy);
}

/* ==========================================================
   管理者ユーザー一覧：インライン編集セル（プラン・契約日）
   ========================================================== */

/* 編集可能セル共通 */
.admin-editable-cell {
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: background-color 0.15s;
}
.admin-editable-cell:hover {
  background-color: rgba(74, 159, 110, 0.12);
}
.admin-editable-cell::after {
  content: ' ✎';
  font-size: 10px;
  opacity: 0;
  color: var(--color-accent);
  transition: opacity 0.15s;
}
.admin-editable-cell:hover::after {
  opacity: 0.75;
}

/* プランセレクター オーバーレイ */
.admin-plan-selector {
  position: absolute;
  z-index: 9999;
  min-width: 220px;
  background-color: var(--color-navy-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.admin-plan-selector__group-label {
  padding: 6px 14px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  pointer-events: none;
}

.admin-plan-selector__option {
  padding: 8px 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition: background-color 0.12s, color 0.12s;
}
.admin-plan-selector__option:hover {
  background-color: rgba(74, 159, 110, 0.25);
  color: #fff;
}
.admin-plan-selector__option--active {
  background-color: rgba(74, 159, 110, 0.18);
  color: var(--color-accent);
  font-weight: 600;
}
.admin-plan-selector__option--active:hover {
  background-color: rgba(74, 159, 110, 0.30);
  color: var(--color-accent);
}
.admin-plan-selector__option--clear {
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}
.admin-plan-selector__option--clear:hover {
  color: rgba(255, 255, 255, 0.75);
}
.admin-plan-selector__divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 4px 0;
}

/* 契約日ピッカー オーバーレイ */
.admin-date-picker {
  position: absolute;
  z-index: 9999;
  min-width: 200px;
  background-color: var(--color-navy-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.admin-date-picker__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.admin-date-picker__input {
  display: block;
  width: 100%;
  padding: 7px 10px;
  font-size: 14px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.9);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.admin-date-picker__input:focus {
  border-color: var(--color-accent);
}
/* date input カラースキーム */
.admin-date-picker__input::-webkit-calendar-picker-indicator {
  filter: invert(0.8);
  cursor: pointer;
}

.admin-date-picker__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.admin-date-picker__btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.15s, opacity 0.15s;
}
.admin-date-picker__btn--save {
  background-color: var(--color-accent);
  color: #fff;
}
.admin-date-picker__btn--save:hover {
  opacity: 0.88;
}
.admin-date-picker__btn--clear {
  background-color: transparent;
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.2);
}
.admin-date-picker__btn--clear:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

/* モバイルカード：プラン・契約日・クレジットセル */
.admin-card__plan-cell,
.admin-card__date-cell,
.admin-card__credit-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background-color 0.15s;
}
.admin-card__plan-cell:hover,
.admin-card__date-cell:hover,
.admin-card__credit-cell:hover {
  background-color: rgba(74, 159, 110, 0.18);
}

/* クレジット残高インラインエディター オーバーレイ */
.admin-credit-editor {
  position: absolute;
  z-index: 9999;
  min-width: 220px;
  background-color: var(--color-navy-dark);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.admin-credit-editor__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.admin-credit-editor__current {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 8px;
}

.admin-credit-editor__input,
.admin-credit-editor__memo {
  display: block;
  width: 100%;
  padding: 7px 10px;
  font-size: 14px;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.9);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.admin-credit-editor__input:focus,
.admin-credit-editor__memo:focus {
  border-color: var(--color-accent);
}
.admin-credit-editor__memo {
  margin-top: 8px;
  font-size: 13px;
}
.admin-credit-editor__memo::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.admin-credit-editor__actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.admin-credit-editor__btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.15s, opacity 0.15s;
}
.admin-credit-editor__btn--save {
  background-color: var(--color-accent);
  color: #fff;
}
.admin-credit-editor__btn--save:hover {
  opacity: 0.88;
}
.admin-credit-editor__btn--cancel {
  background-color: transparent;
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.2);
}
.admin-credit-editor__btn--cancel:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   プラン未設定ユーザー向けウェルカム紹介（Task #1704）
   ============================================================ */
.cg-welcome-intro {
  background: linear-gradient(160deg, #0d1f35 0%, #1a3557 60%, #112e3e 100%);
  border-radius: 14px;
  padding: 2rem 2rem 1.75rem;
  margin: 0 32px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
/* 右上にブランドの抽象モチーフ */
.cg-welcome-intro::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 159, 110, 0.12) 0%, transparent 70%);
  pointer-events: none;
}
.cg-welcome-intro__lead {
  font-size: 0.875rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 1.5rem;
  max-width: 440px;
  position: relative;
}
.cg-welcome-intro__cards {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
  position: relative;
}
.cg-welcome-intro__card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 18px 12px 16px;
  transition: background 0.2s, border-color 0.2s;
}
.cg-welcome-intro__card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.14);
}
.cg-welcome-intro__card-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 159, 110, 0.14);
  border-radius: 11px;
  color: rgba(110, 231, 160, 0.9);
}
.cg-welcome-intro__card-body {
  min-width: 0;
}
.cg-welcome-intro__card-title {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.cg-welcome-intro__card-desc {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.48);
  line-height: 1.4;
  margin-top: 4px;
}
.cg-welcome-intro__card-sep {
  display: none;
}
.cg-welcome-intro__card-br {
  display: block;
}
.cg-welcome-intro__footer {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.38);
  margin: 0;
  line-height: 1.55;
  position: relative;
}
.cg-welcome-intro__footer a {
  color: rgba(110, 231, 160, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.cg-welcome-intro__footer a:hover {
  color: #6ee7a0;
  text-decoration: underline;
}

/* レスポンシブ: モバイル時はカード縦積み */
@media (max-width: 540px) {
  .cg-welcome-intro {
    margin: 0 16px;
    padding: 1.5rem 1.25rem 1.25rem;
  }
  .cg-welcome-intro__cards {
    flex-direction: column;
    gap: 8px;
  }
  .cg-welcome-intro__card {
    flex-direction: row;
    text-align: left;
    padding: 12px 14px;
    gap: 12px;
  }
  .cg-welcome-intro__card-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }
  .cg-welcome-intro__card-desc {
    margin-top: 2px;
  }
  .cg-welcome-intro__card-sep {
    display: inline;
    color: rgba(255, 255, 255, 0.25);
  }
  .cg-welcome-intro__card-br {
    display: none;
  }
}

/* ============================================================
   AIプラン相談チャット（Task #1704）
   ============================================================ */
.ai-chat {
  position: relative;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ai-chat__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 11px 16px;
  background: rgba(74, 159, 110, 0.12);
  border: 1px solid rgba(74, 159, 110, 0.22);
  border-radius: 10px;
  color: rgba(110, 231, 160, 0.9);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
}
.ai-chat__toggle:hover {
  background: rgba(74, 159, 110, 0.2);
  border-color: rgba(74, 159, 110, 0.35);
}
.ai-chat__panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ai-chat__messages {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px 10px;
  -webkit-overflow-scrolling: touch;
}
.ai-chat__msg {
  display: flex;
}
.ai-chat__msg--user {
  justify-content: flex-end;
}
.ai-chat__msg--ai {
  justify-content: flex-start;
  flex-direction: column;
  align-items: flex-start;
}
.ai-chat__bubble {
  max-width: 82%;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.6;
  word-break: break-word;
  white-space: pre-wrap;
}
.ai-chat__msg--user .ai-chat__bubble {
  background: rgba(74, 159, 110, 0.22);
  color: #d1fae5;
  border-bottom-right-radius: 4px;
}
.ai-chat__msg--ai .ai-chat__bubble {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  border-bottom-left-radius: 4px;
}
/* タイピングアニメーション */
.ai-chat__bubble--typing {
  display: flex;
  gap: 5px;
  padding: 12px 18px;
}
.ai-chat__bubble--typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  animation: ai-typing 1.2s infinite ease-in-out;
}
.ai-chat__bubble--typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-chat__bubble--typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ai-typing {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}
/* 選択肢ボタン */
.ai-chat__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-left: 2px;
}
.ai-chat__option-btn {
  padding: 8px 18px;
  border: 1px solid rgba(74, 159, 110, 0.45);
  border-radius: 20px;
  background: rgba(74, 159, 110, 0.1);
  color: #6ee7a0;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.4;
}
.ai-chat__option-btn:hover:not([disabled]) {
  background: rgba(74, 159, 110, 0.25);
  border-color: #4a9f6e;
  transform: translateY(-1px);
}
.ai-chat__option-btn:active:not([disabled]) {
  transform: translateY(0);
}
/* 入力行 */
.ai-chat__input-row {
  display: flex;
  gap: 6px;
}
.ai-chat__input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.ai-chat__input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
.ai-chat__input:focus {
  border-color: rgba(74, 159, 110, 0.45);
  background: rgba(255, 255, 255, 0.09);
}
.ai-chat__send {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  background: rgba(74, 159, 110, 0.6);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s;
}
.ai-chat__send:hover {
  background: rgba(74, 159, 110, 0.8);
}
.ai-chat__send:disabled {
  opacity: 0.4;
  cursor: default;
}
/* エスカレーションボタン */
.ai-chat__escalate {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 9px 14px;
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.76rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  text-align: left;
}
.ai-chat__escalate:hover {
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(255, 255, 255, 0.3);
}
.ai-chat__escalate:disabled {
  opacity: 0.5;
  cursor: default;
}
/* エスカレーション完了 */
.ai-chat__escalated {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 12px 16px;
  background: rgba(74, 159, 110, 0.12);
  border: 1px solid rgba(74, 159, 110, 0.22);
  border-radius: 10px;
  color: rgba(110, 231, 160, 0.85);
  font-size: 0.78rem;
  line-height: 1.5;
}
.ai-chat__escalated svg {
  flex-shrink: 0;
}

