/* スマホのファーストビュー：アーチの下に残る帯へ「つくれるもの」を置き、何の人かを最初の画面で伝える。
   アーチは top 76px・高さ min(69svh, 610px)（neo-rebuild.css）なので、その下端から並べる。 */
.hero-disciplines { display: none; }

@media (max-width: 600px) and (min-height: 560px) {
  .hero.hero--cinematic > .hero-disciplines {
    position: absolute;
    z-index: 4;
    top: calc(76px + min(69svh, 610px));
    right: 16px;
    bottom: 0;
    left: 16px;
    display: flex;
    flex-direction: column;
    /* 下端から一定の余白で置き、上に残る余白に東京の表示を挟む。アーチ・表示・見出し・タイルの間隔がそろう */
    justify-content: flex-end;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    text-align: center;
  }
  /* 見出し：英字の小さなラベルと日本語を、左右の細い光の線で挟む */
  .hero-disciplines-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 0 10px;
    color: var(--neo-gold-light);
    font: 600 .74rem/1.4 'Chakra Petch', 'Noto Sans JP', sans-serif;
    letter-spacing: .16em;
  }
  /* 見出しは英語だけ。日本語は読み上げ用に残している（sr-only） */
  .hero-disciplines-label span[lang="en"] {
    color: var(--neo-gold-light);
    font-size: .72rem;
    letter-spacing: .3em;
  }
  .hero-disciplines-label::before,
  .hero-disciplines-label::after {
    content: "";
    flex: 1;
    max-width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232,201,121,.7));
  }
  .hero-disciplines-label::after { background: linear-gradient(90deg, rgba(232,201,121,.7), transparent); }
  /* 6つの制作領域を、計器のパネルのような角の立ったタイルで一列に並べる */
  .hero-disciplines ul { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; margin: 0; padding: 0; list-style: none; }
  .hero-disciplines a {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 54px;
    padding: 6px 2px;
    border: 1px solid rgba(120,247,232,.26);
    border-radius: 6px;
    background: linear-gradient(180deg, rgba(12,30,32,.86), rgba(3,9,11,.9));
    box-shadow: inset 0 1px 0 rgba(186,255,245,.12);
    color: #eefcfa;
    font-size: .8rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: .02em;
    text-decoration: none;
    transition: border-color 160ms ease, background-color 160ms ease, transform 120ms ease;
  }
  /* 左上と右下の角だけ光らせ、照準のような縁取りにする */
  .hero-disciplines a::before,
  .hero-disciplines a::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: var(--neo-tiffany);
    border-style: solid;
    pointer-events: none;
  }
  .hero-disciplines a::before { top: -1px; left: -1px; border-width: 1.5px 0 0 1.5px; border-top-left-radius: 6px; }
  .hero-disciplines a::after { right: -1px; bottom: -1px; border-width: 0 1.5px 1.5px 0; border-bottom-right-radius: 6px; }
  /* タイルも英語が主役。日本語はその下に小さく添える */
  .hero-discipline-en {
    color: #eefcfa;
    font: 700 .7rem/1 'Chakra Petch', sans-serif;
    letter-spacing: .08em;
  }
  .hero-discipline-ja {
    color: rgba(120,247,232,.8);
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .04em;
  }
  .hero-disciplines a:active { border-color: rgba(120,247,232,.7); background: rgba(16,44,44,.95); transform: scale(.96); }
  .hero-disciplines a:focus-visible { outline: 2px solid var(--neo-tiffany); outline-offset: 2px; }
  /* 背の低い画面では、下の余白とタイルを少し詰めて、東京の表示が挟まる間を残す */
  @media (max-height: 700px) {
    .hero.hero--cinematic > .hero-disciplines { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
    .hero-disciplines-label { margin-bottom: 7px; }
    .hero-disciplines a { min-height: 48px; }
  }
  /* 入場演出中は、タイトルと一緒に消える */
  .hero-entry[data-entry="on"] .hero-disciplines { opacity: var(--entry-title, 1); }
}

/* スマホ：ファーストビューの直後に、実作品と遊べるゲームを先に見せる。
   PC（861px以上）では表示しない。ナビが切り替わる 860px に合わせている。 */
.mobile-teaser { display: none; }

@media (max-width: 860px) {
  .mobile-teaser { display: block; padding: 48px 0 8px; background: #030506; }
  .mobile-teaser--play { padding: 40px 0 56px; }

  /* 見出し：印と英字の行、大きな日本語、中央に金を置いた線 */
  .mobile-teaser-head { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 20px 20px; padding-bottom: 14px; border-bottom: 1px solid rgba(120,247,232,.2); text-align: center; }
  .mobile-teaser-head::after { content: ''; position: absolute; left: 50%; bottom: -1px; width: 48px; height: 1px; background: var(--neo-gold-light); transform: translateX(-50%); }
  .mobile-teaser-kicker { margin: 0; color: var(--neo-tiffany); font: 600 .72rem/1.4 'Chakra Petch', sans-serif; letter-spacing: .2em; }
  .mobile-teaser-kicker b { margin-right: .7em; color: var(--neo-gold-light); font-weight: 600; }
  .neo-home .mobile-teaser h2 { margin: 0; color: var(--neo-gold-light); font-size: 1.7rem; font-weight: 700; line-height: 1.3; letter-spacing: .02em; text-align: center; background: none; -webkit-text-fill-color: currentColor; text-shadow: none; }
  .mobile-teaser-hint { margin: 0; color: var(--neo-gold-light); font: 600 .72rem/1.4 'Chakra Petch', sans-serif; letter-spacing: .16em; white-space: nowrap; }
  .mobile-teaser-note { margin: 2px 0 0; color: rgba(232,240,239,.76); font-size: .875rem; line-height: 1.6; }

  /* 作品の横スワイプ帯：次のカードが少し見えるので、横に動かせると分かる */
  .mobile-works-track { display: flex; gap: 12px; margin: 0; padding: 0 20px 8px; list-style: none; counter-reset: neo-work; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none; }
  .mobile-works-track::-webkit-scrollbar { display: none; }
  .mobile-works-track li { flex: 0 0 62%; max-width: 260px; scroll-snap-align: start; counter-increment: neo-work; }

  /* 2026-11-16 作品の帯を映写室のように: 余白を詰め、カードは中央で止まり、中央の1枚だけが手前で明るく、
     動画のある作品はその1枚だけが音なしで動く（mobile-teaser.js）。両脇は少し小さく暗く奥に並ぶ。
     「動きを減らす」がオンのときは大きさも明るさも揃えて、画像のまま */
  .mobile-teaser:not(.mobile-teaser--play) { position: relative; z-index: 2; margin-top: -96px; padding-top: 32px; background: linear-gradient(to bottom, rgba(3,5,6,0), #030506 96px); }
  .mobile-works-track { --card: min(64vw, 260px); padding-inline: calc((100% - var(--card)) / 2); scroll-padding-inline: 0; }
  .mobile-works-track li { flex-basis: var(--card); max-width: none; scroll-snap-align: center; }
  html[data-motion="on"] .mobile-works-track li { transition: transform .45s cubic-bezier(.2,.7,.2,1), opacity .45s ease; transform: scale(.88); opacity: .5; }
  html[data-motion="on"] .mobile-works-track li.is-center { transform: none; opacity: 1; }
  /* 指の動きにそのまま合わせられるブラウザでは、スクロールの位置で滑らかに変える */
  @supports (animation-timeline: view()) {
    html[data-motion="on"] .mobile-works-track li { transition: none; animation: neo-work-focus linear both; animation-timeline: view(inline); }
    @keyframes neo-work-focus {
      0%, 100% { transform: scale(.86); opacity: .45; }
      50% { transform: none; opacity: 1; }
    }
  }
  .mobile-work-preview { position: absolute; z-index: 0; inset: 0 0 auto; width: 100%; height: calc(100% - 64px); object-fit: cover; object-position: 50% 0; opacity: 0; transition: opacity .8s ease; pointer-events: none; }
  .mobile-work-preview.is-playing { opacity: 1; }
  .mobile-work-card .holo-foil { z-index: 1; }

  /* 何作品中の何番目か。番号はスワイプに合わせて変わる */
  .mobile-works-count { display: inline-flex; align-items: baseline; gap: .45em; color: rgba(232,240,239,.6); letter-spacing: .14em; font-variant-numeric: tabular-nums; }
  .mobile-works-count b { color: var(--neo-gold-light); font-size: .95rem; font-weight: 600; }
  .mobile-works-count span { color: rgba(120,247,232,.5); }

  /* 作品カード：絵の下に文字の板を分けて置き、ポスターの文字と題名が重ならないようにする。右上だけ角を落とす */
  .mobile-work-card { --line: rgba(120,247,232,.32); position: relative; display: flex; flex-direction: column; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--line); background: #070d0f; color: #fff; text-decoration: none; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
  .mobile-work-card picture, .mobile-play-card picture { display: contents; }
  .mobile-work-card img { display: block; flex: 1 1 0; width: 100%; min-height: 0; object-fit: cover; object-position: 50% 0; }
  .mobile-work-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(225deg, transparent 10.6px, var(--line) 10.6px, var(--line) 12px, transparent 12px); pointer-events: none; }
  .mobile-work-tag { order: 1; display: block; padding: 11px 14px 0; text-align: center; border-top: 1px solid var(--line); color: var(--neo-tiffany); font-size: .75rem; line-height: 1.4; letter-spacing: .04em; white-space: nowrap; }
  .mobile-work-tag::before { content: counter(neo-work, decimal-leading-zero); margin-right: .7em; color: var(--neo-gold-light); font: 600 .75rem/1 'Chakra Petch', sans-serif; letter-spacing: .08em; }
  .mobile-work-card strong { order: 2; padding: 3px 14px 13px; text-align: center; overflow: hidden; font: 700 1.02rem/1.35 'Chakra Petch', 'Noto Sans JP', sans-serif; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
  /* 虹色の光は絵の上だけを通り、文字の板にはかからない */
  .mobile-work-card .holo-foil { bottom: 68px; }
  .mobile-work-card--more { display: grid; place-content: center; gap: 10px; background: #071012; color: var(--neo-tiffany); font-weight: 600; text-align: center; }

  /* 帯のどこを見ているかを示す細い線。対応しないブラウザでは出さない */
  .mobile-works-rail { display: none; }
  @supports (animation-timeline: scroll()) {
    .mobile-teaser:has(.mobile-works-rail) { timeline-scope: --neo-works; }
    .mobile-works-track { scroll-timeline: --neo-works inline; }
    .mobile-works-rail { display: block; height: 1px; margin: 12px 20px 0; background: rgba(120,247,232,.18); }
    .mobile-works-rail span { display: block; height: 100%; background: var(--neo-gold-light); transform-origin: 0 50%; animation: neo-works-rail linear both; animation-timeline: --neo-works; }
    @keyframes neo-works-rail { from { transform: scaleX(.2); } to { transform: scaleX(1); } }
  }

  /* いま遊べるゲーム：画面いっぱいの横長で見せ、右下に「遊ぶ」のボタンを置く */
  .mobile-play-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 0 20px; }
  .mobile-play-card { --line: rgba(120,247,232,.32); position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "shot shot" "name action" "genre action"; align-items: center; column-gap: 12px; overflow: hidden; border: 1px solid var(--line); background: #070d0f; color: #fff; text-decoration: none; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%); }
  .mobile-play-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(225deg, transparent 10.6px, var(--line) 10.6px, var(--line) 12px, transparent 12px); pointer-events: none; }
  .mobile-play-card img { grid-area: shot; display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
  .mobile-play-name { grid-area: name; align-self: end; padding: 13px 0 0 14px; font: 700 1.08rem/1.25 'Chakra Petch', sans-serif; letter-spacing: .05em; }
  .mobile-play-genre { grid-area: genre; align-self: start; padding: 3px 0 14px 14px; color: rgba(232,240,239,.76); font-size: .8125rem; line-height: 1.4; }
  .mobile-play-action { grid-area: action; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 12px 14px 12px 0; padding: 0 16px; background: var(--neo-tiffany); color: #03211e; font: 700 .9375rem/1 'Chakra Petch', sans-serif; letter-spacing: .1em; white-space: nowrap; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
  .mobile-play-action::before { content: ''; width: 0; height: 0; border-block: 5px solid transparent; border-left: 8px solid currentColor; }

  /* カードの角を落としているので、キーボードで選んだ枠は内側に描く */
  .mobile-work-card:focus-visible, .mobile-play-card:focus-visible { outline: 2px solid var(--neo-gold-light); outline-offset: -4px; }
  .mobile-work-card:active, .mobile-play-card:active { transform: scale(.98); }
}

/* タブレットの幅なら、ゲームは2枚並べても小さくならない */
@media (min-width: 640px) and (max-width: 860px) {
  .mobile-play-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones held sideways: keep each card within the short screen so it can be seen whole. */
@media (max-width: 860px) and (max-height: 500px) and (orientation: landscape) {
  .mobile-works-track { --card: min(34vw, 200px); }
  .mobile-works-track li { flex-basis: var(--card); max-width: none; }
  .mobile-play-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; margin-inline: auto; }
}

@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  .mobile-work-card, .mobile-play-card { transition: transform 160ms ease; }
}

/* 「NEOがつくれるもの」のWebから飛んだとき、カードの見出しがヘッダーに隠れないようにする */
#web-dev { scroll-margin-top: 104px; }

/* Three games (2026-11-15): AURORA across the top, the two phone-sized games side by side under it. */
@media (max-width: 860px) {
  .mobile-play-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .mobile-play-card:not(.mobile-play-card--tall) { grid-column: 1 / -1; }
  .mobile-play-card--tall { grid-template-columns: minmax(0, 1fr); grid-template-areas: "shot" "name" "genre" "action"; }
  .mobile-play-card--tall img { aspect-ratio: 4 / 5; object-position: 50% 6%; }
  .mobile-play-card--tall .mobile-play-name { padding: 11px 12px 0; font-size: 1rem; }
  .mobile-play-card--tall .mobile-play-genre { padding: 2px 12px 0; }
  .mobile-play-card--tall .mobile-play-action { justify-content: center; margin: 12px; }
}
