/* =========================
   FFEM UI (scoped)
   ========================= */
#ffem-app{
  --ffem-bg: #fff;
  --ffem-panel: #fafafa;
  --ffem-border: #e6e6e6;
  --ffem-text: #111;
  --ffem-muted: rgba(0,0,0,.65);
  --ffem-radius: 12px;
  --ffem-radius-sm: 10px;
  --ffem-shadow: 0 1px 2px rgba(0,0,0,.05);
  color: var(--ffem-text);
}

/* typography */
#ffem-app h2{ margin: 8px 0 12px; font-size: 20px; }
#ffem-app label{ font-size: 12px; color: var(--ffem-muted); }
#ffem-app small, #ffem-app .ffem-small{ color: var(--ffem-muted); }

/* buttons (smaller + consistent) */
#ffem-app button,
#ffem-app .ffem-btn{
  appearance: none;
  border: 1px solid var(--ffem-border);
  border-radius: var(--ffem-radius-sm);
  background: #111;
  color: #fff;
  padding: 7px 10px;
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--ffem-shadow);
}
#ffem-app button:hover,
#ffem-app .ffem-btn:hover{ filter: brightness(.97); }
#ffem-app button:active,
#ffem-app .ffem-btn:active{ transform: translateY(1px); }
#ffem-app button:disabled,
#ffem-app .ffem-btn:disabled{ opacity:.55; cursor:not-allowed; transform:none; }

#ffem-app .ffem-btn.gray{
  background: #f2f2f2;
  color: #111;
}

/* “pill” buttons used in daily view */
#ffem-app .ffem-pill{
  border: 1px solid var(--ffem-border) !important;
  background: #fff !important;
  color: #111 !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}
#ffem-app .ffem-pill.active{
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
}

/* inputs */
#ffem-app input,
#ffem-app select,
#ffem-app textarea{
  width: auto;
  max-width: 100%;
  border: 1px solid var(--ffem-border);
  border-radius: var(--ffem-radius-sm);
  padding: 7px 9px;
  font-size: 14px;
  background: #fff;
  color: #111;
}
#ffem-app input:focus,
#ffem-app select:focus,
#ffem-app textarea:focus{
  outline: none;
  border-color: #bbb;
  box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

/* admin tabs / panels */
#ffem-app .adm-tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin: 10px 0 12px;
}
#ffem-app .adm-tabs button{
  background: #fff;
  color:#111;
  border: 1px solid var(--ffem-border);
  box-shadow: none;
  font-weight: 700;
}
#ffem-app .adm-tabs button.active{
  background:#111;
  color:#fff;
  border-color:#111;
}

/* tables */
#ffem-app table{
  width: 100%;
  border-collapse: collapse;
  background: var(--ffem-bg);
  border: 1px solid var(--ffem-border);
  border-radius: var(--ffem-radius);
  overflow: hidden;
}
#ffem-app thead th{
  text-align: left;
  font-size: 12px;
  color: var(--ffem-muted);
  background: var(--ffem-panel);
  border-bottom: 1px solid var(--ffem-border);
  padding: 10px 10px;
}
#ffem-app tbody td{
  border-bottom: 1px solid var(--ffem-border);
  padding: 8px 10px;
  vertical-align: middle;
}
#ffem-app tbody tr:last-child td{ border-bottom: none; }
#ffem-app td input, #ffem-app td select{
  width: 100%;
}

/* status / debug area */
#ffem-output{
  border-radius: var(--ffem-radius);
}

/* card polish (daily view already has CSS in JS; this just complements) */
#ffem-app .ffem-card{
  box-shadow: var(--ffem-shadow) !important;
}

.mobile-menu-builder-customizer--container {
    display: none !important;
}

@media (max-width: 520px){
  /* 商品名列を広く、2行表示 */
  #ffem-app td.ffem-col-name,
  #ffem-app th.ffem-col-name{
    width: 55vw;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
  }

  /* 入力UIの横幅調整（単価/予算などが押しつぶされる対策） */
  #ffem-app table td,
  #ffem-app table th{
    padding: 8px 8px;
  }

  /* ボタンを少し小さく */
  #ffem-app button{
    padding: 6px 9px;
    font-size: 12px;
  }
}
