/* ===========================================
   VR フードメニュー 仕込み・調理 検索システム
   共通スタイル（スマホ最適化済み）
   =========================================== */

/* ---- CSS変数 ---- */
:root {
  --color-prep:     #F97316; /* 仕込み：オレンジ */
  --color-cook:     #EF4444; /* 調理：レッド */
  --color-plate:    #22C55E; /* 盛り付け：グリーン */
  --color-note:     #3B82F6; /* 注意：ブルー */
  --color-bg:       #F8F7F4;
  --color-surface:  #FFFFFF;
  --color-border:   #E5E7EB;
  --color-text:     #1F2937;
  --color-sub:      #6B7280;
  --color-accent:   #2563EB;
  --radius:         12px;
  --shadow:         0 2px 8px rgba(0,0,0,.10);
  --shadow-lg:      0 8px 32px rgba(0,0,0,.14);
  --font:           'Noto Sans JP', 'Hiragino Sans', sans-serif;
  --transition:     .2s ease;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { opacity: .8; }
button { cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }

/* ---- Typography ---- */
h1 { font-size: clamp(1.4rem, 5vw, 2rem); font-weight: 800; }
h2 { font-size: clamp(1.1rem, 4vw, 1.5rem); font-weight: 700; }
h3 { font-size: clamp(1rem, 3.5vw, 1.2rem); font-weight: 600; }

/* ---- Layout ---- */
.container { max-width: 100%; margin: 0; padding: 0 16px; }
.page-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; padding: 24px 0 48px; }

/* ---- Header / Nav ---- */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
}
.site-logo .logo-icon { font-size: 1.4rem; }
.site-nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav-link {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-sub);
  transition: var(--transition);
}
.nav-link:hover, .nav-link.active {
  background: #F3F4F6;
  color: var(--color-text);
}
.nav-link.active { font-weight: 700; color: var(--color-accent); }

/* ---- Footer ---- */
.site-footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: 20px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-sub);
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--color-sub);
  margin-bottom: 16px;
  flex-wrap: wrap;
  padding-top: 8px;
  justify-content: flex-start;
  text-align: left;
}
.breadcrumb a { color: var(--color-accent); }
.breadcrumb .sep { color: #CBD5E1; }

/* ---- Page Hero ---- */
.page-hero {
  padding: 36px 0 28px;
  text-align: center;
}
.page-hero h1 { margin-bottom: 8px; }
.page-hero p { color: var(--color-sub); font-size: 0.95rem; }

/* ---- Cards ---- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
}
.btn-primary   { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: #1d4ed8; color: #fff; }
.btn-secondary { background: #F3F4F6; color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: #E5E7EB; }
.btn-ghost  { background: transparent; color: var(--color-sub); }
.btn-ghost:hover { background: #F3F4F6; color: var(--color-text); }
.btn-vr     { background: linear-gradient(135deg,#7C3AED,#4F46E5); color: #fff; }
.btn-vr:hover { background: linear-gradient(135deg,#6D28D9,#4338CA); color: #fff; }
.btn-sm     { padding: 6px 12px; font-size: 0.8rem; border-radius: 6px; }
.btn-lg     { padding: 14px 28px; font-size: 1rem; }
.btn-block  { width: 100%; }

/* ---- Badge / Tag ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-prep  { background: #FFF7ED; color: var(--color-prep); }
.badge-cook  { background: #FEF2F2; color: var(--color-cook); }
.badge-plate { background: #F0FDF4; color: var(--color-plate); }
.badge-note  { background: #EFF6FF; color: var(--color-note); }
.badge-ojt   { background: #F0FDF4; color: #16A34A; }
.badge-vr    { background: #F5F3FF; color: #7C3AED; }
.badge-easy  { background: #F0FDF4; color: #15803D; }
.badge-mid   { background: #FFFBEB; color: #D97706; }
.badge-hard  { background: #FEF2F2; color: #DC2626; }

/* ---- Form Elements ---- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; color: var(--color-sub); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition);
  appearance: none;
}
.form-control:focus { outline: none; border-color: var(--color-accent); }

/* ---- Search Bar ---- */
.search-wrap {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}
.search-wrap input {
  width: 100%;
  padding: 14px 50px 14px 18px;
  border: 2px solid var(--color-border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-wrap input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.search-wrap .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--color-sub);
  pointer-events: none;
}

/* ---- Step Type Color Bar ---- */
.step-bar {
  width: 4px;
  border-radius: 99px;
  flex-shrink: 0;
}
.step-bar-prep  { background: var(--color-prep); }
.step-bar-cook  { background: var(--color-cook); }
.step-bar-plate { background: var(--color-plate); }
.step-bar-note  { background: var(--color-note); }

/* ---- Filter Chips ---- */
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-sub);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}
.chip:hover { border-color: var(--color-accent); color: var(--color-accent); background: #EFF6FF; }
.chip.active { border-color: var(--color-accent); color: #fff; background: var(--color-accent); }
.chip.active:hover { background: #1d4ed8; }

/* ---- Step Card ---- */
.step-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}
.step-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.step-card-body { flex: 1; min-width: 0; }
.step-card-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.step-card-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.step-card-desc { font-size: 0.82rem; color: var(--color-sub); line-height: 1.5; margin-top: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* ---- Detail Modal / Section ---- */
.detail-section {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.detail-section-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--color-sub);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.detail-list { display: flex; flex-direction: column; gap: 6px; }
.detail-list-item {
  padding: 8px 12px;
  background: #F9FAFB;
  border-radius: 6px;
  font-size: 0.88rem;
}

/* ---- Grid Layout ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.steps-grid { display: grid; gap: 12px; }

/* ---- Menu Button (TOP page) ---- */
.menu-btn-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.menu-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px 16px;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--color-text);
  border: 2.5px solid transparent;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
  cursor: pointer;
  text-align: center;
  overflow: hidden;
}
.menu-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--menu-color, var(--color-accent));
  border-radius: 0;
}
.menu-btn:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--menu-color, var(--color-accent));
  color: var(--color-text);
}
.menu-btn .menu-emoji { font-size: 2.4rem; line-height: 1; }
.menu-btn .menu-name { font-size: 0.95rem; font-weight: 700; line-height: 1.3; }
.menu-btn .menu-category { font-size: 0.75rem; color: var(--color-sub); }
.menu-btn .menu-tag-row { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 4px; }

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding: 6px 0 10px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #6b7280;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 50px;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  letter-spacing: -.01em;
  position: relative;
  overflow: hidden;
}
.tab-btn:hover {
  color: #374151;
  border-color: #d1d5db;
  background: #f9fafb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.10);
}

/* アクティブ時：各タブごとの色 */
.tab-btn.active {
  color: #fff !important;
  border-color: transparent !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.20);
}
.tab-btn[data-tab="仕込み"].active      { background: linear-gradient(135deg, #ea580c, #f97316); box-shadow: 0 6px 18px rgba(249,115,22,.40); }
.tab-btn[data-tab="調理"].active         { background: linear-gradient(135deg, #dc2626, #f87171); box-shadow: 0 6px 18px rgba(220,38,38,.40); }
.tab-btn[data-tab="サイドメニュー"].active { background: linear-gradient(135deg, #16a34a, #4ade80); box-shadow: 0 6px 18px rgba(22,163,74,.40); }
.tab-btn[data-tab="トッピング"].active   { background: linear-gradient(135deg, #7c3aed, #a78bfa); box-shadow: 0 6px 18px rgba(124,58,237,.40); }
.tab-btn[data-tab="注意事項"].active     { background: linear-gradient(135deg, #d97706, #fbbf24); box-shadow: 0 6px 18px rgba(217,119,6,.40); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ---- Count Badge ---- */
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  background: #E5E7EB;
  color: var(--color-sub);
}
.tab-btn.active .count-badge { background: rgba(255,255,255,.30); color: #fff; }

/* ---- VR Info Box ---- */
.vr-box {
  background: linear-gradient(135deg, #7C3AED10, #4F46E510);
  border: 1.5px solid #7C3AED30;
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.vr-box .vr-icon { font-size: 2rem; flex-shrink: 0; }
.vr-box .vr-info h4 { font-size: 0.9rem; font-weight: 700; color: #5B21B6; }
.vr-box .vr-info p { font-size: 0.82rem; color: var(--color-sub); }

/* ---- Warning Box ---- */
.warn-box {
  background: #FFF7ED;
  border: 1.5px solid #FED7AA;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #92400E;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.warn-box .warn-icon { flex-shrink: 0; font-size: 1.1rem; margin-top: 1px; }

/* ---- Danger Box ---- */
.danger-box {
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.85rem;
  color: #991B1B;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

/* ---- Stat Cards ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-card .stat-num { font-size: 1.8rem; font-weight: 800; color: var(--color-accent); }
.stat-card .stat-label { font-size: 0.78rem; color: var(--color-sub); }

/* ---- Progress ---- */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #E5E7EB;
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--color-accent);
  transition: width .4s ease;
}

/* ---- Accordion (工程順) ---- */
.accordion-item { margin-bottom: 8px; }
.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  transition: var(--transition);
}
.accordion-header:hover { background: #F9FAFB; border-color: #CBD5E1; }
.accordion-header.open { border-color: var(--color-accent); border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.accordion-header .acc-arrow { margin-left: auto; transition: transform .25s; font-size: 0.9rem; color: var(--color-sub); }
.accordion-header.open .acc-arrow { transform: rotate(180deg); }
.accordion-body {
  display: none;
  background: var(--color-surface);
  border: 1.5px solid var(--color-accent);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 16px;
  font-size: 0.88rem;
  line-height: 1.7;
}
.accordion-body.open { display: block; }

/* ---- Section Divider ---- */
.section-divider { border: none; border-top: 1.5px solid var(--color-border); margin: 24px 0; }

/* ---- Loading Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, #F0F0F0 25%, #E0E0E0 50%, #F0F0F0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Toast / Alert ---- */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #1F2937;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}
.toast.show { opacity: 1; }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--color-sub);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { margin-bottom: 6px; font-size: 1rem; }
.empty-state p { font-size: 0.85rem; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .menu-btn-grid { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .site-nav { display: none; }
  .nav-mobile-btn { display: flex; }
  main { padding: 16px 0 40px; }
}
@media (max-width: 380px) {
  .menu-btn-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (min-width: 641px) {
  .nav-mobile-btn { display: none; }
  .site-nav { display: flex; }
  .menu-btn-grid { grid-template-columns: repeat(3, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .menu-btn-grid { grid-template-columns: repeat(3, 1fr); }
}
