@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;700&family=Noto+Sans+JP:wght@400;600;700&display=swap');

body {
  background-color: #0b0b0e;
  color: #e2e8f0;
  font-family: 'Noto Sans JP', sans-serif;
  touch-action: manipulation;
}

.rock-font { font-family: 'Oswald', sans-serif; letter-spacing: 1px; }
.hazard-red { background: linear-gradient(135deg, #e11d48 0%, #b91c1c 100%); }
.diamond-badge { transform: rotate(45deg); }
.diamond-badge > * { transform: rotate(-45deg); }

.bg-store {
  background-image: linear-gradient(to bottom, rgba(0,0,0,0.4), rgba(20,20,25,0.95)), url('/img/storefront.jpg');
  background-size: cover;
  background-position: center;
}

/* =========================================================
   背景に流す動画（Sora 2 で作ったもの・2026-09-18）
   ---------------------------------------------------------
   data-bg-video を付けた箱の中に、JS が <video> を差し込む。
   ★動画は public/ 直下に置くこと。/img/ に入れると IMG_VERSION が動いて
     写真76枚を全端末が取り直すことになる（要求定義メモ 3-6）。
   ★見えている間だけ読み込む。データ節約や「動きを減らす」設定の人には出さない。
   ========================================================= */
[data-bg-video] { position: relative; overflow: hidden; }
[data-bg-video] > *:not(.bgv) { position: relative; z-index: 1; }
.bgv {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1s ease;
  pointer-events: none; z-index: 0;
}
.bgv.on { opacity: var(--bgv-opacity, .4); }
@media (prefers-reduced-motion: reduce) { .bgv { display: none; } }

/* 【いまは使っていない】入口の背景にかける動画の指定。
   2026-09-18 に一度入れたが、店主の判断で入口は店舗写真に戻した
   （動きが少なく、入口はお店の入り口の写真の方がよい）。
   別の場所で動画を使うときに、この指定をそのまま流用できるので残してある。
   元の説明: Sora 2 で作ったループ。
   読み込めない・止めている場合は、下の .bg-store（店の写真）がそのまま見える。
   ★ public/ 直下に置いてある。/img/ に入れると IMG_VERSION が動いて
     写真76枚を全端末が取り直すことになる（要求定義メモ 3-6 の置き場所の話）。 */
.entry-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity 1.2s ease;
  pointer-events: none;
}
.entry-bg.on { opacity: 1; }
.entry-veil {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(20,20,25,.92));
}
/* 動きを抑える設定にしている人には出さない */
@media (prefers-reduced-motion: reduce) { .entry-bg { display: none; } }

/* 言語ボタン。選択中だけ赤くする */
.lang-btn { background: rgba(39,39,42,0.8); color: #d4d4d8; }
.lang-btn[aria-pressed="true"] { background: #dc2626; color: #fff; font-weight: 700; }

/* 大きさの選択ボタン。選択中だけ赤くする（言語ボタンと同じ見た目） */
.size-btn { background: rgba(39,39,42,0.8); color: #d4d4d8; }
.size-btn[aria-pressed="true"] { background: #dc2626; color: #fff; font-weight: 700; }

/* タブ */
.tab-btn { color: #a1a1aa; border-color: transparent; }
.tab-btn[aria-selected="true"] { color: #ef4444; border-color: #ef4444; }

/* 品物の写真。読み込み前は枠だけ見せる */
.thumb {
  width: 2.75rem; height: 2.75rem;
  border-radius: 0.25rem;
  object-fit: cover;
  background: #27272a;
  flex-shrink: 0;
}

.sold-out { opacity: 0.5; filter: grayscale(1); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.2s ease-out; }

/* 状態が変わった行を一瞬光らせる。他の客の画面でも「いま変わった」と分かるように */
@keyframes flash {
  0% { background-color: rgba(220,38,38,0.35); }
  100% { background-color: transparent; }
}
.flash { animation: flash 1.2s ease-out; }

/* ===== 文字・画像の大きさ調整 =====
   年配のお客さんが多いので、3段階で大きくできるようにする。
   Tailwind の text-[9px] などは px 直指定で、ルートの font-size を変えても効かない。
   そこで段階ごとに実寸で上書きする。html.size-* の方が詳細度が高いので確実に勝つ。 */

.thumb { width: var(--thumb, 2.75rem); height: var(--thumb, 2.75rem); }

html.size-l  { --thumb: 3.5rem; }
html.size-xl { --thumb: 4.25rem; }

html.size-l  .text-\[9px\]  { font-size: 11px; }
html.size-l  .text-\[10px\] { font-size: 12px; }
html.size-l  .text-\[11px\] { font-size: 13px; }
html.size-l  .text-xs       { font-size: 14px; line-height: 1.45; }
html.size-l  .text-sm       { font-size: 16px; line-height: 1.4; }
html.size-l  .text-lg       { font-size: 21px; }

html.size-xl .text-\[9px\]  { font-size: 13px; }
html.size-xl .text-\[10px\] { font-size: 14px; }
html.size-xl .text-\[11px\] { font-size: 15px; }
html.size-xl .text-xs       { font-size: 16px; line-height: 1.5; }
html.size-xl .text-sm       { font-size: 18px; line-height: 1.45; }
html.size-xl .text-lg       { font-size: 24px; }

/* 大きくすると1行に収まらなくなる。読めない方が困るので折り返しを許す */
html.size-l .truncate,
html.size-xl .truncate {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* 「頼んだ」ボタンも指で押しやすく */
html.size-l  .btn-order { height: 1.9rem; padding-inline: .6rem; }
html.size-xl .btn-order { height: 2.2rem; padding-inline: .75rem; }

/* いま何段階目かを一瞬だけ知らせる */
#sizeToast {
  position: fixed; left: 50%; transform: translateX(-50%);
  top: 3.5rem; z-index: 45;
  background: #27272a; color: #e4e4e7; border: 1px solid #3f3f46;
  padding: .35rem .9rem; border-radius: 999px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
#sizeToast.show { opacity: 1; }
