:root {
  --ink: #10212a;
  --muted: #5d6e77;
  --paper: rgba(255, 252, 246, 0.82);
  --line: rgba(16, 33, 42, 0.11);
  --deep: #0b3b57;
  --sea: #2b96c2;
  --glow: #7fd3ee;
  --sand: #fbefe1;
  --coral: #ff985e;
  --shadow: 0 22px 60px rgba(8, 39, 58, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.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;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Space Grotesk", "Noto Sans JP", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(127, 211, 238, 0.42), transparent 24%),
    radial-gradient(circle at 86% 10%, rgba(255, 152, 94, 0.32), transparent 18%),
    linear-gradient(160deg, #f8fbfd 0%, #eff8f3 48%, #fff7ee 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

.site-shell {
  width: min(1140px, calc(100vw - 32px));
  margin: 0 auto;
  padding-bottom: 52px;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.site-header {
  padding: 24px 0;
}

.chat-home .site-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.chat-header {
  align-items: flex-start;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-footer {
  margin-top: 30px;
  padding: 24px 0 8px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #0b3b57, #33a6d6);
  box-shadow: var(--shadow);
}

.brand-text {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
}

.site-nav a.is-active {
  color: var(--deep);
  font-weight: 700;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
}

.lang-button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font: inherit;
  background: transparent;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.lang-button:hover {
  color: var(--deep);
}

.lang-button.is-active {
  color: white;
  background: linear-gradient(135deg, #0a3550, #2497c7 68%, #71d1eb);
  box-shadow: 0 10px 24px rgba(21, 104, 138, 0.22);
}

.chat-stage {
  display: grid;
  place-items: center;
  padding: 12px 0 24px;
}

.chat-frame {
  width: min(980px, 100%);
  display: grid;
  gap: 18px;
}

.chat-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
}

.chat-title {
  margin: 0;
  max-width: 13ch;
  font-family: "Noto Serif SC", "Noto Serif JP", serif;
  font-size: clamp(2.15rem, 4.9vw, 4.15rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.assistant-badge {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.assistant-badge strong {
  display: block;
  margin-bottom: 4px;
}

.assistant-badge p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.assistant-orb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 35%, #c6f7ff 0%, #52c3eb 48%, #0b3b57 100%);
  box-shadow: 0 0 0 8px rgba(82, 195, 235, 0.12);
}

.chat-panel {
  display: grid;
  gap: 18px;
  min-height: 600px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(243, 252, 255, 0.82));
  box-shadow: 0 34px 80px rgba(8, 39, 58, 0.16);
  backdrop-filter: blur(18px);
}

.chat-messages {
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 340px;
  max-height: 54vh;
  overflow: auto;
  padding-right: 6px;
}

.chat-bubble {
  max-width: min(720px, 92%);
  padding: 16px 18px 15px;
  border-radius: 22px;
  box-shadow: 0 16px 34px rgba(8, 39, 58, 0.08);
}

.chat-bubble-user {
  justify-self: end;
  color: white;
  background: linear-gradient(135deg, #0a3550, #2497c7 70%, #71d1eb);
}

.chat-bubble-assistant {
  justify-self: start;
  border: 1px solid rgba(11, 59, 87, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.chat-role {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-bubble-user .chat-role {
  color: rgba(255, 255, 255, 0.78);
}

.chat-bubble-assistant .chat-role {
  color: var(--deep);
}

.chat-line {
  margin: 0;
  font-size: 1rem;
  line-height: 1.68;
  white-space: pre-wrap;
}

.chat-line + .chat-line {
  margin-top: 12px;
}

.chat-status-badge {
  display: inline-flex;
  margin-top: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(11, 59, 87, 0.08);
}

.chat-bubble-user .chat-status-badge {
  background: rgba(255, 255, 255, 0.18);
}

.trace-list,
.suggestion-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.trace-list {
  margin-top: 14px;
}

.trace-chip,
.suggestion-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  font: inherit;
}

.trace-chip {
  border: 1px solid rgba(11, 59, 87, 0.08);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.suggestion-chip {
  border: 1px solid rgba(11, 59, 87, 0.1);
  color: var(--deep);
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.suggestion-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 59, 87, 0.24);
  box-shadow: 0 10px 20px rgba(8, 39, 58, 0.08);
}

.chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding-top: 10px;
  border-top: 1px solid rgba(11, 59, 87, 0.08);
}

.chat-input {
  width: 100%;
  min-height: 96px;
  padding: 16px 18px;
  border: 1px solid rgba(11, 59, 87, 0.12);
  border-radius: 22px;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.55;
  resize: vertical;
  background: rgba(255, 255, 255, 0.86);
}

.chat-input:focus {
  outline: 2px solid rgba(36, 151, 199, 0.34);
  border-color: rgba(36, 151, 199, 0.6);
}

.chat-submit {
  min-width: 142px;
  min-height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 18px;
  color: white;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #0a3550, #2497c7 70%, #71d1eb);
  box-shadow: 0 14px 30px rgba(21, 104, 138, 0.22);
}

.chat-submit:disabled {
  cursor: progress;
  opacity: 0.74;
}

.chat-footer {
  margin-top: 0;
}

.hero,
.page-hero {
  padding: 38px 0 18px;
}

.hero {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 28px;
  align-items: start;
}

.page-hero {
  max-width: 760px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 12px;
  color: var(--deep);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.panel h2,
.hero-card h2 {
  margin: 0;
  font-family: "Noto Serif SC", "Noto Serif JP", serif;
  line-height: 1.02;
}

.hero h1,
.page-hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.6rem);
}

.hero h1 {
  max-width: 10ch;
}

.page-hero h1 {
  max-width: 11ch;
}

.panel h2 {
  max-width: 14ch;
  font-size: clamp(2rem, 4vw, 3.1rem);
}

.lead,
.strip-card p,
.feature-grid p,
.timeline-grid p,
.content-grid p,
.contact-grid p,
.legal-panel p,
.site-footer p {
  color: var(--muted);
  line-height: 1.72;
}

.lead {
  margin-top: 18px;
  max-width: 620px;
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-trust,
.status-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-trust {
  margin-top: 18px;
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 18px;
  font-weight: 700;
}

.primary-link {
  color: white;
  background: linear-gradient(135deg, #0a3550, #2497c7 68%, #71d1eb);
  box-shadow: 0 14px 30px rgba(21, 104, 138, 0.22);
}

.secondary-link {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.56);
}

.hero-card,
.strip-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-card {
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(242, 252, 255, 0.72));
}

.search-console {
  display: grid;
  gap: 18px;
}

.hero-card h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.console-lead {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}

.status-pill,
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(11, 59, 87, 0.1);
  border-radius: 999px;
  font-size: 0.92rem;
  background: rgba(255, 255, 255, 0.76);
}

.status-pill {
  color: var(--deep);
  font-weight: 700;
}

.meta-chip {
  color: var(--muted);
}

.service-stack {
  display: grid;
  gap: 12px;
}

.service-item {
  padding: 18px;
  border: 1px solid rgba(11, 59, 87, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
}

.service-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.service-item-head strong {
  font-size: 1.05rem;
}

.service-label {
  margin: 0;
  color: var(--deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.service-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 18px;
  color: white;
  font-weight: 700;
  background: linear-gradient(135deg, #0a3550, #2497c7 68%, #71d1eb);
}

.route-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  font-weight: 700;
}

.route-divider {
  flex: 1;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(11, 59, 87, 0.18), rgba(43, 150, 194, 0.7));
}

.mini-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.8;
}

.strip-grid,
.feature-grid,
.timeline-grid,
.content-grid,
.contact-grid {
  display: grid;
  gap: 18px;
}

.strip-grid,
.feature-grid,
.timeline-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-grid,
.contact-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insight-grid .strip-card {
  min-height: 240px;
}

.strip-card,
.feature-grid article,
.timeline-grid article,
.content-grid article,
.contact-grid article {
  min-height: 200px;
  padding: 24px;
}

.strip-card h3,
.feature-grid h3,
.timeline-grid h3,
.content-grid h2,
.contact-grid h2,
.legal-panel h2 {
  margin: 0 0 12px;
}

.strip-card.warm {
  background: linear-gradient(180deg, rgba(255, 152, 94, 0.18), rgba(255, 255, 255, 0.8));
}

.strip-card.cool {
  background: linear-gradient(180deg, rgba(127, 211, 238, 0.22), rgba(255, 255, 255, 0.8));
}

.strip-card.neutral {
  background: linear-gradient(180deg, rgba(13, 64, 93, 0.08), rgba(255, 255, 255, 0.8));
}

.panel {
  margin-top: 28px;
  padding: 30px;
}

.panel-accent {
  background:
    linear-gradient(180deg, rgba(255, 152, 94, 0.12), rgba(255, 255, 255, 0.82));
}

.timeline-grid strong {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--deep);
  font-size: 1.15rem;
}

.legal-panel h2 + p {
  margin-top: 0;
}

.legal-panel p + h2 {
  margin-top: 24px;
}

@media (max-width: 920px) {
  .hero,
  .strip-grid,
  .feature-grid,
  .timeline-grid,
  .content-grid,
  .contact-grid,
  .site-footer {
    grid-template-columns: 1fr;
    display: grid;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero h1 {
    max-width: none;
  }

  .chat-topline {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .chat-panel {
    min-height: 560px;
  }

  .chat-composer {
    grid-template-columns: 1fr;
  }

  .chat-submit {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: calc(100vw - 18px);
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(2.3rem, 12vw, 4rem);
  }

  .panel,
  .hero-card,
  .strip-card {
    padding: 20px;
  }

  .site-nav,
  .footer-links {
    gap: 12px;
  }

  .lang-switcher {
    flex-wrap: wrap;
  }

  .chat-panel {
    padding: 18px;
    border-radius: 26px;
  }

  .chat-title {
    max-width: none;
    font-size: clamp(2.2rem, 12vw, 3.5rem);
  }

  .chat-bubble {
    max-width: 100%;
  }

  .assistant-badge {
    width: 100%;
  }
}
