/* Safari POS — White & Pastel Blue Theme */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
  background: #f0f2f5;
  color: #1a1a1a;
  min-height: 100vh;
  padding-bottom: 100px;
}

/* ヘッダー */
.header {
  background: #fff;
  border-bottom: 1px solid #c8dff7;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header h1 { font-size: 1.2rem; font-weight: 500; color: #1a3a5c; }
.header-left { display: flex; align-items: center; gap: 14px; }
.header-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.header-info { font-size: 0.78rem; color: #888; margin-top: 2px; }
#clock { color: #2a6db5; font-weight: 500; margin-left: 8px; }

.back {
  color: #2a6db5;
  text-decoration: none;
  font-size: 1.5rem;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* ボタン */
.btn {
  background: #eaf4ff;
  color: #2a6db5;
  border: 1px solid #c8dff7;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.btn-primary {
  background: #2a6db5;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-decoration: none;
  width: 100%;
}
.btn-danger {
  background: #fef0f0;
  color: #b03030;
  border: 1px solid #f5c0c0;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  width: 100%;
}
.btn-ghost {
  background: transparent;
  color: #7aa8d4;
  border: 1px solid #d8eaf8;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
}

/* カード */
.card {
  background: #fff;
  border: 1px solid #dde6f0;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 14px;
}

/* セクションタイトル */
.section-title {
  font-size: 0.75rem;
  color: #aaa;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
  margin-top: 22px;
}

/* バッジ */
.badge { display: inline-block; border-radius: 20px; padding: 3px 10px; font-size: 0.78rem; }
.badge-blue   { background: #eaf4ff; color: #2a6db5; border: 1px solid #c8dff7; }
.badge-red    { background: #fef0f0; color: #b03030; border: 1px solid #f5c0c0; }
.badge-gray   { background: #f5f5f5; color: #888;    border: 1px solid #ddd; }
.badge-green  { background: #f0faf4; color: #1a6a36; border: 1px solid #b0e0c0; }
.badge-purple { background: #f5eaff; color: #7030a0; border: 1px solid #ddc8f7; }

/* フォーム */
label { display: block; font-size: 0.85rem; color: #555; margin-bottom: 7px; }
input[type="text"],
input[type="number"],
textarea,
select {
  width: 100%;
  background: #f8fafc;
  border: 1px solid #c8dff7;
  border-radius: 10px;
  color: #1a1a1a;
  font-size: 1rem;
  padding: 13px 14px;
  outline: none;
  -webkit-appearance: none;
  font-family: inherit;
}
input:focus, textarea:focus, select:focus { border-color: #2a6db5; background: #fff; }
textarea { resize: vertical; min-height: 70px; }

/* カウンター */
.counter { display: flex; align-items: center; background: #f8fafc; border: 1px solid #c8dff7; border-radius: 10px; overflow: hidden; }
.counter button { width: 54px; height: 54px; background: #eaf4ff; border: none; color: #2a6db5; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.counter-val { flex: 1; text-align: center; font-size: 1.4rem; font-weight: 500; color: #1a3a5c; }

/* 行レイアウト */
.row-line { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid #eef2f8; font-size: 0.9rem; }
.row-line:last-child { border-bottom: none; }
.row-line .label { color: #888; }

/* グリッド */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* 区切り線 */
.divider { border: none; border-top: 1px solid #eef2f8; margin: 12px 0; }

/* トースト */
.toast { background: #f0faf4; border: 1px solid #b0e0c0; color: #1a6a36; border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; font-size: 0.9rem; }
.toast-warn { background: #fef0f0; border: 1px solid #f5c0c0; color: #b03030; }
.toast-info { background: #eaf4ff; border: 1px solid #c8dff7; color: #2a6db5; }

/* エラー */
.error { background: #fef0f0; border: 1px solid #f5c0c0; color: #b03030; border-radius: 8px; padding: 12px; margin-bottom: 18px; font-size: 0.9rem; }

/* FAB */
.fab {
  position: fixed;
  bottom: 28px;
  right: 24px;
  width: 62px;
  height: 62px;
  background: #2a6db5;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(42,109,181,0.3);
}

/* モーダル */
.modal-wrap { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.3); z-index: 200; align-items: flex-end; }
.modal-wrap.open { display: flex; }
.modal-body { background: #fff; border-radius: 16px 16px 0 0; width: 100%; max-height: 70vh; overflow-y: auto; padding: 20px; }
.modal-title { font-size: 0.85rem; color: #888; margin-bottom: 14px; }
.modal-cancel { width: 100%; background: #f0f2f5; border: 1px solid #dde6f0; border-radius: 10px; padding: 14px; font-size: 0.95rem; color: #888; cursor: pointer; min-height: 50px; margin-top: 4px; }

/* メンバーバッジ */
.mbadge-male   { background: #eaf4ff; color: #2a6db5; border: 1px solid #c8dff7; border-radius: 20px; font-size: 0.75rem; padding: 3px 10px; white-space: nowrap; }
.mbadge-female { background: #f5eaff; color: #7030a0; border: 1px solid #ddc8f7; border-radius: 20px; font-size: 0.75rem; padding: 3px 10px; white-space: nowrap; }
.mbadge-left   { background: #f5f5f5; color: #999; border: 1px solid #ddd; border-radius: 20px; font-size: 0.75rem; padding: 3px 10px; white-space: nowrap; }

/* 支払いバッジ */
.pay-cash { background: #f0faf4; color: #1a6a36; border: 1px solid #b0e0c0; border-radius: 10px; font-size: 0.75rem; padding: 2px 8px; }
.pay-card { background: #eaf4ff; color: #2a6db5; border: 1px solid #c8dff7; border-radius: 10px; font-size: 0.75rem; padding: 2px 8px; }

/* 数量コントロール */
.qty-ctrl { display: flex; align-items: center; gap: 4px; }
.qty-ctrl button { width: 30px; height: 30px; border-radius: 50%; font-size: 1rem; cursor: pointer; display: flex; align-items: center; justify-content: center; border: 1px solid; }
.qty-btn-minus { background: #fef0f0; color: #b03030; border-color: #f5c0c0; }
.qty-btn-plus  { background: #eaf4ff; color: #2a6db5; border-color: #c8dff7; }
.qty-num { font-size: 0.9rem; font-weight: 500; color: #1a3a5c; min-width: 18px; text-align: center; }

/* フィールド */
.field { margin-bottom: 20px; }

/* wrap */
.wrap { max-width: 560px; margin: 0 auto; padding: 16px; }

/* レスポンシブ */
@media (max-width: 480px) {
  .grid3 { grid-template-columns: 1fr 1fr; }
}

/* iPad mini (768px) 最適化 */
@media (max-width: 820px) and (min-width: 481px) {
  .header { padding: 12px 16px; }
  .header h1 { font-size: 1.05rem; }
  .btn { padding: 8px 12px; font-size: 0.85rem; min-height: 40px; }
  .wrap { padding: 12px; }
  .card { padding: 14px; }
}