/* =============================================
   iPad貸出管理表 - メインスタイル
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --s1: #3b82f6;
  --s1-light: #eff6ff;
  --s1-mid: #bfdbfe;
  --s2: #22c55e;
  --s2-light: #f0fdf4;
  --s2-mid: #bbf7d0;
  --s3: #f97316;
  --s3-light: #fff7ed;
  --s3-mid: #fed7aa;
  --s4: #a855f7;
  --s4-light: #faf5ff;
  --s4-mid: #e9d5ff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
}

html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic UI', sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  min-height: 100vh;
  line-height: 1.6;
}

/* ヘッダー */
.app-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #3b82f6 100%);
  color: white;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.header-left { display: flex; align-items: center; gap: 14px; }
.header-icon { font-size: 2rem; opacity: .9; filter: drop-shadow(0 2px 4px rgba(0,0,0,.3)); }
.app-title { font-size: 1.25rem; font-weight: 700; letter-spacing: .02em; line-height: 1.2; }
.today-badge {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: .85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

/* タブナビゲーション */
.tab-nav {
  background: var(--white);
  border-bottom: 2px solid var(--gray-200);
  position: sticky;
  top: 64px;
  z-index: 99;
  box-shadow: var(--shadow-sm);
}
.tab-nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 4px;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all .2s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--gray-800); background: var(--gray-50); }
.tab-btn.active { color: #2563eb; border-bottom-color: #2563eb; }
.tab-btn .badge {
  background: #ef4444;
  color: white;
  border-radius: 50px;
  padding: 1px 7px;
  font-size: .7rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}
.tab-btn.active .badge { background: #2563eb; }

/* メインコンテンツ */
.main-content { max-width: 1400px; margin: 0 auto; padding: 20px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* 日付バー */
.date-bar {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1.5px solid #fbbf24;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.date-bar-inner {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.date-display { display: flex; align-items: center; gap: 10px; color: #92400e; font-weight: 600; }
.date-display i { color: #d97706; font-size: 1.1rem; }
.date-label { font-size: .8rem; opacity: .8; }
.date-value { font-size: 1.15rem; font-weight: 700; }
.date-auto-badge {
  background: #d97706; color: white;
  font-size: .65rem; font-weight: 700;
  padding: 2px 7px; border-radius: 50px; letter-spacing: .05em;
}
.date-info { font-size: .8rem; color: #78350f; display: flex; align-items: center; gap: 6px; opacity: .85; }

/* 店舗カードグリッド */
.stores-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-bottom: 24px; }
.store-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1.5px solid var(--gray-200);
  transition: box-shadow .2s;
}
.store-card:hover { box-shadow: var(--shadow-lg); }
.store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1.5px solid;
}
.store-1 .store-header { background: var(--s1-light); border-color: var(--s1-mid); }
.store-2 .store-header { background: var(--s2-light); border-color: var(--s2-mid); }
.store-3 .store-header { background: var(--s3-light); border-color: var(--s3-mid); }
.store-4 .store-header { background: var(--s4-light); border-color: var(--s4-mid); }
.store-title-area { display: flex; align-items: center; gap: 10px; }
.store-badge {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800; color: white;
  flex-shrink: 0; box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.s1 { background: var(--s1); }
.s2 { background: var(--s2); }
.s3 { background: var(--s3); }
.s4 { background: var(--s4); }
.store-name { font-size: 1.05rem; font-weight: 700; }
.store-1 .store-name { color: #1e40af; }
.store-2 .store-name { color: #15803d; }
.store-3 .store-name { color: #c2410c; }
.store-4 .store-name { color: #7e22ce; }
.store-actions { display: flex; align-items: center; gap: 8px; }
.clear-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1.5px solid var(--gray-300); background: var(--white);
  color: var(--gray-400); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem; transition: all .2s;
}
.clear-btn:hover { border-color: var(--gray-500); color: var(--gray-600); transform: rotate(-30deg); }
.register-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 18px; border: none; border-radius: 50px;
  color: white; font-family: inherit; font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: all .2s; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.register-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.register-btn:active { transform: translateY(0); }
.btn-s1 { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.btn-s2 { background: linear-gradient(135deg, #22c55e, #15803d); }
.btn-s3 { background: linear-gradient(135deg, #f97316, #c2410c); }
.btn-s4 { background: linear-gradient(135deg, #a855f7, #7e22ce); }

/* スタッフ入力グリッド */
.staff-grid { padding: 14px; display: grid; grid-template-columns: 1fr; gap: 8px; }
.staff-row {
  display: grid;
  grid-template-columns: 24px 1fr 100px;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  transition: border-color .15s;
}
.staff-row:focus-within { border-color: var(--gray-400); background: white; }
.staff-row.input-error  { border-color: #ef4444; background: #fef2f2; }
.staff-row.input-error .staff-name-input,
.staff-row.input-error .ipad-select { border-color: #fca5a5; }
.staff-num {
  font-size: .75rem; font-weight: 700; color: white;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.store-1 .staff-num { background: var(--s1); }
.store-2 .staff-num { background: var(--s2); }
.store-3 .staff-num { background: var(--s3); }
.store-4 .staff-num { background: var(--s4); }
.staff-name-input, .ipad-select {
  border: 1.5px solid var(--gray-200); border-radius: 6px;
  padding: 6px 10px; font-family: inherit; font-size: .85rem;
  background: white; color: var(--gray-800); outline: none;
  transition: border-color .15s; width: 100%;
}
.staff-name-input:focus, .ipad-select:focus {
  border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96,165,250,.15);
}
.ipad-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
}

/* 全店舗一括登録 */
.bulk-register-area { text-align: center; padding: 20px 0 8px; }
.bulk-register-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 40px;
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  color: white; border: none; border-radius: 50px;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 16px rgba(37,99,235,.4);
  transition: all .2s; letter-spacing: .02em;
}
.bulk-register-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,99,235,.5); }
.bulk-register-btn:active { transform: translateY(0); }
.bulk-note { margin-top: 8px; font-size: .78rem; color: var(--gray-400); }

/* 履歴ツールバー */
.history-toolbar {
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); margin-bottom: 16px; border: 1px solid var(--gray-200);
}
.history-toolbar-inner {
  padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.search-area { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--gray-50); border: 1.5px solid var(--gray-200);
  border-radius: 50px; padding: 7px 14px;
  min-width: 260px; flex: 1; transition: border-color .15s;
}
.search-box:focus-within { border-color: #60a5fa; background: white; }
.search-box i { color: var(--gray-400); font-size: .9rem; flex-shrink: 0; }
.search-box input {
  border: none; background: none; font-family: inherit;
  font-size: .85rem; color: var(--gray-800); outline: none; flex: 1; min-width: 0;
}
.search-clear {
  border: none; background: none; cursor: pointer;
  color: var(--gray-400); padding: 2px; display: flex; transition: color .15s;
}
.search-clear:hover { color: var(--gray-600); }
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-group select, .filter-group input[type="date"] {
  border: 1.5px solid var(--gray-200); border-radius: 8px;
  padding: 7px 12px; font-family: inherit; font-size: .83rem;
  color: var(--gray-700); background: var(--gray-50);
  outline: none; cursor: pointer; transition: border-color .15s;
}
.filter-group select:focus, .filter-group input[type="date"]:focus { border-color: #60a5fa; background: white; }
.history-meta { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--gray-500); white-space: nowrap; }
.history-meta i { color: var(--gray-400); }

/* 履歴テーブル */
.history-table-wrap {
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); overflow-x: auto; border: 1px solid var(--gray-200);
}
.history-table { width: 100%; border-collapse: collapse; font-size: .82rem; white-space: nowrap; }
.history-table thead tr { background: linear-gradient(135deg, #1e3a5f, #2563eb); color: white; }
.history-table th {
  padding: 11px 12px; text-align: left; font-weight: 600;
  font-size: .78rem; letter-spacing: .03em; white-space: nowrap;
}
.history-table td { padding: 9px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.history-table tbody tr { transition: background .1s; }
.history-table tbody tr:hover { background: var(--gray-50); }
.history-table tbody tr:last-child td { border-bottom: none; }
.td-date { font-weight: 700; color: var(--gray-700); font-size: .83rem; }
.td-store-badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 50px; font-size: .75rem; font-weight: 700;
}
.store-badge-1 { background: var(--s1-light); color: var(--s1); border: 1px solid var(--s1-mid); }
.store-badge-2 { background: var(--s2-light); color: var(--s2); border: 1px solid var(--s2-mid); }
.store-badge-3 { background: var(--s3-light); color: var(--s3); border: 1px solid var(--s3-mid); }
.store-badge-4 { background: var(--s4-light); color: var(--s4); border: 1px solid var(--s4-mid); }
.ipad-badge {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--gray-100); color: var(--gray-700);
  border: 1px solid var(--gray-200); border-radius: 6px;
  padding: 2px 7px; font-size: .75rem; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ipad-badge i { font-size: .7rem; color: var(--gray-400); }
.td-staff { color: var(--gray-700); }
.td-empty { color: var(--gray-300); font-size: .78rem; }
.td-registered { color: var(--gray-400); font-size: .75rem; }

/* 削除ボタン */
.del-btn {
  padding: 6px 12px;
  border: 1.5px solid #fca5a5;
  background: #fef2f2;
  color: #ef4444;
  border-radius: 7px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.del-btn:hover {
  background: #ef4444; color: white; border-color: #ef4444;
  box-shadow: 0 2px 8px rgba(239,68,68,.35); transform: translateY(-1px);
}
.td-action { text-align: center; }
.row-s1 { border-left: 4px solid var(--s1); }
.row-s2 { border-left: 4px solid var(--s2); }
.row-s3 { border-left: 4px solid var(--s3); }
.row-s4 { border-left: 4px solid var(--s4); }
.col-date { min-width: 100px; }
.col-store { min-width: 80px; }
.col-staff { min-width: 90px; }
.col-ipad { min-width: 60px; }
.col-registered { min-width: 120px; }
.col-action { min-width: 88px; text-align: center; }

/* ローディング・空状態 */
.loading-area { text-align: center; padding: 60px 20px; color: var(--gray-400); }
.spinner {
  width: 40px; height: 40px; border: 4px solid var(--gray-200);
  border-top-color: #3b82f6; border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state { text-align: center; padding: 80px 20px; color: var(--gray-400); }
.empty-state i { font-size: 3rem; margin-bottom: 16px; display: block; opacity: .4; }
.empty-state p { font-size: .95rem; }
.empty-sub { font-size: .8rem; margin-top: 6px; opacity: .7; }

/* ページネーション */
.pagination { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 16px; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px; border: 1.5px solid var(--gray-200);
  background: white; color: var(--gray-600); border-radius: 8px; cursor: pointer;
  font-family: inherit; font-size: .85rem;
  display: flex; align-items: center; justify-content: center; transition: all .15s;
}
.page-btn:hover { border-color: #3b82f6; color: #3b82f6; }
.page-btn.active { background: #3b82f6; border-color: #3b82f6; color: white; font-weight: 700; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* トースト通知 */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  background: var(--gray-900); color: white;
  padding: 12px 18px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); font-size: .87rem; font-weight: 500;
  min-width: 260px; animation: toastIn .3s ease; pointer-events: auto;
  border-left: 4px solid transparent;
}
.toast.success { border-left-color: #22c55e; }
.toast.error   { border-left-color: #ef4444; }
.toast.info    { border-left-color: #3b82f6; }
.toast i { font-size: 1rem; flex-shrink: 0; }
.toast.success i { color: #22c55e; }
.toast.error   i { color: #ef4444; }
.toast.info    i { color: #3b82f6; }
.toast.fadeout { animation: toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(30px); } }

/* モーダル */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: white; border-radius: var(--radius-xl);
  padding: 36px 32px; text-align: center;
  max-width: 360px; width: 90%; box-shadow: var(--shadow-lg); animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: scale(1); } }
.modal-icon { font-size: 3rem; margin-bottom: 12px; }
.modal-icon .fa-check-circle { color: #22c55e; }
.modal-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; color: var(--gray-800); }
.modal-msg { font-size: .88rem; color: var(--gray-500); line-height: 1.7; margin-bottom: 24px; }
.modal-btn-ok {
  padding: 11px 40px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white; border: none; border-radius: 50px;
  font-family: inherit; font-size: .95rem; font-weight: 700;
  cursor: pointer; box-shadow: 0 4px 12px rgba(34,197,94,.35); transition: all .2s;
}
.modal-btn-ok:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(34,197,94,.4); }

/* 履歴カードビュー */
.history-cards { display: none; }
.history-card {
  background: var(--white); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
  margin-bottom: 10px; overflow: hidden;
}
.hcard-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--gray-100);
}
.hcard-header-left { display: flex; align-items: center; gap: 10px; }
.hcard-date { font-size: .9rem; font-weight: 700; color: var(--gray-700); }
.hcard-header-right { display: flex; align-items: center; gap: 8px; }
.hcard-time { font-size: .72rem; color: var(--gray-400); }
.hcard-body { padding: 10px 14px; }
.hcard-staff-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.hcard-staff-item {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 8px; background: var(--gray-50);
  border-radius: 6px; border: 1px solid var(--gray-100);
}
.hcard-staff-num {
  font-size: .68rem; font-weight: 700; color: white;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.hcard-s1 .hcard-staff-num { background: var(--s1); }
.hcard-s2 .hcard-staff-num { background: var(--s2); }
.hcard-s3 .hcard-staff-num { background: var(--s3); }
.hcard-s4 .hcard-staff-num { background: var(--s4); }
.hcard-staff-name { font-size: .8rem; color: var(--gray-700); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard-ipad-badge {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--gray-100); color: var(--gray-600);
  border: 1px solid var(--gray-200); border-radius: 5px;
  padding: 1px 5px; font-size: .72rem; font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
.hcard-empty { color: var(--gray-300); font-size: .75rem; grid-column: 1 / -1; text-align: center; padding: 4px; }

/* パスワード認証モーダル（JS動的生成・display:flex固定） */
.pw-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.pw-modal-box {
  background: white; border-radius: var(--radius-xl);
  padding: 36px 32px 28px; text-align: center;
  max-width: 340px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: modalIn .25s ease;
}
.pw-modal-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #fee2e2, #fca5a5);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 1.6rem; color: #ef4444;
}
.pw-modal-title { font-size: 1.15rem; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.pw-modal-desc { font-size: .84rem; color: var(--gray-500); line-height: 1.65; margin-bottom: 20px; }
.pw-input-wrap { margin-bottom: 8px; }
.pw-input {
  width: 100%; padding: 11px 14px;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: inherit; text-align: center;
  letter-spacing: .2em; transition: border-color .2s; outline: none;
}
.pw-input:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.12); }
.pw-error { font-size: .8rem; color: #ef4444; margin-bottom: 20px; min-height: 1.2em; display: none; }
.pw-modal-actions { display: flex; gap: 10px; }
.pw-btn-cancel {
  flex: 1; padding: 11px 0;
  background: var(--gray-100); color: var(--gray-600);
  border: 1.5px solid var(--gray-200); border-radius: 50px;
  font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: all .15s; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.pw-btn-cancel:hover { background: var(--gray-200); }
.pw-btn-delete {
  flex: 1.4; padding: 11px 0;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white; border: none; border-radius: 50px;
  font-family: inherit; font-size: .9rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 12px rgba(239,68,68,.35); transition: all .2s;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.pw-btn-delete:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(239,68,68,.4); }

/* レスポンシブ */
@media (max-width: 1100px) { .stores-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

@media (max-width: 768px) {
  html { font-size: 14px; }
  .header-inner { padding: 11px 14px; gap: 10px; }
  .header-icon { font-size: 1.6rem; }
  .app-title { font-size: 1rem; }
  .today-badge { padding: 5px 12px; font-size: .8rem; }
  .tab-nav { top: 56px; }
  .tab-btn { padding: 13px 20px; font-size: .88rem; gap: 6px; }
  .main-content { padding: 12px; }
  .date-bar-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .date-info { font-size: .75rem; }
  .stores-grid { grid-template-columns: 1fr; gap: 12px; }
  .staff-grid { padding: 10px; gap: 7px; }
  .staff-row { grid-template-columns: 26px 1fr 108px; padding: 9px 10px; gap: 8px; }
  .staff-name-input, .ipad-select { padding: 9px 10px; font-size: .92rem; height: 42px; }
  .register-btn { padding: 9px 18px; font-size: .9rem; }
  .clear-btn { width: 36px; height: 36px; font-size: .9rem; }
  .bulk-register-btn { padding: 14px 32px; font-size: .95rem; width: 100%; justify-content: center; }
  .history-toolbar-inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .search-area { flex-direction: column; gap: 8px; }
  .search-box { min-width: 100%; }
  .filter-group { width: 100%; }
  .filter-group select, .filter-group input[type="date"] { flex: 1; min-width: 0; height: 42px; font-size: .9rem; padding: 8px 12px; }
  .history-table-wrap { display: none !important; }
  .history-cards { display: block; }
  .page-btn { min-width: 42px; height: 42px; font-size: .9rem; }
}

@media (max-width: 599px) {
  html { font-size: 13.5px; }
  .header-inner { padding: 10px 12px; }
  .header-icon { font-size: 1.4rem; }
  .app-title { font-size: .95rem; }
  .today-badge { font-size: .75rem; padding: 5px 10px; }
  .tab-btn { padding: 12px 16px; font-size: .84rem; }
  .main-content { padding: 10px; }
  .staff-row { grid-template-columns: 26px 1fr; grid-template-rows: auto auto; gap: 5px; padding: 10px; }
  .staff-num { grid-row: 1 / 3; align-self: center; }
  .staff-name-input { grid-column: 2; }
  .ipad-select { grid-column: 2; }
  .store-header { padding: 12px 14px; }
  .store-name { font-size: 1rem; }
  .date-value { font-size: 1.05rem; }
  .bulk-register-btn { font-size: .9rem; padding: 13px 24px; }
  .hcard-staff-list { grid-template-columns: 1fr; }
  .toast-container { bottom: 16px; right: 12px; left: 12px; }
  .toast { min-width: 0; width: 100%; font-size: .83rem; }
}

@media (max-width: 479px) {
  .tab-label { display: none; }
  .tab-btn { padding: 12px 22px; gap: 0; }
  .tab-btn i { font-size: 1.1rem; }
  .store-actions { gap: 6px; }
  .register-btn { padding: 9px 14px; font-size: .83rem; }
  .hcard-staff-list { grid-template-columns: 1fr; }
}

@media (hover: none) and (pointer: coarse) {
  .register-btn:hover, .bulk-register-btn:hover, .clear-btn:hover, .modal-btn-ok:hover { transform: none; box-shadow: none; }
  .register-btn:active { opacity: .85; transform: scale(.97); }
  .bulk-register-btn:active { opacity: .85; transform: scale(.98); }
  .tab-btn:active { background: var(--gray-100); }
  .del-btn:active { background: #ef4444; color: white; }
  .staff-name-input, .ipad-select, .filter-group select, .filter-group input[type="date"], .search-box input { font-size: 16px !important; }
}
