*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: "ヒラギノ角ゴ ProN","Hiragino Kaku Gothic ProN","游ゴシック Medium","Yu Gothic Medium",游ゴシック体,"Yu Gothic",YuGothic,メイリオ,Meiryo,Osaka,"ＭＳ Ｐゴシック","MS PGothic",sans-serif;
  font-size: 14px;
  color: rgb(70,83,98);
  background-color: rgb(53,124,176);
  min-height: 100vh;
}
a { color: rgb(53,124,176); text-decoration: none; }
a:hover { text-decoration: underline; }

#wrapper { background: transparent; padding: 40px; min-width: 1100px; min-height: 100vh; }
#page-wrapper { background-color: #fff; max-width: 1720px; margin: 0 auto; position: relative; min-height: calc(100vh - 80px); }

/* Header */
.header { padding: 14px 22px; border-bottom: 1px solid rgb(224,224,224); background-color: #fff; margin-left: 240px; }
.header-welcome { font-size: 12px; color: rgb(120,130,140); text-align: right; margin-bottom: 6px; }
.header-welcome-line {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}
.header-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgb(53,124,176);
  flex-shrink: 0;
}
.header-role-badge svg { display: block; vertical-align: middle; }
.user-name { margin-right: 4px; font-weight: 700; color: rgb(70,83,98); }
.header-select select {
  width: 320px; padding: 6px 12px; border: 1px solid #ced4da; border-radius: 0;
  font-size: 14px; color: rgb(70,83,98); background: #fff; font-family: inherit;
}
.prop-picker { position: relative; width: 480px; }
.prop-picker-btn {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  background: #fff;
  color: rgb(70,83,98);
  font-size: 15px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}
.prop-picker-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  background: #fff;
  border: 1px solid #ced4da;
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
  z-index: 2000;
}
.prop-picker.open .prop-picker-menu { display: block; }
.prop-picker-item {
  width: 100%;
  text-align: left;
  border: none;
  background: #fff;
  padding: 8px 10px;
  font-size: 14px;
  color: rgb(70,83,98);
  cursor: pointer;
}
.prop-picker-item:hover { background: rgba(53,124,176,0.08); }
.prop-picker-mode-tab { padding:8px 12px; font-size:11px; font-weight:600; color:#8a9bb0; border:none; border-bottom:2px solid transparent; background:none; cursor:pointer; font-family:inherit; }
.prop-picker-mode-tab:hover { color:#465362; }
.prop-picker-mode-tab.active { color:#357cb0; border-bottom-color:#357cb0; }
.prop-picker-item.current { font-weight: 700; color: rgb(53,124,176); }
.btn-logout { background: none; border: none; color: rgb(70,83,98); font-size: 14px; cursor: pointer; font-weight: 700; font-family: inherit; white-space: nowrap; }
.btn-logout:hover { color: rgb(53,124,176); }

/* App shell (Sidebar) */
.sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  border-right: 1px solid rgb(224,224,224);
  background: #fff;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2;
}
.sidebar-brand {
  color: rgb(70,83,98);
  margin-bottom: 0;
  padding: 6px 8px 8px;
  border-bottom: none;
  line-height: 1.2;
  flex-shrink: 0;
}
.sidebar-brand .brand-main {
  display: block;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.sidebar-brand .brand-sub {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  color: rgb(53,124,176);
  letter-spacing: 0.3px;
}

/* ============================================
   ＋AI mode バッジ
   ============================================ */

@keyframes ai-mode-shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes ai-mode-icon-rotate {
  0%   { transform: rotate(0deg) scale(1);   opacity: 1;   }
  25%  { transform: rotate(90deg) scale(1.2); opacity: 0.8; }
  50%  { transform: rotate(180deg) scale(1);  opacity: 1;   }
  75%  { transform: rotate(270deg) scale(1.2);opacity: 0.8; }
  100% { transform: rotate(360deg) scale(1);  opacity: 1;   }
}

.ai-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px 4px 8px;
  border-radius: 999px;
  border: 1px solid #c4b5fd;
  background: transparent;
  margin-top: 6px;
  width: fit-content;
}

.ai-mode-badge__icon {
  font-size: 12px;
  color: #a78bfa;
  line-height: 1;
  display: inline-block;
  transform-origin: center center;
  animation: ai-mode-icon-rotate 6s ease-in-out infinite;
}

.ai-mode-badge__text {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1;
  background: linear-gradient(
    90deg,
    #a78bfa 0%,
    #60a5fa 40%,
    #a78bfa 80%,
    #60a5fa 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: ai-mode-shimmer 5s linear infinite;
}

/* ナビ項目が多いときはサイドバー内でスクロール（はみ出して body の青背景の上に描画されないようにする） */
.sidebar-group {
  margin-top: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgb(70,83,98);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar a:hover { background: rgba(53,124,176,0.08); text-decoration: none; }
.sidebar a.current { background: rgba(53,124,176,0.14); color: rgb(53,124,176); }
.sidebar .nav-badge {
  margin-left: 6px;
  background: #0891b2;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  vertical-align: middle;
}
.sidebar .sidebar-spacer { height: 6px; }
.sidebar-nav-group{margin-bottom:2px}
.sidebar-nav-group-title{display:flex;align-items:center;justify-content:space-between;padding:7px 10px;font-size:11px;font-weight:700;color:#94a3b8;text-transform:uppercase;letter-spacing:.04em;cursor:pointer;border-radius:6px;user-select:none}
.sidebar-nav-group-title:hover{background:rgba(53,124,176,.05);color:#64748b}
.sidebar-nav-group-title .nav-group-arrow{font-size:10px;transition:transform .15s ease;color:#b0b8c4}
.sidebar-nav-group.open .nav-group-arrow{transform:rotate(90deg)}
.sidebar-nav-group-items{display:none;flex-direction:column;gap:1px;padding:0 0 4px 0}
.sidebar-nav-group.open .sidebar-nav-group-items{display:flex}
.sidebar-nav-group-items a{padding:7px 10px 7px 18px;font-size:13px;font-weight:600}
.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  flex-shrink: 0;
  background: #fff;
}
.sidebar-footer .sidebar-security-link { display: block; text-align: center; font-size: 11px; color: rgb(130,140,150); text-decoration: none; margin-bottom: 10px; }
.sidebar-footer .sidebar-security-link:hover { color: rgb(53,124,176); }
.sidebar-footer .btn-logout { width: 100%; border: 1px solid rgb(224,224,224); padding: 8px 10px; border-radius: 8px; text-align: center; }

/* Main */
.main { padding: 0 22px 40px; background: #fff; margin-left: 240px; }
.section { margin-bottom: 40px; }
.section-header { display: flex; align-items: center; padding-bottom: 8px; border-bottom: 1px solid rgb(224,224,224); margin-bottom: 10px; }
.section-heading { font-size: 14px; font-weight: 600; color: rgb(70,83,98); }

/* Utilities */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.ms-auto { margin-left: auto; }
.me-3 { margin-right: 12px; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-3 { margin-top: 12px; }
.justify-content-center { justify-content: center; }
.text-end { text-align: right; }
.text-nowrap { white-space: nowrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

/* Form controls */
.form-control { padding: 4px 8px; border: 1px solid #ced4da; border-radius: 0; font-size: 14px; width: 130px; font-family: inherit; color: rgb(70,83,98); }
.form-control:focus { outline: none; border-color: rgb(53,124,176); }
select.form-control { width: auto; }

/* Buttons */
.btn { padding: 5px 14px; border: 1px solid #ccc; background: #fff; color: rgb(70,83,98); font-size: 13px; cursor: pointer; border-radius: 2px; font-family: inherit; white-space: nowrap; }
.btn:hover { background: #f5f5f5; }
.btn-primary-solid { background: rgb(53,124,176); color: #fff; border-color: rgb(53,124,176); }
.btn-primary-solid:hover { background: rgb(40,100,150); }
.btn-sm { padding: 3px 10px; font-size: 12px; }

/* Nav Tabs */
.nav-tabs { display: flex; list-style: none; margin-left: auto; }
.nav-tabs .nav-link { background: rgb(224,224,224); color: rgb(70,83,98); border: none; padding: 2px 26px; cursor: pointer; font-size: 14px; font-family: inherit; }
.nav-tabs .nav-link.active { background: rgb(70,83,98); color: #fff; }
.nav-tabs .nav-link:hover:not(.active) { background: rgb(200,200,200); }

/* Table */
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; font-size: 13px; color: rgb(70,83,98); min-width: 100%; }
table th { background: #fff; padding: 6px 10px; text-align: center; font-weight: 600; font-size: 13px; border: 1px solid rgb(224,224,224); white-space: nowrap; }
table th.th-left { text-align: left; }
table th.year-span { background: rgba(224,224,224,0.4); }
table td { padding: 5px 10px; border: 1px solid rgb(224,224,224); text-align: center; }
table td:first-child { text-align: left; white-space: nowrap; }
tr.row-main td { background: #fff; }
tr.row-rate td { background: rgba(224,224,224,0.2); color: rgb(120,140,160); font-size: 12px; }
tr:hover td { background: rgba(53,124,176,0.05) !important; }

/* Badges */
.badge-tag { display: inline-block; padding: 1px 8px; border-radius: 2px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-hp { background: rgb(53,124,176); color: #fff; }
.badge-suumo { background: rgb(0,160,100); color: #fff; }
.badge-homes { background: rgb(255,100,50); color: #fff; }
.badge-yahoo { background: rgb(255,50,50); color: #fff; }
.badge-status { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; white-space: nowrap; }
.badge-entry { background: #e3f2fd; color: #1565c0; }
.badge-visit { background: #e8f5e9; color: #2e7d32; }
.badge-contract { background: #fce4ec; color: #c62828; }
.badge-cancel { background: #f5f5f5; color: #757575; }

/* Card stats */
.card-list { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 8px 0 0 0; }
.card-list li { background: rgba(224,224,224,0.31); border-radius: 6px; padding: 16px 10px; min-width: 130px; text-align: center; }
.item-title { font-size: 14px; font-weight: 600; color: rgb(70,83,98); text-align: center; margin-bottom: 8px; }
.item-number { font-size: 34px; font-weight: 700; color: rgb(53,124,176); text-align: center; line-height: 1.1; }
.item-number small { font-size: 14px; color: rgb(70,83,98); font-weight: 400; }
.item-sub { font-size: 12px; color: rgb(70,83,98); }
.item-sub dl { display: flex; gap: 4px; justify-content: center; margin-bottom: 4px; }
.item-sub dt::after { content: "："; }

/* Graph select */
.graph-select { padding: 4px 8px; border: 1px solid #ced4da; font-size: 13px; font-family: inherit; color: rgb(70,83,98); }
.radio-group { display: flex; gap: 16px; list-style: none; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.chart-placeholder { background: rgba(224,224,224,0.3); border: 1px dashed rgb(200,200,200); padding: 60px; text-align: center; color: rgb(150,160,170); font-size: 13px; }

/* Customer table in dashboard */
.customer-table { width: 100%; }
.customer-table td { padding: 6px 10px; border-bottom: 1px solid rgb(240,240,240); font-size: 13px; }
.customer-table tr:hover td { background: rgba(53,124,176,0.05); }
.to-list-link { display: block; text-align: right; font-size: 13px; margin-top: 8px; color: rgb(53,124,176); }

/* Data header */
.data-header { display: flex; align-items: center; margin-bottom: 14px; padding-top: 8px; flex-wrap: nowrap; }
.data-header h1 { font-size: 28px; font-weight: 600; color: rgb(70,83,98); white-space: nowrap; }
.link-small { font-size: 13px; color: rgb(53,124,176); margin-left: 16px; white-space: nowrap; }
.data-contents { display: flex; flex-wrap: wrap; margin-bottom: 6px; gap: 0; }
.data-contents dl { margin-right: 30px; }
.data-contents dt { font-size: 12px; color: rgb(70,83,98); font-weight: 400; }
.data-contents dd { font-size: 13px; color: rgb(70,83,98); font-weight: 400; }
.dashboard-top { display: flex; gap: 30px; }
.dashboard-top__image { flex-shrink: 0; }
.dashboard-top__image img { width: 273px; height: 295px; object-fit: cover; display: block; }
.dashboard-top__data { flex: 1; min-width: 0; }

/* Breadcrumb */
.breadcrumb { font-size: 12px; color: rgb(120,130,140); margin-top: 8px; display: flex; align-items: center; gap: 0; }
.breadcrumb a { color: rgb(53,124,176); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep { margin: 0 6px; color: rgb(180,190,200); }
.breadcrumb-current { color: rgb(70,83,98); font-weight: 600; }

/* Page title bar */
.page-title-bar { padding: 20px 0 12px; border-bottom: 1px solid rgb(224,224,224); margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; }
.page-title-bar h1 { font-size: 22px; font-weight: 600; color: rgb(70,83,98); }

/* Filter bar */
.filter-bar { background: rgba(224,224,224,0.2); border: 1px solid rgb(224,224,224); padding: 16px 20px; margin-bottom: 16px; display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter-item label { display: block; font-size: 12px; color: rgb(70,83,98); margin-bottom: 4px; }
.filter-item input, .filter-item select { padding: 5px 8px; border: 1px solid #ced4da; font-size: 13px; font-family: inherit; color: rgb(70,83,98); min-width: 150px; }
.filter-item input:focus, .filter-item select:focus { outline: none; border-color: rgb(53,124,176); }
/* フィルター内セレクト（カスタムマルチセレクトのトグルと同系の見た目） */
.filter-bar select {
  min-height: 34px;
  box-sizing: border-box;
  padding: 6px 28px 6px 10px;
  appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236a7586' d='M2.5 4L6 7.5 9.5 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  cursor: pointer;
}

/* List table */
.list-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.list-table th { background: rgb(70,83,98); color: #fff; padding: 8px 12px; text-align: left; font-weight: 600; white-space: nowrap; border: 1px solid rgb(90,103,118); }
.list-table td { padding: 8px 12px; border-bottom: 1px solid rgb(224,224,224); vertical-align: middle; text-align: left; }
.list-table tr:nth-child(even) td { background: rgba(224,224,224,0.15); }
.list-table tr:hover td { background: rgba(53,124,176,0.08) !important; cursor: pointer; }
.list-table td a { color: rgb(53,124,176); }

/* Action buttons row */
.action-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }

/* Pagination */
.pagination { display: flex; gap: 4px; justify-content: center; margin-top: 20px; }
.pagination button { width: 32px; height: 32px; border: 1px solid rgb(200,200,200); background: #fff; color: rgb(70,83,98); cursor: pointer; font-size: 13px; font-family: inherit; }
.pagination button.active { background: rgb(53,124,176); color: #fff; border-color: rgb(53,124,176); }
.pagination button:hover:not(.active) { background: rgba(224,224,224,0.5); }

/* Loading / Empty */
.loading-spinner { width: 36px; height: 36px; border: 3px solid rgb(224,224,224); border-top-color: rgb(53,124,176); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-msg { padding: 60px; text-align: center; color: rgb(150,160,170); font-size: 14px; }

/* DigitalEyes mascot */
.de-mascot { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.de-mascot-loader { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 40px 0; }
.de-mascot-loader .de-mascot { width: 48px; height: 42px; animation: de-mascot-bounce 0.5s ease-in-out infinite; }
.de-mascot-loader .de-mascot-loader-text { font-size: 12px; color: rgb(150,160,170); letter-spacing: 0.04em; }
@keyframes de-mascot-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* Walking mascot (login screen): 1980s arcade feel — small, wandering beside the DIGITALEYES logo */
.de-walker-stage { position: relative; width: 160px; height: 30px; overflow: visible; flex: 0 0 auto; }
.de-walker { position: absolute; bottom: 0; right: 0; width: 32px; height: 28px; animation: de-walk 9s linear 9s infinite; }
.de-walker__drop { position: relative; width: 100%; height: 100%; animation: de-emerge 1s steps(10,end) 8s both; }
.de-walker__bob { position: relative; width: 100%; height: 100%; }
.de-walker__body { display: block; width: 32px; height: 28px; image-rendering: pixelated; image-rendering: crisp-edges; }
.de-walker__pupil { position: absolute; width: 2px; height: 2px; background: #141414; top: 10px; animation: de-eye-pico 0.9s steps(2,end) 9s infinite; }
.de-walker__pupil--left { left: 8px; }
.de-walker__pupil--right { left: 22px; }
@keyframes de-emerge { 0% { transform: translateX(0); } 100% { transform: translateX(-94px); } }
@keyframes de-walk {
  0%   { transform: translateX(0); }
  14%  { transform: translateX(-14px); }
  28%  { transform: translateX(-14px); }
  42%  { transform: translateX(0); }
  56%  { transform: translateX(14px); }
  70%  { transform: translateX(14px); }
  85%  { transform: translateX(-6px); }
  100% { transform: translateX(0); }
}
@keyframes de-eye-pico { 0% { transform: translate(1px, 0); } 100% { transform: translate(-1px, 0); } }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-box { background: #fff; width: 100%; max-width: 700px; max-height: 88vh; overflow: hidden; box-shadow: 0 8px 40px rgba(0,0,0,0.25); }
.modal-header { background: rgb(70,83,98); padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; }
.modal-header h3 { color: #fff; font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; line-height: 1; }
.modal-body { padding: 20px; overflow-y: auto; max-height: calc(88vh - 52px); }
.detail-grid { display: grid; grid-template-columns: 160px 1fr; gap: 0; }
.detail-grid dt { padding: 7px 10px; background: rgba(224,224,224,0.25); font-size: 12px; font-weight: 600; border-bottom: 1px solid rgb(224,224,224); }
.detail-grid dd { padding: 7px 10px; font-size: 13px; border-bottom: 1px solid rgb(224,224,224); word-break: break-all; }

/* Error box */
.error-box { background: #fff3f3; border: 1px solid #ffcccc; padding: 12px 16px; color: #cc0000; font-size: 13px; margin-bottom: 16px; }

/* Schedule */
.schedule-grid { display: grid; grid-template-columns: 80px repeat(7, 1fr); border-left: 1px solid rgb(224,224,224); border-top: 1px solid rgb(224,224,224); }
.schedule-cell { border-right: 1px solid rgb(224,224,224); border-bottom: 1px solid rgb(224,224,224); padding: 4px; min-height: 60px; font-size: 12px; }
.schedule-cell.header { background: rgb(70,83,98); color: #fff; text-align: center; font-weight: 600; min-height: auto; padding: 8px 4px; }
.schedule-cell.time { background: rgba(224,224,224,0.2); text-align: center; font-size: 11px; color: rgb(120,130,140); display: flex; align-items: center; justify-content: center; }
.schedule-event { background: rgb(53,124,176); color: #fff; border-radius: 2px; padding: 2px 6px; font-size: 11px; margin-bottom: 2px; }

/* ログイン・パスワード再設定ページ（正規の業務用画面である旨） */
.login-trust-footer {
  font-size: 11px;
  color: rgb(130, 140, 150);
  line-height: 1.55;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgb(236, 236, 236);
  text-align: center;
}

/* ========================================
   ハンバーガーメニューボタン（モバイル専用）
   PC では非表示
   ======================================== */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 3000;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgb(53,124,176);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* ========================================
   レスポンシブ対応 — モバイル（768px以下）
   PC レイアウトには一切影響しません
   ======================================== */
@media (max-width: 768px) {

  /* --- 基盤レイアウト --- */
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  #wrapper {
    padding: 0;
    min-width: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  #page-wrapper {
    min-height: 100vh;
    border-radius: 0;
    max-width: 100vw;
  }

  /* --- サイドバー: 初期非表示 → .open で全画面オーバーレイ --- */
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    z-index: 2500;
    box-shadow: none;
    overflow-y: auto;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }
  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2400;
  }
  .sidebar.open ~ .sidebar-overlay,
  .sidebar-overlay.active {
    display: block;
  }
  .mobile-menu-toggle {
    display: flex;
  }

  /* --- ヘッダー --- */
  .header {
    margin-left: 0;
    padding: 10px 14px;
  }
  .header-welcome {
    font-size: 11px;
    text-align: left;
  }
  .header-welcome-line {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 4px;
  }
  .header-select select,
  .prop-picker {
    width: 100%;
    max-width: 100%;
    position: static;
  }
  .prop-picker-menu {
    position: fixed;
    left: 8px;
    right: 8px;
    top: auto;
    width: auto;
  }
  .prop-picker-btn {
    width: 100%;
    font-size: 13px;
  }
  .prop-picker-menu {
    max-height: 60vh;
  }
  .prop-picker-mode-tab {
    padding: 10px 14px;
    font-size: 13px;
  }
  .prop-picker-item {
    padding: 12px 14px;
    font-size: 15px;
    border-bottom: 1px solid #f0f0f0;
  }

  /* --- メインコンテンツ --- */
  .main {
    margin-left: 0;
    padding: 0 12px 24px;
  }

  /* --- ページタイトル --- */
  .page-title-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 0 10px;
  }
  .page-title-bar h1 {
    font-size: 18px;
  }
  .page-title-bar > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  /* --- データヘッダー (ダッシュボード) --- */
  .data-header {
    flex-wrap: wrap;
    gap: 6px;
  }
  .data-header h1 {
    font-size: 20px;
    white-space: normal;
  }
  .dashboard-top {
    flex-direction: column;
    gap: 14px;
  }
  .dashboard-top__image img {
    width: 100%;
    height: auto;
    max-height: 200px;
  }
  .data-contents {
    flex-wrap: wrap;
    gap: 4px 16px;
  }
  .data-contents dl {
    margin-right: 0;
  }

  /* --- カード統計 --- */
  .card-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .card-list li {
    min-width: 0;
    padding: 12px 8px;
  }
  .item-number {
    font-size: 26px;
  }

  /* --- フィルターバー --- */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
  }
  .filter-item input,
  .filter-item select {
    width: 100%;
    min-width: 0;
  }

  /* --- アクションボタン行 --- */
  .action-row {
    flex-wrap: wrap;
    gap: 6px;
  }
  .action-row .btn,
  .action-row button {
    font-size: 11px;
    padding: 4px 8px;
  }

  /* --- テーブル --- */
  .table-scroll,
  .ap-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table {
    min-width: 600px;
  }
  .list-table {
    min-width: 600px;
  }

  /* --- モーダル --- */
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal-box {
    max-width: 100%;
    max-height: 95vh;
    border-radius: 12px 12px 0 0;
  }
  .modal-body {
    max-height: calc(95vh - 52px);
    padding: 14px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-grid dt {
    border-bottom: none;
    padding: 6px 10px 2px;
    font-size: 11px;
    color: rgb(120,130,140);
  }
  .detail-grid dd {
    padding: 2px 10px 8px;
  }

  /* --- スケジュールグリッド --- */
  .schedule-grid {
    grid-template-columns: 50px repeat(7, 1fr);
    font-size: 11px;
  }
  .schedule-cell {
    min-height: 40px;
    padding: 2px;
  }
  .schedule-cell.header {
    font-size: 10px;
    padding: 4px 2px;
  }

  /* --- ナビタブ --- */
  .nav-tabs {
    flex-wrap: wrap;
  }
  .nav-tabs .nav-link {
    font-size: 12px;
    padding: 4px 14px;
  }

  /* --- ページネーション --- */
  .pagination {
    flex-wrap: wrap;
  }
  .pagination button {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  /* --- フォーム --- */
  .form-control {
    width: 100%;
  }

  /* --- 分析ページ グラフ選択 --- */
  .radio-group {
    gap: 8px;
    font-size: 12px;
  }

  /* --- パンくず --- */
  .breadcrumb {
    font-size: 11px;
    flex-wrap: wrap;
  }

  /* --- セクションヘッダー --- */
  .section-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* --- 顧客詳細モーダル（drawer-grid） --- */
  .drawer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .drawer-grid .full {
    grid-column: 1 / -1;
  }

  /* --- 顧客一覧テーブル系 --- */
  .customer-table {
    min-width: 500px;
  }

  /* --- 広告パフォーマンス --- */
  .ap-wrap { max-width: 100%; }
  .ap-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .ap-toolbar .field {
    width: 100%;
  }
  .ap-toolbar select,
  .ap-toolbar input[type="date"] {
    width: 100%;
  }
  .ap-summary-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .ap-kpi .v {
    font-size: 18px !important;
  }
  .ap-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .ap-tab {
    white-space: nowrap;
    font-size: 12px;
    padding: 8px 12px;
  }
  .ap-chart-row {
    grid-template-columns: 1fr !important;
  }
  .ap-platform-row {
    grid-template-columns: 1fr !important;
  }

  /* --- スケジュール --- */
  .schedule-grid {
    grid-template-columns: 40px repeat(7, 1fr);
  }
  .schedule-event {
    font-size: 10px;
    padding: 1px 3px;
  }

  /* --- メール配信画面 --- */
  .ml-wrap {
    max-width: 100%;
  }

  /* --- 分析画面 --- */
  .chart-placeholder {
    padding: 30px 10px;
  }

  /* --- ログイン画面 --- */
  .login-box,
  .login-form {
    max-width: 100% !important;
    padding: 20px !important;
  }
}
