/* ==========================================================================
   Global Intern landing previews — shared base
   No external fonts / images. System Japanese font stack only.
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h, 80px);
}

body {
  margin: 0;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, -apple-system, sans-serif;
  font-feature-settings: "palt" 1;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
ol,
ul,
dl,
dd,
figure {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.jp-break {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.line {
  display: block;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Icons ------------------------------------------------------------------ */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Focus ------------------------------------------------------------------- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* FAQ (native details) --------------------------------------------------- */
details > summary {
  list-style: none;
  cursor: pointer;
}

details > summary::-webkit-details-marker {
  display: none;
}

/* Preview dialog --------------------------------------------------------- */
.preview-dialog {
  width: min(880px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  border: 0;
  border-radius: var(--dialog-radius, 24px);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 40px 120px -20px rgba(15, 23, 42, 0.45);
  overflow: hidden;
}

.preview-dialog[open] {
  display: flex;
  flex-direction: column;
  animation: dialog-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.preview-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pd-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 28px 18px;
  border-bottom: 1px solid var(--line);
}

.pd-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-text);
}

.pd-title {
  font-size: 22px;
  line-height: 1.4;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.pd-close {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pd-close:hover {
  background: var(--soft);
}

.pd-body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 0;
  overflow: auto;
}

.pd-steps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: var(--soft);
}

.pd-step-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  text-align: left;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}

.pd-step-btn:hover {
  color: var(--ink);
}

.pd-step-btn[aria-selected="true"] {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 6px 18px -10px rgba(15, 23, 42, 0.35);
}

.pd-step-num {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
}

.pd-step-btn[aria-selected="true"] .pd-step-num {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.pd-panel {
  padding: 26px 28px 8px;
}

.pd-panel[hidden] {
  display: none;
}

.pd-panel h3 {
  font-size: 18px;
  line-height: 1.5;
  font-weight: 800;
}

.pd-panel > p {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
}

.pd-figure {
  margin-top: 18px;
  border-radius: 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 16px;
}

.pd-figure svg {
  width: 100%;
  height: auto;
}

.pd-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 28px 22px;
  border-top: 1px solid var(--line);
}

.pd-note {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

.pd-nav {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.pd-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #fff;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.pd-btn:hover {
  background: var(--soft);
}

.pd-btn[disabled] {
  opacity: 0.4;
  cursor: default;
}

.pd-btn--primary {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.pd-btn--primary:hover {
  background: var(--accent);
  filter: brightness(1.06);
}

@media (max-width: 720px) {
  .pd-head {
    padding: 18px 18px 14px;
  }

  .pd-title {
    font-size: 18px;
  }

  .pd-body {
    grid-template-columns: 1fr;
  }

  .pd-steps {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px;
    scrollbar-width: none;
  }

  .pd-step-btn {
    width: auto;
    flex: none;
    padding: 8px 12px;
    font-size: 13px;
  }

  .pd-panel {
    padding: 18px 18px 4px;
  }

  .pd-foot {
    padding: 14px 18px 18px;
  }
}

/* Reveal ------------------------------------------------------------------ */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: var(--d, 0s);
}

.js .reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Reduced motion ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

.pd-panels {
  min-width: 0;
}

.pd-count {
  align-self: center;
  margin-right: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Shared SVG illustration classes (colors come from page tokens) ---------- */
.sv-card { fill: #fff; stroke: var(--line); }
.sv-soft { fill: var(--soft); }
.sv-line { stroke: var(--line); fill: none; }
.sv-bar { fill: #e8ecf3; }
.sv-field { fill: #eef1f6; }
.sv-input { fill: #fff; stroke: #dfe4ec; }
.sv-ink { fill: var(--ink); }
.sv-muted { fill: var(--muted); }
.sv-title { fill: var(--ink); font-weight: 800; }
.sv-accent { fill: var(--accent); }
.sv-accent-soft { fill: var(--accent-soft); }
.sv-accent-text { fill: var(--accent-text); }
.sv-accent-stroke { stroke: var(--accent); }
