/* トップ（全プロダクト）: 軌道。design/concepts/d から */
:root {
  --ink: #eef3ff;
  --ink-soft: rgba(220, 230, 255, 0.66);
  --line: rgba(190, 210, 255, 0.45);
  --glow: #9cc4ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "SF Pro Display", -apple-system, "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  color: var(--ink); background: #000; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
.space { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

.stage { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 24px 16px 40px; }

/* ---- 恒星系（ロゴ＋軌道＋衛星） ---- */
.system { position: relative; width: min(1100px, 100%); height: clamp(460px, 68vh, 680px); }
.orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 2; pointer-events: none; }
.orbit-line { fill: none; stroke: url(#orbitGrad); stroke-width: 1.4; filter: drop-shadow(0 0 4px rgba(150, 190, 255, 0.6)); }
.orbit-pulse { fill: none; stroke: #ffffff; stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 0 6px #bcd6ff) drop-shadow(0 0 14px #7fb4ff); opacity: 0.9; }

.core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; display: grid; place-items: center; width: clamp(240px, 40vw, 460px); aspect-ratio: 1; pointer-events: none; }
.ring {
  position: absolute; inset: 12%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 8%, rgba(160, 200, 255, 0.0) 8%, rgba(200, 225, 255, 0.95) 22%, transparent 30% 55%, rgba(170, 205, 255, 0.85) 70%, transparent 78% 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  filter: drop-shadow(0 0 10px rgba(150, 195, 255, 0.9)) drop-shadow(0 0 30px rgba(110, 160, 255, 0.6));
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.logo { margin: 0; display: grid; text-align: center; font-weight: 300; font-style: italic; letter-spacing: 0.16em; font-size: clamp(26px, 4.6vw, 60px); line-height: 1.15; text-shadow: 0 0 24px rgba(160, 200, 255, 0.45); }
.logo span { display: block; opacity: 0; letter-spacing: 0.6em; filter: blur(8px); transition: opacity 1.6s ease, letter-spacing 1.8s cubic-bezier(.2, .7, .2, 1), filter 1.6s ease; }
.is-in .logo span { opacity: 1; letter-spacing: 0.16em; filter: none; }
.is-in .logo span + span { transition-delay: 0.25s; }

/* 衛星（アプリ）。位置と奥行きは JS が --x --y --s --o で決める */
.sat {
  --x: 50%; --y: 50%; --s: 1; --o: 1; --z: 4;
  position: absolute; left: var(--x); top: var(--y); z-index: var(--z);
  display: flex; align-items: center; gap: 14px; transform: translate(-42px, -50%) scale(var(--s)); transform-origin: 42px 50%;
  opacity: var(--o); color: inherit; text-decoration: none; outline: none;
  transition: filter 0.3s;
}
/* 軌道の右側では文字をアイコンの左に出す（画面の外へはみ出さないように） */
.sat[data-side="left"] { flex-direction: row-reverse; transform: translate(calc(-100% + 42px), -50%) scale(var(--s)); transform-origin: calc(100% - 42px) 50%; text-align: right; }
.sat img { width: 84px; height: 84px; border-radius: 20px; flex: none; box-shadow: 0 0 0 1px rgba(200, 220, 255, 0.5), 0 0 26px rgba(130, 175, 255, 0.55); transition: box-shadow 0.3s, transform 0.3s; }
.sat-text { display: grid; gap: 4px; white-space: nowrap; text-shadow: 0 2px 12px #000; }
.sat-name { font-size: clamp(18px, 2.2vw, 28px); font-weight: 700; }
.sat-meta { font-size: 13px; color: var(--ink-soft); }
.sat:hover img, .sat:focus-visible img { box-shadow: 0 0 0 2px #dfeaff, 0 0 40px rgba(160, 200, 255, 0.95); transform: scale(1.06); }

/* ---- リンク ---- */
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin: 8px 0 28px; }
.link {
  display: inline-flex; align-items: center; gap: 14px; padding: 15px 28px; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: clamp(14px, 1.5vw, 17px);
  border: 1px solid var(--line); background: rgba(10, 16, 36, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.link i { font-style: normal; transition: transform 0.3s; }
.link-primary { border-color: #cfe0ff; background: linear-gradient(135deg, rgba(60, 90, 180, 0.55), rgba(20, 30, 70, 0.6)); box-shadow: 0 0 18px rgba(120, 170, 255, 0.35); }
.link:hover, .link:focus-visible { outline: none; border-color: #dbe7ff; box-shadow: 0 0 22px rgba(140, 185, 255, 0.45); background: rgba(30, 44, 90, 0.55); }
.link:hover i, .link:focus-visible i { transform: translateX(5px); }
.foot { color: var(--ink-soft); font-size: 14px; letter-spacing: 0.05em; margin-top: auto; padding-top: 12vh; }
.foot a { color: var(--ink-soft); }

.links, .foot { transition: opacity 1.2s ease 1.6s; }
.links, .foot { opacity: 0; }
.is-in .links, .is-in .foot { opacity: 1; }

.app-list { display: none; list-style: none; padding: 0; margin: 0 0 16px; width: 100%; max-width: 520px; }
.app-card { display: flex; align-items: center; gap: 14px; padding: 12px 16px; margin-bottom: 10px; border-radius: 18px; color: inherit; text-decoration: none; border: 1px solid var(--line); background: rgba(10, 16, 36, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.app-card img { width: 52px; height: 52px; border-radius: 13px; flex: none; }
.app-card span { display: grid; gap: 2px; } .app-card b { font-size: 17px; } .app-card small { color: var(--ink-soft); font-size: 12px; }
.app-card i { margin-left: auto; font-style: normal; font-size: 22px; color: var(--ink-soft); }

@media (max-width: 720px) {
  .system { height: 360px; }
  .logo { font-size: 22px; letter-spacing: 0.12em; }
  .is-in .logo span { letter-spacing: 0.12em; }
  .sat-text { display: none; }
  .app-list { display: block; }
  .foot { padding-top: 6vh; }
  .sat img { width: 56px; height: 56px; border-radius: 14px; }
  .sat { transform: translate(-28px, -50%) scale(var(--s)); transform-origin: 28px 50%; gap: 10px; }
  .sat-meta { display: none; }
  .links { flex-direction: column; width: 100%; }
  .link { justify-content: space-between; }
}
@media (prefers-reduced-motion: reduce) {
  .ring { animation: none; }
  .logo span { opacity: 1; letter-spacing: 0.16em; filter: none; transition: none; }
  .links, .foot { opacity: 1; transition: none; }
}

/* ---- 言語の切り替え（どの画面にも同じものを置く） ---- */
.lang { position: fixed; top: 14px; right: 14px; z-index: 10; display: inline-flex; padding: 3px; border-radius: 999px; border: 1px solid rgba(190, 210, 255, 0.5); background: rgba(5, 8, 20, 0.6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 0 14px rgba(120, 170, 255, 0.25); }
.lang button { appearance: none; border: 0; background: transparent; color: var(--ink-soft); font: 700 11px/1 -apple-system, system-ui, sans-serif; letter-spacing: 0.06em; padding: 7px 8px; border-radius: 999px; cursor: pointer; transition: background 0.25s, color 0.25s; }
.lang button[aria-pressed="true"] { background: #dbe7ff; color: #06102a; box-shadow: 0 0 14px rgba(160, 200, 255, 0.8); }
.stage { padding-top: 56px; }

/* ---- 言語の選択（44 言語なのでプルダウン。中身は lang.js が入れる） ---- */
.lang { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 4px 3px 12px; border-radius: 999px; border: 1px solid rgba(190, 210, 255, 0.5); background: rgba(5, 8, 20, 0.6); box-shadow: 0 0 12px rgba(120, 170, 255, 0.25); font-size: 14px; line-height: 1; }
.lang-select {
  appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; cursor: pointer;
  font: 700 13px/1.2 -apple-system, system-ui, sans-serif; color: #e6eeff; background-color: transparent;
  padding: 7px 26px 7px 4px; max-width: 11em; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 52%, calc(100% - 8px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.lang-select:focus-visible { outline: 2px solid rgba(190, 210, 255, 0.5); outline-offset: 2px; }
.lang-select option { color: #111; background: #fff; }
@media (max-width: 600px) { .lang-select { max-width: 7.5em; } }
.lang { position: fixed; top: 14px; right: 14px; z-index: 10; }

/* 言語ピッカーの配色と位置（lang.css の上書き） */
.lang.lp-ready { position: fixed; top: 14px; right: 14px; z-index: 10; --lp-accent: #b9d3ff; --lp-accent-rgb: 185, 211, 255; --lp-ink: #eef3ff; --lp-panel: rgba(6, 10, 28, 0.88); }
