/* 笑船管理システム 共通スタイル */

:root {
  --color-primary: #c2410c;      /* 提灯オレンジ */
  --color-primary-dark: #9a3412;
  --color-accent: #dc2626;       /* 朱色 */
  --color-bg: #ffffff;           /* 背景: 白 */
  --color-bg-soft: #faf7f2;      /* 補助的な薄背景（テーブルヘッダなど）*/
  --color-card: #ffffff;
  --color-kpi-orange: #fff7ed;
  --color-kpi-green: #f0fdf4;
  --color-kpi-yellow: #fefce8;
  --color-kpi-blue: #eff6ff;
  --color-text: #1c1917;         /* 墨色 */
  --color-text-muted: #78716c;
  --color-border: #e7e5e4;
  --color-sidebar-text: #fed7aa;
  --color-sidebar-text-active: #ffffff;
  --color-success: #16a34a;
  --color-warning: #ca8a04;
  --color-danger: #dc2626;
}

* { box-sizing: border-box; }

body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

/* ─── レイアウト ─── */
.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background: var(--color-primary);
  color: var(--color-sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ─── サイドバー ─── */
.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: white;
}

.brand-badge {
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}

.brand-sub {
  font-size: 11px;
  color: var(--color-sidebar-text);
  margin-top: 4px;
}

.nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}

.nav-section {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  padding: 12px 8px 4px;
  letter-spacing: 0.1em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--color-sidebar-text);
  text-decoration: none;
  margin-bottom: 2px;
  font-size: 14px;
  transition: background 0.15s;
}

.nav-item:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.nav-item.active {
  background: var(--color-primary-dark);
  color: white;
  font-weight: 500;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nav-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 8px 4px;
}

.shop-selector {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.shop-icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

/* ─── ヘッダー ─── */
.header {
  height: 60px;
  background: white;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text-muted);
}

.icon-btn:hover { background: var(--color-bg-soft); }

.search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-soft);
  font-size: 13px;
}

.search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
}

.kbd {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--color-text-muted);
  background: white;
  border: 1px solid var(--color-border);
  padding: 2px 6px;
  border-radius: 4px;
}

.header-spacer { flex: 1; }

.date-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

.date-selector strong { font-size: 14px; }

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  cursor: pointer;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 12px;
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 24px;
}

/* ─── コンテンツ ─── */
.content {
  flex: 1;
  padding: 24px 32px;
  overflow-y: auto;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}

.page-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 20px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid var(--color-border);
  background: white;
  color: var(--color-text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-family: inherit;
}

.btn:hover { background: var(--color-bg-soft); }

.btn-primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  color: white;
}

.btn-accent {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}
.btn-accent:hover {
  background: #b91c1c;
  color: white;
}

.btn-success {
  background: var(--color-success);
  color: white;
  border-color: var(--color-success);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 12px;
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* ─── タブ ─── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 20px;
  gap: 4px;
}

.tab {
  padding: 12px 20px;
  border: none;
  background: none;
  font-size: 14px;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
  font-weight: 500;
}

.tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.tab svg { width: 16px; height: 16px; }

/* ─── カード ─── */
.card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg { width: 18px; height: 18px; color: var(--color-primary); }

/* ─── KPIカード ─── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.kpi {
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--color-border);
  position: relative;
}

.kpi.kpi-orange { background: var(--color-kpi-orange); border-color: #fed7aa; }
.kpi.kpi-green { background: var(--color-kpi-green); border-color: #bbf7d0; }
.kpi.kpi-yellow { background: var(--color-kpi-yellow); border-color: #fef08a; }
.kpi.kpi-blue { background: var(--color-kpi-blue); border-color: #bfdbfe; }

.kpi-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label svg {
  width: 16px;
  height: 16px;
  opacity: 0.6;
}

.kpi-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.kpi-unit {
  font-size: 14px;
  font-weight: 500;
  margin-left: 2px;
  color: var(--color-text-muted);
}

.kpi-sub {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ─── テーブル ─── */
.table-wrap {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

th {
  background: var(--color-bg-soft);
  font-weight: 600;
  font-size: 12px;
  color: var(--color-text-muted);
}

tr:last-child td { border-bottom: none; }

tr:hover { background: var(--color-bg-soft); }

/* ─── バッジ ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.badge-vip { background: #fef3c7; color: #b45309; }
.badge-regular { background: #dbeafe; color: #1e40af; }
.badge-new { background: #fce7f3; color: #be185d; }
.badge-course { background: #ede9fe; color: #6b21a8; }
.badge-course-b { background: #e0e7ff; color: #3730a3; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* ─── ブレッドクラム ─── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.breadcrumb a { color: var(--color-text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb svg { width: 14px; height: 14px; }

/* ─── 通知ドット ─── */
.has-dot {
  position: relative;
}
.has-dot::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  border: 2px solid white;
}

/* ─── ユーティリティ ─── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 12px; }
.text-muted { color: var(--color-text-muted); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }
.text-primary { color: var(--color-primary); }
.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-full { width: 100%; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* ─── 入力 ─── */
.form-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-1 { grid-template-columns: 1fr; }

.form-field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--color-text);
}

.form-field label .req {
  color: var(--color-accent);
  margin-left: 2px;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: white;
  color: var(--color-text);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.1);
}

.form-field textarea { resize: vertical; min-height: 60px; }

.form-field .input-row {
  display: flex;
  gap: 8px;
}

.form-field .input-row input { flex: 1; }

/* ─── 大型打刻カード ─── */
.clock-card {
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
  border: 1px solid #fed7aa;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.clock-date {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.clock-time {
  font-size: 64px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin: 8px 0 24px;
  color: var(--color-text);
}

.clock-btn {
  font-size: 18px;
  padding: 18px 64px;
  border-radius: 12px;
  font-weight: 600;
}

.clock-meta {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 16px;
}

/* ─── プロフィールヘッダー ─── */
.profile-banner {
  background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%);
  color: white;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.profile-banner .avatar {
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
}

.profile-name {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-meta {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 4px;
}

.profile-tags {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.profile-tag {
  background: rgba(255,255,255,0.2);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
}

/* ─── モーダル ─── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  z-index: 100;
  overflow-y: auto;
}

.modal {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 20px 24px;
  border-bottom: 1px solid #fed7aa;
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-header .badge-live {
  background: white;
  color: var(--color-accent);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.modal-header .badge-live::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.modal-icon {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  padding: 4px;
}

.modal-body { padding: 24px; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--color-bg-soft);
}

/* ─── リアルタイム判定パネル ─── */
.judge-panel {
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.judge-panel.judge-ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}
.judge-panel.judge-warn {
  background: #fef9c3;
  border: 1px solid #fde047;
}
.judge-panel.judge-ng {
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.judge-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 12px;
}

.recommend-item {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.15s;
}

.recommend-item:hover {
  border-color: var(--color-primary);
  background: var(--color-kpi-orange);
}

.recommend-item.best {
  border-color: #f59e0b;
  background: #fffbeb;
}

.recommend-item .star { color: #f59e0b; }

/* ─── タイムライングリッド ─── */
.timeline-wrap {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: auto;
}

.timeline {
  display: grid;
  grid-template-columns: 160px repeat(28, 40px);
  min-width: max-content;
}

.timeline-header,
.timeline-row {
  display: contents;
}

.tl-cell {
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 6px 4px;
  font-size: 11px;
  min-height: 48px;
  position: relative;
}

.tl-cell.tl-time {
  text-align: center;
  background: var(--color-bg-soft);
  font-weight: 500;
  color: var(--color-text-muted);
  font-size: 10px;
  min-height: auto;
  padding: 8px 2px;
  border-bottom: 2px solid var(--color-border);
}

.tl-cell.tl-time.tl-hour {
  font-weight: 700;
  color: var(--color-text);
}

.tl-cell.tl-table {
  background: var(--color-bg-soft);
  font-weight: 500;
  position: sticky;
  left: 0;
  z-index: 1;
  font-size: 12px;
}

.tl-cell.tl-table .tl-cap {
  font-size: 10px;
  color: var(--color-text-muted);
  display: block;
}

.tl-cell.tl-table.tl-combine {
  color: var(--color-primary);
}

.tl-block {
  position: absolute;
  top: 4px;
  bottom: 4px;
  background: linear-gradient(180deg, #c2410c 0%, #9a3412 100%);
  color: white;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
  white-space: nowrap;
}

.tl-block:hover { filter: brightness(1.1); }

.tl-block.tl-course-a { background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%); }
.tl-block.tl-course-b { background: linear-gradient(180deg, #7c3aed 0%, #5b21b6 100%); }
.tl-block.tl-vip { background: linear-gradient(180deg, #b45309 0%, #78350f 100%); }
.tl-block.tl-walkin { background: linear-gradient(180deg, #64748b 0%, #475569 100%); }

.tl-block-combine {
  border: 2px dashed #fbbf24;
  outline: 2px solid rgba(251, 191, 36, 0.3);
}

/* スクロールバー */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: #d6d3d1; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #a8a29e; }

/* ===================================================================
   📱 レスポンシブ対応（タブレット / スマホ）
=================================================================== */

/* iOS入力ズーム防止: input/select/textarea のフォントサイズを 16px に */
@media (max-width: 1023px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* タブレット (768-1023px) */
@media (max-width: 1023px) {
    .sidebar {
        width: 200px;
    }
    .header {
        padding: 10px 16px;
    }
    .content {
        padding: 16px;
    }
    .toolbar {
        flex-wrap: wrap;
        gap: 8px;
    }
    .kpi-grid, .sales-kpi-grid, .cust-kpi-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* スマホ (~767px) */
@media (max-width: 767px) {
    /* 全体 */
    body {
        font-size: 14px;
    }

    .app {
        flex-direction: column;
    }

    /* サイドバーをハンバーガー化 */
    .sidebar {
        position: fixed;
        top: 0;
        left: -260px;
        width: 240px;
        height: 100vh;
        z-index: 200;
        transition: left 0.25s ease;
        box-shadow: 2px 0 15px rgba(0,0,0,0.3);
    }
    .sidebar.open {
        left: 0;
    }

    /* サイドバーバックドロップ */
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 150;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s;
    }
    .sidebar-backdrop.open {
        opacity: 1;
        pointer-events: auto;
    }

    /* ハンバーガーボタン（スマホで出現） */
    .hamburger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: none;
        border: 1px solid var(--color-border);
        border-radius: 6px;
        cursor: pointer;
    }

    /* ヘッダー圧縮 */
    .header {
        padding: 8px 12px;
        gap: 6px;
    }
    .search {
        display: none !important; /* 検索バーは非表示 */
    }
    .header-spacer {
        display: none;
    }
    .date-selector strong {
        font-size: 13px;
    }
    .date-selector div div {
        display: none; /* "年度"ラベル非表示 */
    }

    /* コンテンツ */
    .content {
        padding: 12px;
        padding-bottom: 80px; /* ボトムナビ用余白 */
    }

    /* ツールバー */
    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .toolbar .flex {
        flex-wrap: wrap;
    }
    .page-title {
        font-size: 18px;
    }
    .page-subtitle {
        font-size: 11px;
    }

    /* KPIグリッド: 1列 or 2列 */
    .kpi-grid, .sales-kpi-grid, .cust-kpi-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .kpi-card, .sales-kpi, .cust-kpi {
        padding: 10px 12px !important;
    }
    .kpi-card .value, .sales-kpi .value, .cust-kpi .value {
        font-size: 18px !important;
    }

    /* モーダル: フルスクリーン化 */
    .modal-backdrop {
        padding: 0 !important;
        align-items: stretch !important;
    }
    .modal {
        max-width: 100% !important;
        max-height: 100vh !important;
        height: 100vh;
        border-radius: 0 !important;
        overflow-y: auto;
    }

    /* テーブル/リスト系: 横スクロール可能に */
    .staff-list-container,
    .cust-list,
    .payroll-list,
    .course-list,
    .sales-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* 予約一覧: カード化 */
    .res-row, .staff-row, .cust-row, .course-row, .payroll-row, .sales-row {
        font-size: 13px !important;
    }

    /* グリッド全般を縦並びに */
    .detail-grid,
    .mp-grid,
    .field-grid-2,
    .dash-row.two,
    .phone-layout {
        grid-template-columns: 1fr !important;
    }

    /* ボタンを大きく */
    .btn {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 40px;
    }
    .btn-sm {
        padding: 6px 10px;
        min-height: 32px;
    }
    .icon-btn {
        min-width: 40px;
        min-height: 40px;
    }

    /* ボトムナビゲーション */
    .bottom-nav {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid var(--color-border);
        z-index: 100;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
        padding: 4px 0;
        padding-bottom: max(4px, env(safe-area-inset-bottom));
    }
    .bottom-nav a {
        flex: 1;
        text-align: center;
        padding: 8px 4px;
        text-decoration: none;
        color: var(--color-text-muted);
        font-size: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
    }
    .bottom-nav a i {
        width: 22px;
        height: 22px;
    }
    .bottom-nav a.active {
        color: var(--color-primary);
        font-weight: 700;
    }

    /* 予約タイムライン: スマホ用カード表示 */
    .tl-container {
        font-size: 11px;
    }
    .tl-label {
        width: 90px !important;
        padding: 4px 6px !important;
    }
    .tl-cell {
        width: 50px !important;
    }
    .tl-label .tl-cap {
        font-size: 9px;
    }

    /* フロアマップ: 1列に */
    .floor-map {
        grid-template-columns: 1fr !important;
        grid-template-areas:
            "counter"
            "T5"
            "T6"
            "T4"
            "T3"
            "T7"
            "T8"
            "T2"
            "T1" !important;
    }
    .floor-cell.area-counter {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* サイドパネル（フロアマップ） */
    .side-panel {
        width: 100vw !important;
    }
}

/* タブレット & PC: ハンバーガー非表示、ボトムナビ非表示 */
@media (min-width: 768px) {
    .hamburger {
        display: none !important;
    }
    .bottom-nav {
        display: none !important;
    }
    .sidebar-backdrop {
        display: none !important;
    }
}

/* スマホ縦向きの追加調整 */
@media (max-width: 480px) {
    .kpi-grid, .sales-kpi-grid, .cust-kpi-row {
        grid-template-columns: 1fr !important;
    }
    .toolbar {
        flex-direction: column;
    }
}

/* タッチ操作の改善 */
@media (hover: none) {
    .tl-block, .seat-tile, .nav-item, .btn {
        -webkit-tap-highlight-color: rgba(194,65,12,0.1);
    }
}
