/* VIVID Musicの既存カラートークンを維持する。 */
:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --primary: 222.2 47.4% 11.2%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --border: 214.3 31.8% 91.4%;
  --ring: 222.2 84% 4.9%;
  --radius: 0.5rem;
  color-scheme: light;
}
* { box-sizing: border-box; border-color: hsl(var(--border)); }
html { height: 100%; overflow: hidden; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; height: 100vh; height: 100dvh; overflow: hidden;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: hsl(var(--background)); color: hsl(var(--foreground));
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 16px; line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, [tabindex="0"]:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.4; }
h1 { font-size: 40px; font-weight: 700; letter-spacing: -0.05em; line-height: 1.2; }
h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; }
h1:focus, .page-scroll:focus { outline: none; }
.container { width: min(100% - 64px, 960px); margin-inline: auto; }
.muted { color: hsl(var(--muted-foreground)); }
.skip-link { position: fixed; top: -80px; left: 20px; background: hsl(var(--background)); padding: 8px 16px; z-index: 100; }
.skip-link:focus { top: 8px; }
.site-header { position: relative; z-index: 10; border-bottom: 1px solid hsl(var(--border)); background: hsl(var(--background)); }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: 64px; }
.wordmark { display: inline-flex; align-items: baseline; gap: 12px; flex: 0 0 auto; }
.brand { text-decoration: none; font-size: 18px; font-weight: 700; letter-spacing: -0.035em; }
/* Oxygenはロゴだけに適用する。VIVIDは700、サービス名の接尾部は400。 */
.brand, .service-title h2 { font-family: "Oxygen", ui-sans-serif, system-ui, sans-serif; }
.brand:hover { text-decoration: none; }
.primary-nav { display: flex; align-items: stretch; gap: 24px; margin-left: auto; align-self: stretch; }
.primary-nav a { display: flex; align-items: center; position: relative; font-size: 13px; color: hsl(var(--muted-foreground)); text-decoration: none; white-space: nowrap; }
.primary-nav a:hover { color: hsl(var(--foreground)); }
.primary-nav a[aria-current="page"] { color: hsl(var(--foreground)); }
.primary-nav a[aria-current="page"]::after { content: ''; position: absolute; bottom: -1px; left: 0; right: 0; height: 2px; background: hsl(var(--foreground)); }
/* ページ移動と表示言語を区切り、選択中の言語は下線ではなく太字で示す。 */
.language-switch {
  position: relative;
  display: flex; align-items: center; gap: 10px; flex: 0 0 auto;
  padding-inline-start: 28px;
  font-size: 12px; color: hsl(var(--muted-foreground));
}
.language-switch::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  height: 20px;
  border-inline-start: 1px solid hsl(215.4 16.3% 78%);
  transform: translateY(-50%);
  pointer-events: none;
}
.language-switch a { display: inline-flex; align-items: center; min-height: 40px; white-space: nowrap; text-decoration: none; }
.language-switch a:hover { color: hsl(var(--foreground)); text-decoration: underline; }
.language-switch a[aria-current="true"] { color: hsl(var(--foreground)); font-weight: 600; text-decoration: none; }
.language-switch > span { color: hsl(var(--border)); }
:root[lang="en"] .legal-content { overflow-wrap: break-word; }
/* 中央の本文だけをスクロールさせ、ヘッダーとフッターの領域を確保する。 */
.page-scroll {
  min-width: 0; min-height: 0;
  overflow-x: hidden; overflow-y: scroll;
  overscroll-behavior-y: contain;
  scroll-padding-block: 24px;
}
.page-content { padding-top: 64px; padding-bottom: 56px; }

/* 画面内に収まるときだけ縦中央へ配置し、短い画面でも内容の上端を失わない。 */
:root[data-page="home"] .page-content {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding-block: 32px;
}
:root[data-page="home"] #home {
  flex: 0 0 auto;
  margin-block: auto;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 短いページでも3行の左右に同じスクロールバー領域を確保する。 */
.site-header, .site-footer { overflow: hidden; }
@supports (scrollbar-gutter: stable both-edges) {
  .site-header, .page-scroll, .site-footer { scrollbar-gutter: stable both-edges; }
  .page-scroll { overflow-y: auto; }
}
@supports not (scrollbar-gutter: stable both-edges) {
  /* 未対応ブラウザではsite.jsが実際のスクロールバー幅を測定する。 */
  .site-header, .site-footer { padding-inline-end: var(--reserved-scrollbar, 0px); }
}
.services { border-top: 1px solid hsl(var(--border)); }
.service { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 40px; padding: 28px 0 30px; border-bottom: 1px solid hsl(var(--border)); }
.service-title { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.service h2 { font-size: 23px; letter-spacing: -0.025em; font-weight: 700; }
.service-title .service-name { font-weight: 400; }
.service-description { font-size: 15px; color: hsl(var(--muted-foreground)); margin-top: 12px; max-width: 650px; line-height: 1.9; }
.service-domain { display: inline-block; color: hsl(var(--muted-foreground)); font-size: 12px; margin-top: 10px; text-decoration: none; }
.service-domain:hover { text-decoration: underline; }
.service-action { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 16px; border: 1px solid hsl(var(--border)); border-radius: calc(var(--radius) - 2px); font-size: 13px; font-weight: 500; line-height: 1.5; white-space: nowrap; text-decoration: none; background: hsl(var(--background)); }
.button:hover { background: hsl(var(--accent)); color: hsl(var(--accent-foreground)); text-decoration: none; }
.external-note { font-size: 11px; color: hsl(var(--muted-foreground)); }
/* 波形や画像を使わず、下端から淡いグラデーションを描画する。 */
.site-footer {
  --footer-space-height: clamp(140px, 14vw, 180px);
  --footer-gradient-height: 180px;
  position: relative;
  isolation: isolate;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  min-height: var(--footer-space-height);
  border-top: 0;
}
.site-footer {
  --footer-tint-opacity: 1;
  background-color: hsl(var(--background));
  background-image:
    linear-gradient(to bottom,
      hsl(var(--background)) 0%,
      hsl(var(--background) / 0.98) 10%,
      hsl(var(--background) / 0.92) 25%,
      hsl(var(--background) / 0.76) 45%,
      hsl(var(--background) / 0.44) 68%,
      hsl(var(--background) / 0.15) 87%,
      hsl(var(--background) / 0) 100%),
    linear-gradient(to right,
      rgb(217 241 252 / var(--footer-tint-opacity)) 0%,
      rgb(229 237 252 / var(--footer-tint-opacity)) 28%,
      rgb(242 230 251 / var(--footer-tint-opacity)) 53%,
      rgb(250 232 242 / var(--footer-tint-opacity)) 76%,
      rgb(253 242 227 / var(--footer-tint-opacity)) 100%);
  background-size: 100% var(--footer-gradient-height);
  background-position: center bottom;
  background-repeat: no-repeat;
  background-origin: border-box;
}
.site-footer .footer-inner { color: #506079; }
@media (max-width: 520px) {
  .site-footer { --footer-space-height: 156px; }
}
@media (max-height: 500px) {
  .site-footer { --footer-space-height: 0px; --footer-gradient-height: 100%; }
  .site-footer .footer-inner { padding-block: 12px; gap: 8px 20px; }
  .page-content { padding-block: 24px; }
}
@media print {
  .site-footer { min-height: auto; border-top: 1px solid hsl(var(--border)); }
  .site-footer { background: none; }
}

.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 32px; padding-block: 24px; font-size: 12px; color: hsl(var(--muted-foreground)); }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.legal-page { max-width: 800px; }
.breadcrumb { font-size: 13px; color: hsl(var(--muted-foreground)); margin-bottom: 24px; }
.legal-heading { margin-bottom: 28px; padding-bottom: 26px; border-bottom: 1px solid hsl(var(--border)); }
.legal-heading h1 { font-size: 32px; letter-spacing: -0.035em; line-height: 1.5; }
.document-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 12px; color: hsl(var(--muted-foreground)); margin-top: 12px; }
.legal-content { font-size: 15px; line-height: 1.95; overflow-wrap: anywhere; }
.legal-content section { margin-top: 36px; scroll-margin-top: 0; }
.legal-content section:first-child { margin-top: 0; }
.legal-content h2 { font-size: 18px; font-weight: 600; letter-spacing: 0; margin-bottom: 16px; line-height: 1.6; }
.legal-content h3 { font-size: 16px; font-weight: 600; margin: 24px 0 12px; line-height: 1.6; }
.legal-content p + p { margin-top: 14px; }
.legal-bottom { display: flex; flex-wrap: wrap; gap: 16px 28px; padding-top: 24px; margin-top: 36px; border-top: 1px solid hsl(var(--border)); font-size: 13px; }
.legal-bottom .button { padding: 0; min-height: auto; border: 0; font-size: inherit; font-weight: 400; text-decoration: underline; }
.legal-bottom .button:hover { background: none; }
@media (max-width: 760px) {
  .container { width: calc(100% - 40px); }
  .header-inner { gap: 0; flex-wrap: wrap; min-height: 58px; }
  .wordmark { padding-block: 14px; }
  .language-switch { margin-left: auto; padding-inline-start: 0; }
  .language-switch::before { display: none; }
  .primary-nav { width: 100%; order: 3; margin: 0; gap: 24px; height: 43px; }
  .primary-nav a { font-size: 12px; }
  .page-content { padding-top: 40px; padding-bottom: 40px; }
  h1 { font-size: 34px; }
  .service { gap: 20px; }
  .service h2 { font-size: 22px; }
  .legal-heading h1 { font-size: 28px; }
  .legal-content { font-size: 14px; }
}
@media (max-width: 520px) {
  .service { grid-template-columns: 1fr; gap: 20px; padding-block: 24px; }
  .service-action { align-items: center; flex-direction: row; gap: 12px; }
  .service-description { font-size: 14px; }
  .service-action .button { min-width: 130px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 16px; }
  .footer-links { gap: 10px 20px; }
  .legal-heading h1 { font-size: 25px; }
}
@media print {
  :root { --background: 0 0% 100%; --foreground: 0 0% 0%; --muted-foreground: 0 0% 30%; --border: 0 0% 80%; }
  .site-header { position: static; }
  .primary-nav, .language-switch, .breadcrumb, .legal-bottom { display: none !important; }
  .container { width: 100%; }
  html, body { height: auto; min-height: 0; overflow: visible; }
  body { display: block; }
  .site-header, .page-scroll, .site-footer {
    overflow: visible; scrollbar-gutter: auto; padding-inline: 0;
  }
  .page-content { padding-top: 24px; }
  .page-scroll { min-height: auto; }
  .legal-content section { break-inside: avoid; }
}

.legal-contact { margin-top: 20px; }
.legal-contact p + p { margin-top: 2px; }


@media (max-width: 380px) {
  .primary-nav { gap: 16px; }
}

@media print {
  :root[data-page="home"] .page-content { min-height: 0; display: block; padding-block: 24px; }
  :root[data-page="home"] #home { margin-block: 0; }
}

/* 背景と本文を同じグリッド行に重ね、スクロール位置から装飾を独立させる。 */
:root[data-page="home"] body { grid-template-columns: minmax(0, 1fr); }
:root[data-page="home"] .site-header { grid-area: 1 / 1; }
:root[data-page="home"] .page-scroll { grid-area: 2 / 1; position: relative; z-index: 1; }
:root[data-page="home"] .site-footer { grid-area: 3 / 1; }
.site-artwork {
  grid-area: 2 / 1;
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.ink-artwork {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  width: clamp(640px, 82vw, 960px);
  max-width: none;
  height: auto;
  display: block;
  opacity: 0.58;
}
/* 本文側と下端を白へ溶け込ませ、濃いインクを読む領域に重ねない。 */
.site-artwork::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, #fff 0%, rgb(255 255 255 / 0.94) 38%, rgb(255 255 255 / 0.35) 70%, rgb(255 255 255 / 0) 100%),
    linear-gradient(to bottom, rgb(255 255 255 / 0) 0%, rgb(255 255 255 / 0) 42%, #fff 100%);
}
/* 色が重なる部分でも説明と移動先の文字を読める濃さにする。 */
:root[data-page="home"] :is(.service-description, .service-domain, .external-note) { color: #566781; }
@media (max-width: 520px) {
  .ink-artwork { opacity: 0.5; }
  .site-artwork::after {
    background:
      linear-gradient(to right, #fff 0%, #fff 22%, rgb(255 255 255 / 0.94) 55%, rgb(255 255 255 / 0.6) 78%, rgb(255 255 255 / 0) 100%),
      linear-gradient(to bottom, rgb(255 255 255 / 0) 0%, rgb(255 255 255 / 0) 42%, #fff 100%);
  }
}
:root:not([data-page="home"]) .site-artwork { display: none; }
@media print { .site-artwork { display: none !important; } }
