@charset "utf-8";

/* =========================================================================
   高島宗一郎 公式ファンサイト — AR カメラ（/ar）

   発注者指示 2026-10-06「壁や床にかざしたらそこに額縁が現れて、そこでスライドショーが流れるように」
   「今ページにある高島さんのプロフィールも、その横でゆっくり流れていく仕掛けに」
   「アウトカムとインカム両方の切り替えができるように」。

   画面いっぱいにカメラの映像（<video>）を敷き、その上の透明な <canvas>（WebGL）に
   額縁とプロフィールの板を描く。ボタンや案内はさらにその上の普通の HTML。
   動かし方と描き方は js/ar.js。色はサイトの紺（#091a35）と金（#e9d07a）。
   ========================================================================= */

:root {
  --ar-ink: #091a35;
  --ar-ink-2: #050f21;
  --ar-gold: #e9d07a;
  --ar-gold-2: #c9ab45;
  --ar-on-gold: #24304a;
  --ar-text: #f1e9d2;
  --ar-muted: #cfd8e6;
  --ar-glass: rgba(9, 26, 53, .62);
  --ar-line: rgba(233, 208, 122, .45);
}

html { -webkit-text-size-adjust: 100%; height: 100%; }

body.ar {
  margin: 0;
  height: 100%;
  overflow: hidden;
  color: var(--ar-text);
  background: var(--ar-ink-2);
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  font-feature-settings: 'palt';
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

/* --- 映像と額縁 ---------------------------------------------------------- */

/* 指でなぞると額縁が動く。ブラウザのスクロールや拡大には渡さない */
.ar-stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(233, 208, 122, .10), transparent 60%),
    linear-gradient(180deg, #13284a 0%, #0a1b36 100%);
}

.ar-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  opacity: 0;
  transition: opacity .3s ease;
}
.ar-video.is-on { opacity: 1; }
/* 内カメラは鏡のように左右を返して見せる（自分が動く向きと画面が合う）。
   額縁の位置も js/ar.js が同じように返して描き、字だけは読める向きに戻す */
.ar-video.is-mirror { transform: scaleX(-1); }

/* カメラが無い・使えないときの見本の壁（パソコンなど） */
.ar-stage.is-sample {
  background:
    radial-gradient(70% 55% at 50% 42%, rgba(255, 248, 230, .16), transparent 70%),
    linear-gradient(180deg, #e9e3d6 0%, #d8d0c0 62%, #b9ae99 62.2%, #a99d87 100%);
}

.ar-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* 画面の読み上げ用に置いておくプロフィールと写真の一覧（見た目には出さない。額縁の中身は js/ar.js が描く） */
.ar-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* --- 上の帯 ---------------------------------------------------------------- */

/* 上の帯は、はじめの案内や撮った写真の上にも出す（ホームへ戻る・シェアは、いつでも押せるように） */
.ar-top {
  position: fixed;
  z-index: 11;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 8px;
  background: linear-gradient(180deg, rgba(5, 15, 33, .66), rgba(5, 15, 33, 0));
  pointer-events: none;
}
.ar-top > * { pointer-events: auto; }

.ar-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  background: var(--ar-glass);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ar-back img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: #fff; }
/* ボタンの字は折らない（細い画面で「ホーム／へ」「シェ／ア」と割れないように）。足りないときは題を詰める */
.ar-back, .ar-share { flex-shrink: 0; white-space: nowrap; }

.ar-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0 auto 0 0;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .04em;
  color: var(--ar-gold);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
  white-space: nowrap;
}

/* 右上のシェア（発注者指示 2026-10-06）。送る住所は LINE で開いても外のブラウザが開く形（js/ar.js） */
.ar-share {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  background: var(--ar-glass);
  border: 1px solid rgba(233, 208, 122, .55);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ar-share svg { width: 20px; height: 20px; color: var(--ar-gold); }
.ar-share:active { transform: scale(.96); }
/* 共有シートの無いブラウザで、リンクを写したことを知らせる吹き出し（ボタンの下） */
.ar-share__tip {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(9, 26, 53, .92);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}
.ar-share__tip.is-on { opacity: 1; transform: none; }

/* 320px 幅の端末でも、ホームへ・題・シェアが 1 列に収まるように少し詰める */
@media (max-width: 340px) {
  .ar-top { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .ar-share { padding: 0 11px 0 9px; }
}

/* --- 案内の札 --------------------------------------------------------------- */

.ar-hint {
  position: fixed;
  z-index: 5;
  left: 50%;
  top: calc(env(safe-area-inset-top, 0px) + 66px);   /* 左下に置く物のボタンが積まれるので、上に出す */
  transform: translateX(-50%);
  width: max-content;
  max-width: min(92vw, 440px);
  box-sizing: border-box;
  margin: 0;
  padding: 9px 16px;
  border-radius: 14px;
  background: var(--ar-glass);
  border: 1px solid rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity .35s ease;
  pointer-events: none;
}
.ar-hint:empty { opacity: 0; }
.ar-hint__sub { display: inline-block; }   /* 補足の（…）は割らずに次の行へ */

/* --- 下の操作 --------------------------------------------------------------- */

.ar-bottom {
  position: fixed;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;   /* 左に置く物のボタンが積まれても、シャッターと切り替えは下の段にそろえる */
  padding: 16px 18px calc(env(safe-area-inset-bottom, 0px) + 18px);
  background: linear-gradient(0deg, rgba(5, 15, 33, .72), rgba(5, 15, 33, 0));
}

.ar-side {
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 64px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  cursor: pointer;
  touch-action: manipulation;
}
.ar-side__ic {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ar-glass);
  border: 1px solid rgba(255, 255, 255, .22);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.ar-side__ic svg { width: 24px; height: 24px; }
.ar-side:active .ar-side__ic { transform: scale(.94); }
.ar-side[disabled] { opacity: .4; cursor: default; }
.ar-side__tx { text-shadow: 0 1px 4px rgba(0, 0, 0, .6); white-space: nowrap; }

/* 置く物のボタン（発注者指示 2026-10-06 の 3 回目「置き直すは『プロフィールを配置する』に」「『高島TVを配置する』
   『もちのロンを配置する』を追加」）。左下（前の「置き直す」の場所）にプロフィール、その上に高島TV・もちのロンを
   縦に積む。名前は 2 行。丸の右肩に、いま置いている数 */
.ar-place {
  justify-self: center;
  align-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.ar-place .ar-side { gap: 3px; min-width: 76px; }
.ar-place .ar-side__ic { position: relative; width: 46px; height: 46px; }
.ar-place .ar-side__ic svg { width: 26px; height: 26px; }
.ar-place .ar-side__tx { font-size: 11.5px; line-height: 1.22; text-align: center; }
.ar-place__n {
  position: absolute;
  top: -5px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 10px;
  background: var(--ar-gold);
  color: #13294a;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 19px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.ar-place__n:empty { display: none; }
/* 背の低い画面（横向きなど）では、3 つを 1 段に並べて、名前は 1 行に */
@media (max-height: 560px) {
  .ar-place { flex-direction: row; gap: 4px; }
  .ar-place .ar-side { min-width: 0; }
  .ar-place .ar-side__tx br { display: none; }
  .ar-place .ar-side__tx { font-size: 10.5px; }
}

/* シャッター。金の輪の中に白い丸 */
.ar-shutter {
  width: 76px;
  height: 76px;
  padding: 0;
  border-radius: 50%;
  border: 4px solid var(--ar-gold);
  background: radial-gradient(circle, #fff 0 58%, rgba(255, 255, 255, .0) 59%);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .45);
  cursor: pointer;
  touch-action: manipulation;
}
.ar-shutter:active { transform: scale(.93); }
.ar-shutter[disabled] { opacity: .45; cursor: default; }

/* 撮った瞬間の白い光 */
.ar-flash {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.ar-flash.is-on { animation: arFlash .45s ease-out; }
@keyframes arFlash { 0% { opacity: .85; } 100% { opacity: 0; } }

/* --- はじめの案内 ------------------------------------------------------------- */

.ar-intro {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: calc(env(safe-area-inset-top, 0px) + 64px) 18px calc(env(safe-area-inset-bottom, 0px) + 24px);
  overflow-y: auto;
  background: rgba(5, 15, 33, .78);
}
.ar-intro[hidden] { display: none; }

.ar-card {
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  padding: 24px 22px 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, #13284a 0%, #0b1c38 100%);
  border: 1px solid var(--ar-line);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.ar-card__kicker {
  margin: 0;
  color: var(--ar-gold);
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: .24em;
}
.ar-card__title {
  margin: 6px 0 0;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.4;
}
.ar-card__lead {
  margin: 12px 0 0;
  color: var(--ar-muted);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.85;
}
.ar-card__list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.ar-card__list li {
  position: relative;
  padding-left: 18px;
  color: var(--ar-text);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.7;
}
.ar-card__list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: .68em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ar-gold);
}
.ar-card__note {
  margin: 12px 0 0;
  color: #b9c6db;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.75;
}
.ar-card__note:empty { display: none; }
.ar-card__note a { color: var(--ar-gold); }

.ar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  margin-top: 18px;
  padding: 12px 18px;
  box-sizing: border-box;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(180deg, #f2dc8e 0%, #d9b64f 100%);
  color: var(--ar-on-gold);
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35);
  cursor: pointer;
  touch-action: manipulation;
}
.ar-btn[hidden] { display: none; }   /* 「見本で見る」は、カメラを断られたときだけ出す */
.ar-btn:active { transform: scale(.98); }
.ar-btn[disabled] { opacity: .6; cursor: default; }
.ar-btn--quiet {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .24);
  color: #fff;
  box-shadow: none;
}

/* --- 撮った写真 ---------------------------------------------------------------- */

.ar-shot {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 66px) 16px calc(env(safe-area-inset-bottom, 0px) + 16px);
  box-sizing: border-box;
  background: rgba(5, 15, 33, .94);
}
.ar-shot[hidden] { display: none; }
.ar-shot__img {
  flex: 1;
  min-height: 0;
  max-width: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  /* 長押しで「写真に保存」を出せるように、ここだけは選べる・押さえられるようにする */
  -webkit-touch-callout: default;
  user-select: auto;
  -webkit-user-select: auto;
}
.ar-shot__row {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}
.ar-shot__row .ar-btn { margin-top: 0; }
.ar-shot__note {
  margin: 0;
  max-width: 420px;
  color: #b9c6db;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .ar-flash.is-on { animation: none; }
  .ar-video { transition: none; }
}
