/*
  ブラウザ版の見た目。

  🔴 **色と寸法はアプリから写したもの**(2026-09-12 / 事業主指示)。
     元: `unity/Assets/_APP/Runtime/Ui/Theme.cs`(さらにその元は `proto/mock.html` の :root)。
     ⚠️ **ここで新しい色や寸法を考えないこと。** 「ブラウザだけ違う見た目」になり、
        事業主の「ブラウザはアプリの機能を絞った版」という前提が崩れる。
     ⚠️ 直すときは Theme.cs 側も一緒に見ること。片方だけ変えない。

  ⚠️ ここに文字を書かない(content: "..." を使わない)。画面に出る文字は Copy から。

  ⚠️ 🔴 **アプリの面は2種類ある**(Theme.cs の区分)。混ぜないこと。
       ・AR面(カメラタブ・板)… 端末のテーマに追従しない「ARの制服」。暗い面に固定
       ・ライト面(マップ・自分・設定)… こちらも固定。端末のダークに追従しない
     追従させると、アプリと見た目が食い違う。
*/

:root {
  /* --- AR面(Theme.ArGround / ArLift / ArInk / ArInkDim / ArScrim) --- */
  --ar-ground: #0B0E13;
  --ar-lift: #151A22;
  --ar-ink: #EDEAE3;
  --ar-ink-dim: #98A2B1;
  --ar-scrim: rgba(6, 9, 14, .62);
  --ar-scrim-hi: rgba(6, 9, 14, .86);
  --ar-edge: rgba(237, 234, 227, .16);
  --ar-edge-soft: rgba(237, 234, 227, .08);
  --ar-field: rgba(8, 11, 16, .6);
  --ar-placeholder: #6B7583;   /* Theme.DarkPlacehold */
  --dark-danger: #FF7A68;      /* Theme.DarkDanger(暗い面の「削除」「通報」) */

  /* --- 温度スケール(Theme.TCold / TMid / TWarm / THot) --- */
  --t-cold: #6E9BC4;
  --t-mid: #E4DED2;
  --t-warm: #F2A24E;
  --t-hot: #F2503C;

  /* 「自分」の軸。群衆の人気(温度)とは別の軸(D-008 / Theme.Mine) */
  --mine: #4FE0B8;

  /* --- ライト面(Theme.SBg / SSub / SText / STextSub / SLine / SDanger) --- */
  --s-bg: #FBFAF7;
  --s-sub: #F1EEE8;
  --s-text: #16181D;
  --s-text-sub: #5C6270;
  --s-line: #E4E0D8;
  --s-danger: #B8402F;
  --tab-idle: #9AA0AC;         /* Theme.TabIdleLight */
  --me-faded: #A2A7B2;         /* Theme.MeFadedText */

  /* --- マップ(Theme.MapGround / MapDot) --- */
  --map-ground: #F4F1EB;
  --map-dot: #3E4452;

  /* 見本データの帯。🔴 開発者向け。本番では絶対に出ない */
  --sample: #f2c14e;

  /* --- 寸法(Theme.cs の「モックの CSS px」)。⚠️ 数値を勝手に変えない --- */
  --tab-h: 76px;               /* Theme.TabBarH */
  --head-h: 60px;              /* Theme.PageHeadH */
  --sheet-radius: 24px;        /* Theme.SheetRadius */
  --btn-radius: 13px;          /* Theme.BtnRadius */
  --field-radius: 11px;        /* Theme.FieldRadius */
  --row-h: 50px;               /* Theme.RowHeight */
  --toast-radius: 12px;        /* Theme.ToastRadius */
  --toast-bottom: 96px;        /* Theme.ToastBottom */

  /* アプリの動き(Theme.SheetDur / ScrimDur と、その cubic-bezier) */
  --sheet-dur: .42s;
  --scrim-dur: .28s;
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  /*
    ⚠️ アプリは "Zen Kaku Gothic New" を使っている(proto/mock.html の --font-ui)。
       ブラウザ版では**webフォントを読みに行かない**。外の部品を足さない決めごと
       (WEB.md §1)と、読みに来た人を待たせないため。並びだけアプリに寄せてある。
  */
  --font-ui: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  /* 古いページ(u.html / contact.html)が使っている名前。⚠️ 消さないこと */
  --bg: var(--s-bg);
  --fg: var(--s-text);
  --ink: var(--s-text);
  --sub: var(--s-text-sub);
  --line: var(--s-line);
  --pin: var(--t-hot);
  --accent: var(--s-text);
}

* { box-sizing: border-box; }

/* ⚠️ hidden を効かせる。下で display を指定している要素は、これが無いと隠れない */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--s-bg);
  color: var(--s-text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--t-hot); outline-offset: 2px; }

/* ==================================================================
   画面の器
   ⚠️ 🔴 `.shell` が付いている時だけ効かせる。
      `u.html` / `contact.html` も #app を使っているが、あちらは
      ふつうに縦に伸びるページ。ここを付けないと、あの2枚が潰れる。
   ================================================================== */

#app.shell {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

/* アプリの `.view`(proto/mock.html)と同じ扱い。画面は重ねて、1枚だけ出す */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.screen-light { background: var(--s-bg); color: var(--s-text); }

/* 🔴 AR面は端末のテーマに追従しない(Theme.cs「ARの制服」) */
.screen-dark {
  background: radial-gradient(130% 90% at 50% 8%, #1E2733, var(--ar-ground) 62%);
  color: var(--ar-ink);
}

/* ── 見本データの帯(🔴 開発者向け)────────────────────────── */

/*
  ⚠️ 🔴 **画面に被せないこと。** 帯は `position: fixed` で画面の外に出し、
     その高さぶん `#app.shell` を下げる(下の .has-banner)。
     被せると、マップと自分の見出しが帯の下に隠れる(2026-09-12 に実際にそうなった)。
*/
.sample-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  margin: 0;
  padding: calc(6px + env(safe-area-inset-top)) 12px 6px;
  background: var(--sample);
  color: #201a06;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

/* ⚠️ 帯の高さ(上の padding + 1行)。片方だけ変えるとずれる */
#app.shell.has-banner { top: calc(32px + env(safe-area-inset-top)); }

/* ── 画面の見出し(proto/mock.html の .pageHead / .mapHead)───── */

.page-head {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 24;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: calc(var(--head-h) + env(safe-area-inset-top));
  padding: calc(12px + env(safe-area-inset-top)) 18px 12px;
  background: var(--s-bg);
  border-bottom: 1px solid var(--s-line);
}

/* マップの見出しは地図の上に浮かせる(mock の .mapHead)。下ほど透ける */
.map-head {
  border-bottom: 0;
  background: linear-gradient(to bottom, var(--s-bg) 72%, rgba(251, 250, 247, 0));
}

/* カメラ面の見出しは「アプリで見る」だけ。⚠️ 地を塗らない(AR の邪魔になる) */
.page-head-dark {
  background: none;
  border-bottom: 0;
}

.page-title {
  margin: 0;
  font-size: 19px;          /* Theme.FsHead */
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.head-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: var(--s-text-sub);
  flex: none;
}

.icon-btn:hover { background: var(--s-sub); }
.icon-btn svg { width: 20px; height: 20px; }

/* ⚠️ 目立つが、読みに来た人の邪魔をしない大きさに留める(WEB.md §5) */
.app-link {
  flex: none;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--s-text);
  color: var(--s-bg);
  text-decoration: none;
  font-size: 12.5px;        /* Theme.FsSmall */
  font-weight: 700;
}

/* 暗い面の上では色を入れ替える(AR の制服に合わせる) */
.screen-dark .app-link { background: var(--ar-ink); color: var(--ar-ground); }

/* 行き先が無いリンク。⚠️ 隠さない(隠すと「設定が足りない」に気づけない)が、押せなくする。
   ⚠️ `.btn` も同じ扱いにしてあるのは、`open.html` のストアのボタンが `<a class="btn">` だから
      (2026-09-12)。**押せる見た目のまま何も起きない、を作らない。** */
.app-link[aria-disabled="true"],
a.btn[aria-disabled="true"] { opacity: .35; pointer-events: none; }

/* 見出しの下から、タブバーの上までを流す面(mock の .scroller) */
.scroller {
  position: absolute;
  inset: calc(var(--head-h) + env(safe-area-inset-top)) 0 var(--tab-h) 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ── 鍵が足りないときの案内(🔴 開発者向け)──────────────── */

/* ⚠️ .screen は overflow:hidden なので、中身が長くても読めるようにここで流す */
.stop {
  padding: calc(24px + env(safe-area-inset-top)) 16px 24px;
  max-width: 640px;
  overflow-y: auto;
}
.stop h2 { font-size: 17px; margin: 0 0 8px; }
.stop p { margin: 0 0 12px; white-space: pre-wrap; }

.stop-list {
  margin: 0;
  padding: 12px 12px 12px 28px;
  border: 1px solid var(--s-line);
  border-radius: 8px;
  background: var(--s-sub);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* ==================================================================
   [タブ1] カメラ
   🔴 ここに＋(新規投稿)を置かないこと。投稿はアプリだけ(WEB.md §0)
   ================================================================== */

.camera-body {
  position: absolute;
  inset: calc(var(--head-h) + env(safe-area-inset-top)) 26px var(--tab-h) 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
}

.camera-mark { width: 64px; height: 64px; color: var(--ar-ink-dim); opacity: .55; }

.camera-actions { width: 100%; max-width: 340px; }

/* ⚠️ 暗い面に置く「アプリで見る」。見出しの小さい丸薬とは別に、ここでは本文の大きさ */
.camera-actions .app-link {
  display: block;
  padding: 14px;
  border-radius: var(--btn-radius);
  font-size: 15px;          /* Theme.FsBtn */
  text-align: center;
}

/* 🔴 暗い面の注記(2026-09-15 / D-574)。
      ⚠️ 素の `.note` は明るい面の色(`--s-text-sub`)なので、カメラ面では**沈んで読めない**。
         ここだけ暗い面の色に振り替える(`.sheet-body .note` と同じ考え方)。 */
.camera-actions .note {
  color: var(--ar-ink-dim);
  margin: 10px 0 0;
  line-height: 1.55;
}

/* ==================================================================
   [タブ2] マップ
   🔴 **点だけ。** 本文も一覧もここに足さない(2026-09-12 / 事業主指示)
   ================================================================== */

.map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--map-ground);   /* 下地が敷けないときの地の色(Theme.MapGround) */
  touch-action: none;              /* 指で流す操作を自前で扱うため */
  cursor: grab;
  user-select: none;
}

.map-tiles, .map-markers { position: absolute; inset: 0; }
.map-markers { pointer-events: none; }

.map-tile {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/*
  「こと葉」1つ = 点1つ(legend_dot)。いいねが多いほど大きい(legend_size)。
  ⚠️ 色は Theme.MapDot(点そのものは色を持たない)。
     🔴 赤にしないこと。赤はエリアの密度と急上昇といいねのためのもの(D-008 / Theme.Like)。
        全部の点を赤くすると、その意味が消える。
*/
.map-pin {
  position: absolute;
  top: 0;
  left: 0;
  /* ⚠️ 当たり判定のぶんを見込んだ大きさ(22px)。**見える点はこれより小さい**(下の ::before)。
        点そのものを指の大きさまで膨らませると、密度が読めなくなる。 */
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  padding: 0;
  border: 0;
  background: none;
  display: grid;
  place-items: center;
  /*
    🔴 **点は押せない**(2026-09-12 / 事業主指示「ARの吹き出しをタップして通報」)。
       ⚠️ 指を通すので、点の上からでも地図をつかんで動かせる(前は点が指を吸っていた)。
       ⚠️ `auto` / `cursor: pointer` に戻さないこと。押せる見た目なのに何も起きない点になる
          (js/map.js `setMarkers` の注釈)。
  */
  pointer-events: none;
}

.map-pin::before {
  /* ⚠️ 文字ではない。ここに文言を書かないこと(このファイル頭の決めごと) */
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--map-dot);
  /* いいねが多いほど大きい(legend_size)。倍率は js/map.js が入れる */
  scale: var(--pin-scale, 1);
}

.map-pin.is-selected::before {
  box-shadow: 0 0 0 3px rgba(251, 250, 247, .9), 0 0 0 5px var(--map-dot);
}

.map-pin.is-selected { z-index: 2; }

/* 現在地。⚠️ 「こと葉」の点と見分けが付く形にすること。色は「自分」の軸(Theme.Mine) */
.map-me {
  position: absolute;
  top: 0;
  left: 0;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 3px solid var(--s-bg);
  border-radius: 50%;
  background: var(--mine);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

.map-attrib {
  position: absolute;
  right: 0;
  bottom: var(--tab-h);
  z-index: 24;
  margin: 0;
  padding: 2px 6px;
  background: rgba(251, 250, 247, .78);
  font-size: 10.5px;        /* Theme.FsMicro */
  color: var(--s-text-sub);
}

/* 凡例(mock の .mapLegend)。⚠️ 描いていないものを並べないこと */
.map-legend {
  position: absolute;
  left: 14px;
  /* ⚠️ 出典(.map-attrib)の1行ぶん上に置く。12px にすると重なって出典が読めない */
  bottom: calc(var(--tab-h) + 24px);
  z-index: 24;
  background: rgba(251, 250, 247, .93);
  backdrop-filter: blur(8px);
  border: 1px solid var(--s-line);
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leg-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;        /* Theme.FsTiny */
  color: var(--s-text-sub);
}

.leg-dot { border-radius: 50%; flex: none; background: var(--map-dot); }

.recenter {
  position: absolute;
  right: 16px;
  /* ⚠️ 凡例と同じ高さ。出典(.map-attrib)に被せないこと */
  bottom: calc(var(--tab-h) + 24px);
  z-index: 24;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--s-bg);
  border: 1px solid var(--s-line);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
  color: var(--s-text);
}

.recenter svg { width: 20px; height: 20px; }

/*
  読込中・通信できない・まだ無い、の1行。
  ⚠️ 🔴 **一覧ではない。** ここに「こと葉」を並べないこと(事業主指示)。
*/
.map-state {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(var(--head-h) + env(safe-area-inset-top) + 8px);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 32px);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--s-line);
  background: rgba(251, 250, 247, .95);
  font-size: 12.5px;
  color: var(--s-text-sub);
}

.chip {
  flex: none;
  padding: 5px 11px;
  border: 1px solid var(--s-line);
  border-radius: 999px;
  background: var(--s-bg);
  color: var(--s-text);
  font-size: 12.5px;
  font-weight: 700;
}

/* ==================================================================
   [タブ3] 自分(マイページ)/ 設定
   ================================================================== */

/* 自分の「こと葉」1件(mock の .postItem)。
   🔴 本文を出してよいのは**自分のもの**だけ(規約 第7・14条)。 */
.post-item {
  padding: 15px 18px;
  border-bottom: 1px solid var(--s-line);
}

.post-item .body {
  margin: 0 0 9px;
  font-size: 14.5px;        /* Theme.FsRow */
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.post-item .row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10.5px;        /* Theme.FsMicro */
  color: var(--s-text-sub);
}

/* 何も無いときの面(mock の .emptyMine) */
.empty-mine { padding: 60px 34px; text-align: center; }
.empty-mine p {
  margin: 0;
  font-size: 14px;
  color: var(--s-text-sub);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* まだ登録していない人への案内(me_title_guest)。板ではなく、この画面の中に出す */
.me-guest { padding: 44px 26px; text-align: center; }
.me-guest h2 { margin: 0 0 10px; font-size: 19px; font-weight: 700; }
.me-guest p {
  margin: 0 0 26px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--s-text-sub);
  white-space: pre-wrap;
}
.me-guest .btn { margin-bottom: 10px; }

/* 設定の行(mock の .settingGroup / .settingRow) */
.setting-group { margin-top: 14px; }

.setting-group > span {
  display: block;
  padding: 0 18px 7px;
  font-size: 10.5px;
  color: var(--s-text-sub);
  font-family: var(--font-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.setting-row {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--row-h);
  text-align: left;
  text-decoration: none;
  padding: 14px 18px;
  font-size: 14.5px;
  color: var(--s-text);
  background: var(--s-bg);
  border-top: 1px solid var(--s-line);
}

.setting-group .setting-row:last-child { border-bottom: 1px solid var(--s-line); }
.setting-row .val { margin-left: auto; color: var(--s-text-sub); font-size: 13px; }
.setting-row.danger { color: var(--s-danger); }

/* ==================================================================
   タブバー(proto/mock.html の .tabbar)
   ⚠️ 並びと呼び名はアプリと同じ。ここで変えないこと
   ================================================================== */

.tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 34;
  height: calc(var(--tab-h) + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  align-items: center;
}

.tabbar.on-light { background: var(--s-bg); border-top: 1px solid var(--s-line); }
.tabbar.on-dark { background: linear-gradient(to top, rgba(6, 9, 14, .92), rgba(6, 9, 14, 0)); }

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding-top: 8px;
}

.tab svg { width: 22px; height: 22px; }
.tab span { font-size: 10px; letter-spacing: .02em; }

.on-light .tab { color: var(--tab-idle); }
.on-light .tab[aria-current="true"] { color: var(--s-text); }
.on-dark .tab { color: var(--ar-ink-dim); }
.on-dark .tab[aria-current="true"] { color: var(--ar-ink); }

/* ==================================================================
   板(パネル)。アプリの Sheet と同じ出方(下からせり上がる暗い面)
   🔴 ここを独立画面にしないこと(STRUCTURE.md §2)
   ================================================================== */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 46;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-back {
  position: absolute;
  inset: 0;
  background: var(--ar-scrim);
  animation: scrim-in var(--scrim-dur) var(--ease-out);
}

@keyframes scrim-in { from { opacity: 0; } to { opacity: 1; } }

.sheet-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100% - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 18px calc(18px + env(safe-area-inset-bottom));
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  border-top: 1px solid var(--ar-edge);
  background: linear-gradient(180deg, #1B212B, #11151C);
  color: var(--ar-ink);
  animation: sheet-up var(--sheet-dur) var(--ease-out);
}

@keyframes sheet-up { from { transform: translateY(110%); } to { transform: none; } }

/* つまみ。アプリの板と同じ印 */
.grip {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(237, 234, 227, .22);
  margin: 6px auto 16px;
}

.sheet-body h2 {
  margin: 0 0 6px;
  font-size: 17px;          /* Theme.FsSheetH2 */
  font-weight: 700;
}

.sheet-body p {
  margin: 0 0 18px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ar-ink-dim);
  white-space: pre-wrap;
}

/*
  板の中の「こと葉」の案内。
  🔴 **ここに本文を入れないこと**(2026-09-12 / 事業主指示)。
     本文が読めるのは AR の中と、マイページの自分のものだけ。
*/
.sheet-lede { font-size: 14px !important; color: var(--ar-ink) !important; }

.sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ar-ink-dim);
}

/* 板の一番下に置く「アプリで見る」。⚠️ ボタンと同じ行に並ばせない */
.sheet-app-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ar-ink-dim);
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
}

/* 「ARで見る」。⚠️ 出せる端末にだけ出る(js/app.js の appendArEntry)。
   ⚠️ 「アプリで見る」の**上**に置く。置き換えではない(WEB.md §5) */
.sheet-ar { margin-top: 16px; }

.reasons { display: flex; flex-direction: column; gap: 0; margin: 0 -18px 12px; }

.reasons .btn {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 0;
  background: none;
  padding: 15px 18px;
  font-size: 14.5px;
  border: 0;
  border-bottom: 1px solid var(--ar-edge-soft);
}

.reasons .btn:last-child { border-bottom: 0; }

/* ==================================================================
   ボタン・入力欄
   ⚠️ 既定は**ライト面**の形。板(暗い面)の中では下で塗り替える。
      u.html / contact.html もこの既定を使っている。崩さないこと。
   ================================================================== */

.btn {
  display: block;
  width: 100%;
  text-align: center;
  border: 1px solid var(--s-line);
  border-radius: var(--btn-radius);
  padding: 14px;
  min-height: 48px;         /* Theme.BtnHeight */
  background: var(--s-bg);
  color: var(--s-text);
  font: inherit;
  font-size: 15px;          /* Theme.FsBtn */
  font-weight: 500;
  transition: transform .16s ease;
}

.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; }

.btn-primary { border-color: var(--s-text); background: var(--s-text); color: var(--s-bg); }
.btn-ghost { background: none; }
.btn-quiet { border-color: transparent; background: none; color: var(--s-text-sub); }
.btn-link {
  border: 0;
  background: none;
  color: var(--s-text-sub);
  text-decoration: underline;
  min-height: 0;
  padding: 10px 0 0;
  font-size: 13px;
}

.btn-danger { border-color: transparent; background: none; color: var(--s-danger); }

/* --- 板(暗い面)の中。mock の .sheet .btn-* と同じ --- */
.sheet-body .btn { border-color: rgba(237, 234, 227, .2); background: none; color: var(--ar-ink); }
.sheet-body .btn-primary { border-color: var(--ar-ink); background: var(--ar-ink); color: var(--ar-ground); }
.sheet-body .btn-quiet { border-color: transparent; color: var(--ar-ink-dim); }
.sheet-body .btn-link { color: var(--ar-ink-dim); }
.sheet-body .btn-danger { border-color: transparent; color: var(--dark-danger); }

.actions { display: flex; flex-direction: column; gap: 8px; }

.field { margin: 0 0 16px; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 11.5px;
  color: var(--s-text-sub);
}
.field input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--s-line);
  border-radius: var(--field-radius);
  background: var(--s-bg);
  color: var(--s-text);
  font: inherit;
  font-size: 15px;
}

.sheet-body .field label { color: var(--ar-ink-dim); }
.sheet-body .field input {
  background: var(--ar-field);
  border-color: rgba(237, 234, 227, .14);
  color: var(--ar-ink);
}
.sheet-body .field input::placeholder { color: var(--ar-placeholder); }
.sheet-body .field input:focus { outline: none; border-color: var(--mine); }

/* 知らせ(失敗・取り消しの誘い)。⚠️ 理由は出し分けない(D-270) */
.msg {
  margin: 0 0 12px !important;
  color: var(--s-danger) !important;
  font-size: 13px !important;
  white-space: pre-wrap;
}

.sheet-body .msg { color: var(--dark-danger) !important; }

.note { color: var(--s-text-sub); font-size: 12.5px; }
.sheet-body .note { color: var(--ar-ink-dim); }

/* その場かぎりの知らせ(アプリの Toast)。⚠️ 文字は Copy から */
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--toast-bottom) + env(safe-area-inset-bottom));
  z-index: 70;
  margin: 0;
  max-width: calc(100% - 40px);
  padding: 12px 16px;
  border-radius: var(--toast-radius);
  background: var(--ar-scrim-hi);
  color: var(--ar-ink);
  font-size: 13px;
  white-space: pre-wrap;
  text-align: center;
}

/* ==================================================================
   AR に重ねる器(抜ける道だけ)
   ================================================================== */

/*
  ⚠️ WebXR の `dom-overlay` が敷く面。セッションの間だけ出る。
  ⚠️ 背景を塗らないこと。塗るとカメラ映像が隠れる。
  ⚠️ 面そのものは指を通す(pointer-events: none)。受けるのは × のボタンだけ。
     通さないと、端末によっては AR 側のタップが全部この面に吸われる。
*/
.ar-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.ar-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
  pointer-events: auto;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(237, 234, 227, .55);
  border-radius: 999px;
  /* ⚠️ 景色の明るさに関係なく読めるよう、濃い地に固定する(ライト面の色を使わない) */
  background: var(--ar-scrim-hi);
  color: var(--ar-ink);
  font: inherit;
}

/* ==================================================================
   ほかのページ(u.html / contact.html)
   ⚠️ 🔴 これらは `#app.shell` を持たない**ふつうに伸びるページ**。
      上のタブや画面の決まりを当てないこと。
   ================================================================== */

/* /u/<ユーザーID> のページ(QR を読んだ人が来る所 / 2026-09-09)。
   ⚠️ 器だけ。文字は js/u.js が Copy から入れる。 */
.u-page { max-width: 30rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.u-card { padding: 1.5rem 0 0; }
.u-name { font-size: 1.35rem; font-weight: 700; line-height: 1.3; }
.u-handle { margin-top: .15rem; opacity: .6; font-size: .95rem; }
.u-title { margin: 1.75rem 0 .5rem; font-size: 1.1rem; font-weight: 700; }
.u-lede { margin: 0; opacity: .75; line-height: 1.7; white-space: pre-line; }
.u-actions { display: flex; flex-direction: column; gap: .6rem; margin-top: 1.5rem; }
.u-what { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--s-line); }
.u-what-title { margin: 0 0 .5rem; font-size: .95rem; font-weight: 700; opacity: .8; }
.u-what-body { margin: 0; opacity: .65; line-height: 1.7; font-size: .9rem; white-space: pre-line; }

/* お問い合わせのページ(contact.html / D-499)。
   ⚠️ アプリの中の板と違い、**メールアドレスも打たせる**ので入力欄が2つある。 */
.field-label { display: block; margin: 0 0 4px; font-size: 13px; font-weight: 700; }
input.field, textarea.field {
  display: block; width: 100%; box-sizing: border-box;
  padding: 10px 12px; margin: 0 0 14px;
  border: 1px solid var(--s-line); border-radius: var(--field-radius);
  background: var(--s-bg); color: var(--s-text); font: inherit;
}
textarea.field { resize: vertical; min-height: 140px; }
