/*
 * デザインテーマ「どんぶり × ガラス」
 * - 色と雷紋（らいもん）はお店のラーメン丼から取っています
 * - ナビゲーションなど「内容の上に浮かぶ部分」だけ半透明のガラス表現
 * style.css の後に読み込み、上書きしています。このファイルを外すと元のデザインに戻ります。
 */

:root {
  --bg: #f7f1e6;
  --surface: #fffdf8;
  --line: #e7dccb;
  --accent: #c4371f;          /* 丼の朱色 */
  --bowl-red: #c4371f;
  --bowl-cream: #fbf6ec;      /* 丼の白 */
  --jade: #2f6b52;            /* 丼の龍の緑 */
  --header-bg: #1c1612;
  --header-ink: #fdf8f0;
  --ph-bg: #f3ead9;
  --ph-stamp: #c4371f;

  --glass-bg: rgba(252, 248, 240, .62);
  --glass-line: rgba(255, 255, 255, .7);
  --glass-shadow: 0 10px 30px rgba(40, 20, 10, .14), 0 1px 3px rgba(40, 20, 10, .08);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -1px 0 rgba(255, 255, 255, .2);
  --glass-blur: blur(18px) saturate(180%);
}
:root[data-theme="dark"] {
  --bg: #15110e;
  --surface: #211b16;
  --line: #3a3029;
  --accent: #ff8667;
  --bowl-red: #e2553a;
  --bowl-cream: #2a221c;
  --jade: #7cc7a2;
  --ph-bg: #2a221c;
  --ph-stamp: #e2553a;

  --glass-bg: rgba(38, 31, 26, .55);
  --glass-line: rgba(255, 255, 255, .14);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .16);
}

/* ===== 雷紋（丼のふちの模様）: SVG を型抜きに使い、色は CSS で指定 ===== */
.raimon,
.site-header::after,
.cat-head::after,
.site-footer::before,
.ph::before,
.ph::after {
  /* round：端が半端な模様にならないよう、幅を少し調整して並べる */
  -webkit-mask: url(raimon.svg) left center / auto 100% round no-repeat;
  mask: url(raimon.svg) left center / auto 100% round no-repeat;
  background: var(--bowl-red);
}

/* ===== ヘッダー：おすすめ料理の写真 ＋ 丼のふち ===== */
.site-header {
  position: relative;
  padding-bottom: 34px;
  background-color: var(--header-bg);
  background-image:
    linear-gradient(180deg, rgba(20, 13, 9, .55) 0%, rgba(20, 13, 9, .72) 55%, rgba(20, 13, 9, .9) 100%),
    var(--hero, none);
  background-size: cover;
  background-position: center 40%;
}
/* 丼のふち：クリーム色の帯の上に朱色の雷紋 */
.site-header::before,
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
}
.site-header::before { background: var(--bowl-cream); }
.site-header::after { height: 12px; bottom: 3px; opacity: .9; }

.shop-name { text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }

/* 言語ボタン：ガラス */
.lang-btn {
  border: 1px solid rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: background-color .2s, color .2s;
}
.lang-btn[aria-pressed="true"] {
  background: rgba(255, 253, 248, .92);
  color: #1c1612;
  border-color: rgba(255, 255, 255, .9);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25), inset 0 1px 0 #fff;
}

/* ===== 浮かぶカテゴリナビ：ガラス ===== */
.sticky {
  background: transparent;
  border-bottom: none;
  padding: 8px 12px 0;
  pointer-events: none;           /* ナビの外側は下の内容をそのまま触れる */
}
.nav-row { gap: 8px; max-width: 696px; }
.cat-nav,
.filter-status,
.theme-btn {
  pointer-events: auto;
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  box-shadow: var(--glass-shadow), var(--glass-hi);
}
.cat-nav {
  gap: 4px;
  padding: 5px;
  border-radius: 999px;
}
.cat-tab {
  min-height: 34px;
  padding: 5px 14px;
  background: transparent;
  border: 1px solid transparent;
  transition: background-color .2s, color .2s;
}
.cat-tab.is-active {
  background: var(--bowl-red);
  border-color: var(--bowl-red);
  color: #fff;
  box-shadow: 0 3px 10px rgba(196, 55, 31, .35), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.filter-status { max-width: 696px; }
/* テーマ切り替え：ナビの横に丸いガラスのボタン */
.theme-btn {
  width: 46px;
  height: 46px;
  margin-right: 0;
  color: var(--ink);
}
.theme-btn:active { transform: scale(.94); }
.filter-status {
  margin-top: 6px;
  padding: 6px 6px 6px 14px;
  border-radius: 999px;
}
[data-theme="dark"] .cat-tab.is-active { color: #1a0f0b; box-shadow: 0 3px 10px rgba(0, 0, 0, .4); }

/* ガラスが使えない端末・「透明度を下げる」設定では不透明に */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .cat-nav, .filter-status, .theme-btn { background: var(--surface); }
  .lang-btn { background: rgba(255, 255, 255, .08); }
}
@media (prefers-reduced-transparency: reduce) {
  .cat-nav, .filter-status, .theme-btn { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .lang-btn { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* ===== カテゴリ見出し：下に一行いっぱいの雷紋 ===== */
.category { padding-top: 30px; }
.cat-head::after {
  content: "";
  flex: 0 0 100%;
  height: 9px;
  margin-top: 4px;
}

/* ===== カード ===== */
.item { box-shadow: 0 1px 2px rgba(60, 30, 10, .05); }
/* おすすめ料理はカード上端に朱色のライン */
.item:has(.badge-rec) { box-shadow: inset 0 3px 0 var(--bowl-red), 0 1px 2px rgba(60, 30, 10, .05); }
.badge-rec { background: var(--bowl-red); }
.price.is-free { color: var(--jade); }
.thumb { border-radius: 12px; box-shadow: 0 2px 8px rgba(60, 30, 10, .12); }

/* 写真がないとき：丼のように上下に雷紋、中央に判子 */
.ph { position: relative; background: var(--ph-bg); }
.ph::before,
.ph::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 9px;
  opacity: .55;
}
.ph::before { top: 7px; }
.ph::after { bottom: 7px; }
.ph-stamp { opacity: .7; }

/* ===== フッター：上に雷紋 ===== */
.site-footer { border-top: none; padding-top: 0; }
.site-footer::before {
  content: "";
  display: block;
  height: 12px;
  margin-bottom: 24px;
  opacity: .8;
}
