/* カジュアルアプリ: ネオ東京サイバーパンク。design/concepts/c から */
:root {
  --pink: #ff2fb3;
  --pink-soft: #ff7fd4;
  --cyan: #21e6ff;
  --violet: #8a5cff;
  --ink: #fff4fd;
  --ink-soft: rgba(255, 230, 250, 0.72);
  --night: #07020f;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Avenir Next", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  color: var(--ink); background: var(--night); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.city { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
/* 走査線と周辺減光 */
.scanlines {
  position: fixed; inset: 0; z-index: 3; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, 0.65) 100%);
  mix-blend-mode: multiply;
}

/* ---- 縦書きのネオン看板 ---- */
.sign {
  position: fixed; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.12em;
  padding: 0.35em 0.3em; border-radius: 10px; font-weight: 800; line-height: 1;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  pointer-events: none; user-select: none;
}
.sign-left { left: clamp(10px, 3vw, 48px); top: 12vh; font-size: clamp(34px, 6vw, 86px); color: #ffd6f2; border: 3px solid var(--pink); box-shadow: 0 0 18px var(--pink), inset 0 0 18px var(--pink); text-shadow: 0 0 8px var(--pink), 0 0 28px var(--pink), 0 0 60px var(--pink); }
.sign-right { right: clamp(10px, 3vw, 48px); top: 18vh; font-size: clamp(28px, 4.4vw, 64px); color: #d6fbff; border: 3px solid var(--cyan); box-shadow: 0 0 18px var(--cyan), inset 0 0 18px var(--cyan); text-shadow: 0 0 8px var(--cyan), 0 0 28px var(--cyan), 0 0 60px var(--cyan); }
.sign span { display: block; transition: opacity 0.05s; }
.sign .off { opacity: 0.18; text-shadow: none; }

/* ---- 中央 ---- */
.stage { position: relative; z-index: 2; min-height: calc(100vh - 58px); width: min(1040px, 100%); margin: 0 auto; padding: clamp(36px, 7vh, 90px) 16px 48px; display: flex; flex-direction: column; align-items: center; }

.subtitle { margin: 10px 0 clamp(26px, 4.5vh, 48px); font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-weight: 700; letter-spacing: 0.5em; font-size: clamp(16px, 2vw, 22px); color: #ffd6f2; text-shadow: 0 0 10px var(--pink); }
.title {
  position: relative; margin: 0 0 clamp(10px, 2vh, 20px); text-align: center;
  font-size: clamp(44px, 9vw, 120px); line-height: 0.95; font-weight: 900; font-style: italic; letter-spacing: -0.02em;
  color: #fff; text-shadow: 0 0 6px #fff, 0 0 22px var(--pink), 0 0 60px var(--pink);
  transform: skewX(-6deg);
}
/* RGB ずれ（グリッチ）。普段は隠しておき、.glitch の間だけ出す */
.title::before, .title::after {
  content: attr(data-text); position: absolute; inset: 0; white-space: pre-line;
  opacity: 0; pointer-events: none; text-shadow: none;
}
.title::before { color: var(--cyan); mix-blend-mode: screen; }
.title::after { color: var(--pink); mix-blend-mode: screen; }
.title.glitch::before { opacity: 0.85; animation: glitchA 0.45s steps(2) 1; }
.title.glitch::after { opacity: 0.85; animation: glitchB 0.45s steps(2) 1; }
.title.glitch { animation: jitter 0.45s steps(3) 1; }
@keyframes glitchA { 0% { clip-path: inset(10% 0 70% 0); transform: translate(-6px, -2px); } 25% { clip-path: inset(55% 0 20% 0); transform: translate(5px, 1px); } 50% { clip-path: inset(30% 0 45% 0); transform: translate(-4px, 2px); } 75% { clip-path: inset(80% 0 5% 0); transform: translate(6px, -1px); } 100% { clip-path: inset(0 0 100% 0); } }
@keyframes glitchB { 0% { clip-path: inset(65% 0 10% 0); transform: translate(6px, 2px); } 25% { clip-path: inset(5% 0 75% 0); transform: translate(-5px, -2px); } 50% { clip-path: inset(40% 0 35% 0); transform: translate(4px, 0); } 75% { clip-path: inset(20% 0 60% 0); transform: translate(-6px, 1px); } 100% { clip-path: inset(100% 0 0 0); } }
@keyframes jitter { 0% { transform: skewX(-6deg) translate(0); } 33% { transform: skewX(-9deg) translate(3px, -1px); } 66% { transform: skewX(-3deg) translate(-3px, 1px); } 100% { transform: skewX(-6deg); } }

/* ---- カード（角を落としたネオン枠） ---- */
.apps { list-style: none; padding: 0; margin: 0 0 28px; width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.card {
  --c: var(--pink);
  position: relative; display: flex; align-items: center; gap: 22px; padding: 26px 28px;
  color: inherit; text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px));
  background: linear-gradient(135deg, rgba(40, 6, 52, 0.85), rgba(10, 4, 30, 0.85));
  transition: transform 0.25s;
}
.card.cyan { --c: var(--cyan); }
/* 枠は 2 重の clip-path で描く（内側を抜く） */
.frame { position: absolute; inset: 0; pointer-events: none; background: var(--c);
  clip-path: polygon(0 0, calc(100% - 26px) 0, 100% 26px, 100% 100%, 26px 100%, 0 calc(100% - 26px), 0 0, 2px 2px, 2px calc(100% - 26.8px), 26.8px calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 26.8px, calc(100% - 26.8px) 2px, 2px 2px);
  filter: drop-shadow(0 0 6px var(--c)) drop-shadow(0 0 16px var(--c));
  animation: breathe 3.2s ease-in-out infinite;
}
.card.cyan .frame { animation-delay: -1.6s; }
@keyframes breathe { 0%, 100% { opacity: 0.65; } 50% { opacity: 1; } }
.card::after { content: ""; position: absolute; right: 44px; top: 12px; width: 54px; height: 8px; background: repeating-linear-gradient(115deg, var(--c) 0 8px, transparent 8px 14px); opacity: 0.9; }
.card img { width: 96px; height: 96px; border-radius: 20px; flex: none; box-shadow: 0 0 0 2px var(--c), 0 0 24px var(--c); }
.card-text { display: grid; gap: 8px; }
.card-name { font-size: clamp(24px, 2.8vw, 34px); font-weight: 800; letter-spacing: 0.01em; }
.card-meta { color: var(--ink-soft); font-size: 15px; }
.card-meta em { white-space: nowrap; display: inline-block; font-style: normal; font-size: 11px; letter-spacing: 0.12em; margin-left: 6px; padding: 2px 8px; border: 1px solid var(--cyan); color: var(--cyan); text-shadow: 0 0 6px var(--cyan); }
.card-ver { display: block; font-size: 12px; color: var(--ink-soft); letter-spacing: 0.04em; }
.card-ver em { font-style: normal; font-size: 11px; letter-spacing: 0.12em; padding: 2px 8px; border: 1px solid var(--cyan); color: var(--cyan); text-shadow: 0 0 6px var(--cyan); white-space: nowrap; }
.stores { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.store { position: relative; z-index: 1; padding: 6px 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.06em; color: #fff; text-decoration: none; border: 1px solid var(--c); box-shadow: 0 0 10px var(--c), inset 0 0 8px rgba(255, 255, 255, 0.08); transform: skewX(-10deg); transition: background 0.2s, box-shadow 0.2s; }
.store:hover, .store:focus-visible { outline: none; background: var(--c); color: #0a0414; box-shadow: 0 0 18px var(--c); }
.card:hover, .card:focus-visible { outline: none; animation: cardGlitch 0.32s steps(2) 1; transform: translateY(-3px); }
.card:hover .frame, .card:focus-visible .frame { opacity: 1; filter: drop-shadow(0 0 8px var(--c)) drop-shadow(0 0 28px var(--c)); }
@keyframes cardGlitch { 0% { transform: translate(0); } 25% { transform: translate(-4px, 1px) skewX(-2deg); } 50% { transform: translate(3px, -2px); } 75% { transform: translate(-2px, 0) skewX(2deg); } 100% { transform: translateY(-3px); } }

/* ---- 上部のバー（パンくず＋言語） ---- */
.topbar {
  position: sticky; top: 0; z-index: 6; display: flex; align-items: center; gap: 12px;
  padding: 10px clamp(12px, 3vw, 28px); background: rgba(7, 2, 15, 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 47, 179, 0.35); box-shadow: 0 1px 18px rgba(255, 47, 179, 0.18);
}
.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; }
.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; }
.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 { flex: none; display: inline-flex; padding: 3px; 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.3); }
.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; }
.lang button[aria-pressed="true"] { background: var(--cyan); color: #04121a; box-shadow: 0 0 12px var(--cyan); }
@media (max-width: 600px) {
  .crumb-text { display: none; }
  .crumbs a { padding: 8px 10px; }
  .lang button { padding: 7px 6px; }
}

/* ---- リンク（平行四辺形） ---- */
.links { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 28px; }
.link {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 15px 22px;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: clamp(14px, 1.5vw, 17px);
  border: 2px solid var(--cyan); transform: skewX(-14deg);
  box-shadow: 0 0 10px rgba(33, 230, 255, 0.55), inset 0 0 10px rgba(33, 230, 255, 0.35);
  background: rgba(6, 20, 40, 0.55); transition: background 0.2s, box-shadow 0.2s;
}
.link > * , .link { text-shadow: 0 0 8px rgba(33, 230, 255, 0.6); }
.link i { font-style: normal; transition: transform 0.2s; }
.link:hover, .link:focus-visible { outline: none; background: rgba(33, 230, 255, 0.16); box-shadow: 0 0 18px var(--cyan), inset 0 0 18px rgba(33, 230, 255, 0.5); }
.link:hover i { transform: translateX(5px); }
.foot { color: var(--ink-soft); font-size: 14px; letter-spacing: 0.06em; text-shadow: 0 0 10px var(--pink); }

/* ---- 起動演出（boot）: ちらつきながら点灯 ---- */
.boot { opacity: 0; }
.is-on .boot { animation: flickerOn 0.9s linear forwards; }
@keyframes flickerOn { 0% { opacity: 0; } 10% { opacity: 0.8; } 14% { opacity: 0.1; } 22% { opacity: 0.9; } 26% { opacity: 0.3; } 40%, 100% { opacity: 1; } }

@media (max-width: 760px) {
  .sign-left { font-size: 30px; top: auto; bottom: 24px; opacity: 0.3; }
  .sign-right { display: none; }
  .card { padding: 20px; gap: 16px; }
  .card img { width: 68px; height: 68px; border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .frame, .title.glitch, .title.glitch::before, .title.glitch::after, .card:hover { animation: none; }
  .boot { opacity: 1; } .is-on .boot { animation: none; }
}

/* 日本語以外の小見出しは文字間隔を詰める（長い文になるため） */
html:not([lang="ja"]) .subtitle { letter-spacing: 0.08em; font-family: "Avenir Next", system-ui, sans-serif; font-style: italic; }

/* ---- 言語の選択（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.3); 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; } }
