/* 規約・ポリシーのページ（カジュアルアプリのネオ東京を、読みやすさ優先に落ち着かせたもの） */
:root {
  --pink: #ff2fb3;
  --cyan: #21e6ff;
  --violet: #8a5cff;
  --ink: #f6eefb;
  --ink-soft: rgba(236, 222, 248, 0.74);
  --night: #07020f;
  --panel: rgba(20, 8, 36, 0.78);
  --line: rgba(255, 255, 255, 0.10);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: clip; }
html, body { margin: 0; }
body {
  font-family: "Hiragino Sans", "Noto Sans JP", -apple-system, system-ui, sans-serif;
  color: var(--ink); line-height: 1.85; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(70% 40% at 50% 0%, rgba(255, 47, 179, 0.22), transparent 70%),
    radial-gradient(50% 30% at 85% 10%, rgba(33, 230, 255, 0.12), transparent 70%),
    var(--night);
  min-height: 100vh; overflow-x: clip;
}
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #fff; }

/* 読んだ量 */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 30; }
.progress span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--pink), var(--violet), var(--cyan)); box-shadow: 0 0 12px var(--pink); }

/* 上部の奥へ流れるグリッド床（枠で切って、ページの横幅を広げない） */
.floor-wrap { position: absolute; top: 0; left: 0; right: 0; height: 640px; overflow: hidden; z-index: 0; pointer-events: none; }
.grid-floor {
  position: absolute; top: 180px; left: -25%; right: -25%; height: 420px;
  background:
    linear-gradient(rgba(255, 47, 179, 0.55) 1px, transparent 1px) 0 0 / 100% 44px,
    linear-gradient(90deg, rgba(33, 230, 255, 0.35) 1px, transparent 1px) 0 0 / 64px 100%;
  transform: perspective(420px) rotateX(62deg); transform-origin: 50% 0;
  -webkit-mask: linear-gradient(180deg, transparent, #000 20%, #000 40%, transparent 85%);
          mask: linear-gradient(180deg, transparent, #000 20%, #000 40%, transparent 85%);
  opacity: 0.45; animation: floor 3.2s linear infinite;
}
@keyframes floor { to { background-position: 0 44px, 0 0; } }

/* ヘッダー */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px); background: rgba(7, 2, 15, 0.72);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
/* パンくず */
.crumbs { margin-right: auto; min-width: 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; min-width: 0; }
.crumbs li { display: flex; align-items: center; min-width: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.03em; line-height: 1.2; }
.crumbs li:not(:last-child) { flex: none; }
.crumbs li + li::before { content: "›"; margin: 0 6px; color: var(--pink); text-shadow: 0 0 8px var(--pink); font-size: 18px; line-height: 1; }
.crumbs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px; color: var(--cyan); text-decoration: none; border: 1px solid rgba(33, 230, 255, 0.45); background: rgba(33, 230, 255, 0.06); text-shadow: 0 0 8px rgba(33, 230, 255, 0.6); transition: background 0.2s, box-shadow 0.2s, color 0.2s; white-space: nowrap; }
.crumbs a:hover, .crumbs a:focus-visible { color: #fff; background: rgba(33, 230, 255, 0.18); box-shadow: 0 0 16px rgba(33, 230, 255, 0.55); outline: none; }
.crumbs [aria-current] span { padding: 8px 4px; color: #ffd6f2; text-shadow: 0 0 10px var(--pink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px rgba(33, 230, 255, 0.8)); }
.lang { display: inline-flex; border: 1px solid rgba(33, 230, 255, 0.6); border-radius: 999px; padding: 3px; box-shadow: 0 0 12px rgba(33, 230, 255, 0.25); }
.lang button { appearance: none; border: 0; background: transparent; color: var(--ink-soft); font: 700 12px/1 -apple-system, system-ui, sans-serif; letter-spacing: 0.06em; padding: 7px 9px; border-radius: 999px; cursor: pointer; transition: background 0.25s, color 0.25s; }
.lang button[aria-pressed="true"] { background: var(--cyan); color: #04121a; box-shadow: 0 0 14px var(--cyan); }

/* 冒頭 */
main { position: relative; z-index: 1; }
.hero { text-align: center; padding: clamp(56px, 10vh, 110px) 16px clamp(36px, 6vh, 64px); }
.eyebrow { margin: 0 0 10px; color: var(--cyan); font-weight: 800; letter-spacing: 0.32em; font-size: 12px; text-transform: uppercase; text-shadow: 0 0 10px var(--cyan); }
.neon {
  position: relative; display: inline-block; margin: 0; font-weight: 900; line-height: 1.15;
  font-size: clamp(34px, 6.4vw, 72px); letter-spacing: 0.02em; color: #fff;
  text-shadow: 0 0 6px #fff, 0 0 20px var(--pink), 0 0 56px var(--pink);
}
.neon::after { content: attr(data-text); position: absolute; inset: 0; color: var(--cyan); mix-blend-mode: screen; opacity: 0; text-shadow: none; pointer-events: none; }
.is-on .neon { animation: flickerOn 1s linear both; }
.is-on .neon::after { animation: split 0.5s steps(2) 1.1s 1; }
@keyframes flickerOn { 0% { opacity: 0; } 8% { opacity: 0.9; } 12% { opacity: 0.15; } 20% { opacity: 1; } 24% { opacity: 0.35; } 38%, 100% { opacity: 1; } }
@keyframes split { 0% { opacity: 0.8; transform: translate(-4px, 1px); clip-path: inset(20% 0 55% 0); } 50% { opacity: 0.8; transform: translate(4px, -1px); clip-path: inset(60% 0 15% 0); } 100% { opacity: 0; } }
.note { max-width: 640px; margin: -12px auto 22px; font-size: 12px; color: var(--ink-soft); }
.date { margin: 18px 0 26px; color: var(--ink-soft); font-size: 14px; letter-spacing: 0.06em; }
.date time { color: var(--ink); padding: 3px 10px; margin-left: 6px; border: 1px solid rgba(255, 47, 179, 0.6); border-radius: 6px; box-shadow: 0 0 10px rgba(255, 47, 179, 0.35); }
.tldr { list-style: none; padding: 0; margin: 0 auto; max-width: 860px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tldr li {
  padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: rgba(33, 230, 255, 0.08); border: 1px solid rgba(33, 230, 255, 0.45);
  box-shadow: inset 0 0 12px rgba(33, 230, 255, 0.15); opacity: 0; transform: translateY(8px);
}
.tldr li::before { content: "✓"; color: var(--cyan); margin-right: 8px; text-shadow: 0 0 8px var(--cyan); }
.is-on .tldr li { animation: chip 0.6s cubic-bezier(.2, .7, .2, 1) forwards; }
@keyframes chip { to { opacity: 1; transform: none; } }

/* 本文＋目次 */
.layout { display: grid; grid-template-columns: 240px minmax(0, 760px); justify-content: center; gap: clamp(24px, 4vw, 56px); padding: 0 clamp(16px, 4vw, 40px) 40px; }
.toc { position: sticky; top: 88px; align-self: start; display: grid; gap: 4px; font-size: 14px; }
.toc a { display: grid; grid-template-columns: 34px 1fr; align-items: baseline; padding: 8px 12px; border-left: 2px solid var(--line); color: var(--ink-soft); text-decoration: none; transition: color 0.25s, border-color 0.25s, background 0.25s; }
.toc a b { font: 800 12px/1 "SF Mono", ui-monospace, monospace; color: rgba(255, 47, 179, 0.7); }
.toc a:hover { color: #fff; }
.toc a.active { color: #fff; border-left-color: var(--pink); background: linear-gradient(90deg, rgba(255, 47, 179, 0.16), transparent); box-shadow: -6px 0 14px -6px var(--pink); }
.toc:empty { display: none; }

article { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; }
.intro p { margin: 0; font-size: 16px; color: var(--ink); }
.sec {
  position: relative; padding: 26px clamp(20px, 3vw, 34px) 22px; background: var(--panel); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.sec::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--pink), var(--violet)); box-shadow: 0 0 12px var(--pink); }
.sec h2 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 10px; font-size: clamp(18px, 2.2vw, 22px); line-height: 1.4; }
.sec .no { font: 800 13px/1 "SF Mono", ui-monospace, monospace; color: var(--pink); letter-spacing: 0.08em; text-shadow: 0 0 10px var(--pink); }
.sec p { margin: 0 0 12px; } .sec p:last-child { margin-bottom: 0; }
.sec ul { margin: 6px 0 12px; padding: 0; list-style: none; display: grid; gap: 8px; }
.sec li { position: relative; padding-left: 22px; }
.sec li::before { content: ""; position: absolute; left: 4px; top: 0.75em; width: 7px; height: 7px; background: var(--cyan); transform: rotate(45deg); box-shadow: 0 0 8px var(--cyan); }
.contact .mail a { display: inline-block; max-width: 100%; overflow-wrap: anywhere; margin-top: 4px; padding: 12px 20px; font-weight: 700; color: #04121a; background: var(--cyan); text-decoration: none; border-radius: 8px; box-shadow: 0 0 18px rgba(33, 230, 255, 0.6); transition: box-shadow 0.25s, transform 0.25s; }
.contact .mail a:hover { box-shadow: 0 0 30px var(--cyan); transform: translateY(-2px); }

/* スクロールで現れる */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

/* 言語の切り替え（JS が有効なときだけ片方を隠す） */
.js [data-doc][hidden] { display: none; }
.doc + .doc { border-top: 1px solid var(--line); }
.js .doc + .doc { border-top: 0; }

.foot { position: relative; z-index: 1; text-align: center; padding: 24px 16px 56px; color: var(--ink-soft); font-size: 13px; }
.foot a { color: var(--ink-soft); }
.foot p { margin: 8px 0 0; }

@media (max-width: 520px) {
  .lang button { padding: 7px 5px; font-size: 11px; }
  .topbar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .crumbs li { font-size: 13px; }
  .crumbs li + li::before { margin: 0 3px; }
  /* 狭い画面ではページ名の段を省く（見出しに大きく出ているため） */
  .crumbs li[aria-current]:not(:nth-child(2)) { display: none; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .toc a { border-left: 0; border-bottom: 1px solid var(--line); }
  .toc a.active { box-shadow: none; }
  .crumb-text { display: none; }
  .crumbs a { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grid-floor, .is-on .neon, .is-on .neon::after { animation: none; }
  .tldr li { opacity: 1; transform: none; } .is-on .tldr li { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* 404 */
.notfound-links { font-weight: 700; }
/* 施行日の行が無いページ（サポート）は、見出しと要点の間を空ける */
.neon + .tldr { margin-top: 28px; }

/* ---- 言語の選択（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(33, 230, 255, 0.6); background: rgba(7, 2, 15, 0.6); box-shadow: 0 0 12px rgba(33, 230, 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: #d6fbff; 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(33, 230, 255, 0.6); outline-offset: 2px; }
.lang-select option { color: #111; background: #fff; }
@media (max-width: 600px) { .lang-select { max-width: 7.5em; } }

/* ---- 右から左の言語（ar he ur）: 本文の向きに合わせる ---- */
[dir="rtl"] .sec::before { left: auto; right: 0; }
[dir="rtl"] .sec li { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .sec li::before { left: auto; right: 4px; }
[dir="rtl"] .toc a { border-left: 0; border-right: 2px solid var(--line); }
[dir="rtl"] .toc a.active { border-right-color: var(--pink); background: linear-gradient(270deg, rgba(255, 47, 179, 0.16), transparent); box-shadow: 6px 0 14px -6px var(--pink); }
[dir="rtl"] .tldr li::before { margin-right: 0; margin-left: 8px; }
