/* ══════════════════════════════════════════════════════════════
   Lucky Manager v2 — Dashboard Theme
   ══════════════════════════════════════════════════════════════ */

/* ── テーマ変数 (Dark) ───────────────────────── */
[data-bs-theme="dark"] {
  --bg:        #0b1018;
  --surface:   #1a2335;
  --surface2:  #222e42;
  --surface3:  #2a3750;
  --border:    #354562;
  --border-hi: #4a5f80;
  --tx:        #e8edf4;
  --tx2:       #7b8a9e;
  --tx3:       #4e5c6f;
  --blue:      #5ba4f5;
  --green:     #4ade80;
  --yellow:    #f0b429;
  --red:       #ef4444;
  --purple:    #a78bfa;
  --orange:    #f59e0b;
  --log-bg:    #0d1118;
  --glass-bg:  rgba(26, 35, 53, 0.78);
  --glass-border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
}

/* ── テーマ変数 (Light) ──────────────────────── */
[data-bs-theme="light"] {
  --bg:        #f0f2f6;
  --surface:   #ffffff;
  --surface2:  #f7f8fb;
  --surface3:  #eef0f4;
  --border:    #d4d9e2;
  --border-hi: #b0b8c5;
  --tx:        #1a1f2b;
  --tx2:       #5a6376;
  --tx3:       #9aa2b1;
  --blue:      #2563eb;
  --green:     #16a34a;
  --yellow:    #ca8a04;
  --red:       #dc2626;
  --purple:    #7c3aed;
  --orange:    #ea580c;
  --log-bg:    #f7f8fb;
  --glass-bg:  rgba(255, 255, 255, 0.82);
  --glass-border: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.1);
}

/* ── ベース ──────────────────────────────────── */
body {
  background: var(--bg); color: var(--tx);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}
.main-wrap { padding-top: 56px; }

/* ── ナビバー ─────────────────────────────────── */
.navbar {
  border-bottom: 1px solid var(--glass-border);
  background: var(--glass-bg) !important;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 12px rgba(0,0,0,0.15);
  min-height: 48px;
}
.navbar-brand { font-weight: 700; font-size: 15px; transition: opacity .15s; }
.navbar-brand:hover { opacity: 0.8; text-decoration: none; }

/* ── WebSocket ステータスバッジ ─────────────── */
.ws-badge { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 12px; transition: all .3s ease; }
.ws-online  { background: rgba(74,222,128,0.12); color: var(--green); border: 1px solid rgba(74,222,128,0.3); }
.ws-offline { background: rgba(239,68,68,0.12);  color: var(--red);   border: 1px solid rgba(239,68,68,0.3); }
.ws-reconnecting { background: rgba(240,180,41,0.12); color: var(--yellow); border: 1px solid rgba(240,180,41,0.3); animation: wsReconnect 1.5s infinite ease-in-out; }
@keyframes wsReconnect { 0%,100% { opacity:.5 } 50% { opacity:1 } }

/* ── 一時停止バー ─────────────────────────────── */
#paused-alert {
  background: rgba(240,180,41,0.1); border: 1px solid rgba(240,180,41,0.3); color: var(--yellow);
  border-radius: 8px; padding: 5px 14px; font-size: 13px;
  animation: pausedPulse 2s infinite ease-in-out;
}
@keyframes pausedPulse { 0%,100% { opacity:.8 } 50% { opacity:1 } }

/* ── カード ──────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  height: 100%; display: flex; flex-direction: column; overflow: hidden;
}
[data-bs-theme="dark"] .card { border-width: 1.5px; }
.card-header {
  background: var(--glass-bg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  padding: 10px 14px;
  font-size: 11px; font-weight: 600; color: var(--tx2);
  text-transform: uppercase; letter-spacing: .5px;
  display: flex; align-items: center; gap: 7px;
  cursor: grab; user-select: none;
}
.card-header:active { cursor: grabbing; }
.ui-draggable-dragging .card-header { cursor: grabbing; }
.card-header .card-title-icon { color: var(--blue); font-size: 13px; }
.card-header .ms-auto { text-transform: none; letter-spacing: 0; }
.card-body { color: var(--tx); flex: 1; overflow-y: auto; min-height: 0; }

/* ── 画像フィード ─────────────────────────────── */
img.feed { width:100%; height:auto; display:block; border-radius:4px; object-fit:contain; background:var(--surface2); }

/* ── ステータスバッジ ─────────────────────────── */
.s-badge {
  display: inline-flex; align-items: center; padding: 5px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: .03em;
  transition: all .4s ease;
}
.s-badge.state-changing { transform: scale(1.12); filter: brightness(1.3); }
.s-working  { background: rgba(74,222,128,0.12);  color: var(--green);  border: 1px solid rgba(74,222,128,0.3); }
.s-break    { background: rgba(240,180,41,0.12);  color: var(--yellow); border: 1px solid rgba(240,180,41,0.3); }
.s-away     { background: rgba(239,68,68,0.12);   color: var(--red);    border: 1px solid rgba(239,68,68,0.3); }
.s-sleeping { background: rgba(167,139,250,0.12); color: var(--purple); border: 1px solid rgba(167,139,250,0.3); }
.s-outing   { background: rgba(245,158,11,0.12);  color: var(--orange); border: 1px solid rgba(245,158,11,0.3); }
.s-unknown  { background: rgba(123,138,158,0.1);  color: var(--tx2);    border: 1px solid rgba(123,138,158,0.25); }

/* ── 外出バッジ ──────────────────────────────── */
.away-badge { display:inline-flex; align-items:center; padding:2px 8px; border-radius:6px; font-size:12px; font-weight:600; }
.away-home    { background: rgba(74,222,128,0.1);  color: var(--green);  border: 1px solid rgba(74,222,128,0.25); }
.away-out     { background: rgba(245,158,11,0.1);  color: var(--orange); border: 1px solid rgba(245,158,11,0.25); }
.away-unknown { background: transparent; color: var(--tx3); border: none; }

/* ── 怒りバー ────────────────────────────────── */
.anger-bar-track {
  height: 18px; background: var(--surface2); border-radius: 9px; overflow: hidden;
  position: relative;
}
.anger-bar-fill {
  height: 100%; border-radius: 9px;
  transition: width 0.6s cubic-bezier(.4,0,.2,1), background 0.6s ease;
}
@keyframes angerPulse {
  0%,100% { opacity:.85 }
  50% { opacity:1; box-shadow: 0 0 12px rgba(239,68,68,0.5); }
}

/* ── stat ──────────────────────────────────── */
.stat-val  { font-size: 1.5rem; font-weight: 700; color: var(--tx); line-height: 1; transition: color .3s; }
.stat-unit { font-size: 11px; color: var(--tx2); }
.stat-lbl  { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--tx2); margin-bottom: 2px; }

/* ── 作業ログボックス ─────────────────────── */
.worklog-box {
  overflow-y:auto; font-family:'Cascadia Code','Consolas',monospace;
  font-size:11px; line-height:1.5; background:var(--log-bg); color:var(--tx); padding:8px; height:100%;
}
.worklog-row { display:flex; align-items:flex-start; gap:8px; padding:4px 0; border-bottom:1px solid var(--border); animation: rowSlideIn .25s ease-out; }
.worklog-row:last-child { border-bottom:none; }
.worklog-ts   { color:var(--tx2); white-space:nowrap; flex-shrink:0; font-size:10px; }
.worklog-dot  { width:8px; height:8px; border-radius:50%; margin-top:3px; flex-shrink:0; }
.worklog-body { flex:1; word-break:break-word; }
.worklog-state { color:var(--tx2); font-size:10px; }
@keyframes rowSlideIn { from { opacity:0; transform:translateX(-6px) } to { opacity:1; transform:translateX(0) } }

/* ── チャット UI ──────────────────────────── */
.chat-area {
  overflow-y:auto; display:flex; flex-direction:column; gap:6px; padding:10px;
  background:var(--bg); border:1px solid var(--border); border-radius:10px; min-height:0; scroll-behavior:smooth;
}
.bubble {
  max-width:82%; border-radius:16px; padding:9px 14px; font-size:12.5px; line-height:1.6;
  word-break:break-word; animation:bubbleIn .2s ease-out; position:relative;
}
@keyframes bubbleIn { from { opacity:0; transform:translateY(8px) scale(.96) } to { opacity:1; transform:translateY(0) scale(1) } }
.bubble-user {
  background:linear-gradient(135deg,var(--blue),#4090e8); color:#fff; align-self:flex-end;
  border-bottom-right-radius:4px; box-shadow: 0 2px 8px rgba(91,164,245,0.25);
}
.bubble-yukari {
  background: rgba(167,139,250,0.1); color: var(--tx); align-self: flex-start;
  border-bottom-left-radius: 4px; border: 1px solid rgba(167,139,250,0.28);
}
.bubble-akari {
  background: rgba(251,191,36,0.08); color: var(--tx); align-self: flex-start;
  border-bottom-left-radius: 4px; border: 1px solid rgba(251,191,36,0.25);
}
[data-bs-theme="light"] .bubble-yukari {
  background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.22);
}
[data-bs-theme="light"] .bubble-akari {
  background: rgba(217,119,6,0.08); border-color: rgba(217,119,6,0.22);
}

/* ── キャラクターテーマ ──────────────────────── */
/* チャットタブ（ヘッダー）*/
body[data-voice="yukari"] [gs-id="chat"] .card-header {
  background: rgba(167,139,250,0.18);
  border-bottom-color: rgba(167,139,250,0.35);
}
body[data-voice="yukari"] [gs-id="chat"] .card-header .card-title-icon { color: #a78bfa; }
body[data-voice="akari"] [gs-id="chat"] .card-header {
  background: rgba(251,191,36,0.12);
  border-bottom-color: rgba(251,191,36,0.3);
}
body[data-voice="akari"] [gs-id="chat"] .card-header .card-title-icon { color: #fbbf24; }
[data-bs-theme="light"] body[data-voice="yukari"] [gs-id="chat"] .card-header {
  background: rgba(124,58,237,0.1);
  border-bottom-color: rgba(124,58,237,0.25);
}
[data-bs-theme="light"] body[data-voice="yukari"] [gs-id="chat"] .card-header .card-title-icon { color: #7c3aed; }
[data-bs-theme="light"] body[data-voice="akari"] [gs-id="chat"] .card-header {
  background: rgba(217,119,6,0.1);
  border-bottom-color: rgba(217,119,6,0.25);
}
[data-bs-theme="light"] body[data-voice="akari"] [gs-id="chat"] .card-header .card-title-icon { color: #d97706; }

/* チャットバブル（フォールバック） */
.bubble-char {
  background: var(--surface2); color: var(--tx); align-self: flex-start;
  border-bottom-left-radius: 4px; border: 1px solid var(--border);
}
.bubble-monitor {
  background:transparent; color:var(--tx2); align-self:flex-start;
  border:1px dashed var(--border); font-size:11.5px; opacity:.85; max-width:90%;
}
.bubble-loading { opacity:.7; animation:pulse 1.2s infinite ease-in-out; }
.bubble-loading::after { content:''; display:inline-block; width:4px; height:4px; border-radius:50%; background:var(--tx2); margin-left:2px; animation:dots 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity:.4 } 50% { opacity:.85 } }
@keyframes dots { 0%,20% { opacity:0 } 50% { opacity:1 } 100% { opacity:0 } }
.bubble-ts { font-size:9px; color:var(--tx2); margin-top:2px; opacity:.7; }
.quick-btn { font-size:11px; padding:3px 10px; border-radius:14px; transition:all .15s ease; }
.quick-btn:hover { transform:translateY(-1px); box-shadow:0 2px 6px rgba(0,0,0,0.15); }

/* ── dark-input ──────────────────────────── */
.dark-inp { background:var(--log-bg)!important; border-color:var(--border)!important; color:var(--tx)!important; border-radius:8px; }
.dark-inp::placeholder { color:var(--tx3)!important; }
.dark-inp:focus { border-color:var(--blue)!important; box-shadow:0 0 0 3px rgba(91,164,245,0.15)!important; }

/* ── 設定テーブル ────────────────────────── */
.cfg-table { width:100%; }
.cfg-table td { padding:5px 0; border-bottom:1px solid var(--border); font-size:12px; vertical-align:middle; }
.cfg-table tr:last-child td { border-bottom:none; }
.cfg-table td:first-child { color:var(--tx2); width:60%; }
.cfg-inp { width:76px; background:var(--log-bg); border:1px solid var(--border); color:var(--tx); border-radius:6px; padding:3px 7px; font-size:12px; }
.cfg-inp:focus { outline:none; border-color:var(--blue); box-shadow:0 0 0 3px rgba(91,164,245,0.12); }
.cfg-inp-wide { width:100%; box-sizing:border-box; }
.pw-wrap { position:relative; display:flex; align-items:center; }
.pw-wrap .cfg-inp { flex:1; padding-right:28px; }
.pw-eye { position:absolute; right:4px; background:none; border:none; cursor:pointer; color:var(--tx2); padding:2px 4px; font-size:13px; line-height:1; opacity:.7; }
.pw-eye:hover { opacity:1; color:var(--tx); }

/* ── サブカメラグリッド ──────────────────── */
.subcam-grid { display:flex; flex-wrap:wrap; gap:8px; padding:4px; overflow-y:auto; max-height:100%; }
.subcam-item { display:flex; flex-direction:column; align-items:center; background:var(--log-bg); border:1px solid var(--border); border-radius:8px; overflow:hidden; flex:0 0 calc(25% - 6px); min-width:120px; }
.subcam-label { font-size:11px; color:var(--tx2); padding:3px 0; width:100%; text-align:center; background:var(--surface2); }
.subcam-img { width:100%; aspect-ratio:16/9; object-fit:cover; display:block; }

/* ── トースト通知 ─────────────────────────── */
#toast-container { position:fixed; top:56px; left:50%; transform:translateX(-50%); z-index:9999; display:flex; flex-direction:column; align-items:center; gap:6px; pointer-events:none; }
.toast-msg {
  padding:8px 20px; border-radius:22px; font-size:13px; font-weight:500; opacity:0; pointer-events:none;
  transition:opacity .22s ease, transform .22s ease; transform:translateY(-10px); white-space:nowrap;
  backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px); box-shadow:var(--shadow-md);
}
.toast-msg.show { opacity:1; transform:translateY(0); }
.toast-ok   { background:rgba(31,110,46,0.92); color:#aff5b4; border:1px solid #2ea043; }
.toast-err  { background:rgba(110,31,31,0.92); color:#ffc7c7; border:1px solid #a03030; }
.toast-info { background:rgba(30,58,95,0.92);  color:#b8d9ff; border:1px solid #2060a0; }

/* ── PTZ ─────────────────────────────────── */
.ptz-wrap { width:100%; max-width:160px; }

/* ── フィードカード (タブ統合ビュー) ──────── */
.feeds-header { padding-bottom:0!important; align-items:flex-end!important; gap:0!important; flex-wrap:nowrap; }
.feeds-tabs-wrap { flex:1; overflow-x:auto; overflow-y:hidden; scrollbar-width:none; min-width:0; }
.feeds-tabs-wrap::-webkit-scrollbar { display:none; }
.feeds-nav { flex-wrap:nowrap; border-bottom:none; gap:2px; }
.feeds-nav .nav-link { font-size:11px; padding:4px 10px; border-radius:8px 8px 0 0; color:var(--tx2); border:1px solid transparent; white-space:nowrap; transition:all .15s; }
.feeds-nav .nav-link.active { color:var(--tx); background:var(--surface); border-color:var(--border) var(--border) var(--surface); }
.feeds-nav .nav-link:hover:not(.active) { color:var(--tx); background:var(--surface2); }
.feeds-tab-content { flex:1; min-height:0; overflow:hidden; }
.feed-pane { height:100%; display:none; flex-direction:column; }
.feed-pane.active { display:flex!important; }
.feed-img-wrap { flex:1; min-height:0; display:flex; align-items:center; justify-content:center; background:var(--surface2); overflow:hidden; position:relative; }
.feed-llm-btn { position:absolute; top:6px; right:6px; font-size:10px; padding:2px 7px; border-radius:10px; border:1px solid var(--border); background:rgba(0,0,0,.55); color:#ccc; cursor:pointer; z-index:10; line-height:1.4; }
.feed-llm-btn:hover { background:rgba(0,0,0,.8); color:#fff; }
.feed-llm-btn-active { background:var(--blue)!important; color:#fff!important; border-color:transparent; }
.feed-img-wrap img { max-width:100%; max-height:100%; object-fit:contain; display:block; transition:opacity .3s ease; }
.feed-img-wrap img[src=""], .feed-img-wrap img:not([src]) { opacity:0; }
.feed-ts { font-size:10px; color:var(--tx2); text-align:right; padding:2px 6px; flex-shrink:0; }
.feed-ptz-bar { flex-shrink:0; border-top:1px solid var(--border); padding:4px 6px; display:flex; justify-content:center; gap:3px; background:var(--surface2); flex-wrap:wrap; }
.feed-ptz-bar .btn { font-size:11px; padding:2px 7px; line-height:1.4; }
.feed-ptz-sep { width:1px; background:var(--border); margin:2px; flex-shrink:0; }

/* ── GridStack オーバーライド ─────────────── */
.grid-stack { background:transparent; }
.grid-stack-item-content { border-radius:14px!important; overflow:hidden; box-shadow:var(--shadow-md); transition:box-shadow .2s ease, transform .2s ease; }
[data-bs-theme="light"] .grid-stack-item-content { box-shadow:var(--shadow-sm); }
.grid-stack-item.ui-draggable-dragging .grid-stack-item-content { box-shadow:var(--shadow-lg); transform:scale(1.02); opacity:.95; }
.grid-stack-item.ui-resizable-resizing .grid-stack-item-content { box-shadow:0 4px 16px rgba(91,164,245,.2); border:1px solid var(--blue)!important; }
.grid-stack-placeholder>.placeholder-content { border:2px dashed var(--blue)!important; border-radius:14px!important; background:rgba(91,164,245,.06)!important; }

/* ── ボタン ──────────────────────────────── */
.btn { transition:all .15s ease; }
.btn:active:not(:disabled) { transform:scale(.97); }

/* ── カメラ管理リスト ──────────────────────── */
.cam-entry { border:1px solid var(--border); border-radius:8px; margin-bottom:5px; overflow:hidden; }
.cam-row { padding:5px 7px; background:var(--surface2); display:flex; align-items:center; gap:4px; flex-wrap:nowrap; }
.cam-name { font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; min-width:0; }
.cam-badge { font-size:10px; font-weight:700; padding:1px 5px; border-radius:4px; flex-shrink:0; line-height:1.6; }
.cam-badge-main { background:rgba(240,180,41,.15); color:var(--yellow); border:1px solid rgba(240,180,41,.3); }
.cam-badge-sub  { background:var(--surface); color:var(--tx2); border:1px solid var(--border); }
.cam-edit-panel { padding:7px; background:var(--bg); border-top:1px solid var(--border); }

/* ── カード管理パネル ─────────────────────── */
#card-panel {
  position:fixed; top:48px; right:-290px; width:276px; height:calc(100vh - 48px);
  background:var(--surface); border-left:1px solid var(--border); z-index:1050;
  transition:right .3s cubic-bezier(.4,0,.2,1); display:flex; flex-direction:column; box-shadow:-4px 0 20px rgba(0,0,0,.3);
}
#card-panel.open { right:0; }
#cp-overlay { position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:1049; transition:opacity .25s; }
.cp-header { padding:11px 14px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; font-size:13px; font-weight:600; color:var(--tx); flex-shrink:0; }
.cp-body   { flex:1; overflow-y:auto; padding:10px 12px; }
.cp-footer { padding:10px 12px; border-top:1px solid var(--border); flex-shrink:0; }
.cp-item { display:flex; align-items:center; gap:10px; padding:7px 8px; border-radius:8px; cursor:pointer; font-size:13px; color:var(--tx); transition:background .1s; margin-bottom:2px; }
.cp-item:hover { background:var(--surface2); }
.cp-item input[type=checkbox] { width:15px; height:15px; flex-shrink:0; cursor:pointer; }

/* ── アラームカード ──────────────────────── */
.alarm-status-row { display:flex; flex-direction:column; gap:4px; padding:6px 0; }
.alarm-section-label { font-size:10px; font-weight:600; color:var(--tx2); text-transform:uppercase; letter-spacing:.5px; margin-bottom:7px; }
@keyframes alarm-ring-pulse { 0%,100%{transform:rotate(-12deg) scale(1.05)} 25%{transform:rotate(12deg) scale(1.15)} 50%{transform:rotate(-8deg) scale(1.1)} 75%{transform:rotate(8deg) scale(1.15)} }
.alarm-icon-ring { display:inline-block; animation:alarm-ring-pulse .5s ease-in-out infinite; transform-origin:center top; }

/* ── カスタムスクロールバー ─────────────── */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }
::-webkit-scrollbar-thumb:hover { background:var(--tx2); }

/* ── モバイル折りたたみボタン ────────────── */
.mobile-collapse-btn { display:none!important; }

/* ══════════════════════════════════════════
   レスポンシブ: モバイル (< 600px)
   ══════════════════════════════════════════ */
@media (max-width: 599px) {
  .main-wrap { padding-top:50px; }

  /* GridStack 1カラムモード補助 */
  .grid-stack { min-height:auto!important; }
  .grid-stack-item { margin-bottom:4px!important; }
  .grid-stack-item-content { border-radius:10px!important; }
  .card { min-height:100px; }
  .card-body { max-height:60vh; overflow-y:auto; }
  .grid-stack-item[gs-id="chat"] .card-body { max-height:70vh; }
  .feed-img-wrap img { max-height:250px; }

  /* モバイル折りたたみ表示 */
  .card-header .mobile-collapse-btn { display:inline-flex!important; }

  /* タッチ最適化 */
  .quick-btn { font-size:13px; padding:8px 14px; border-radius:16px; min-height:36px; }
  .btn-sm { min-height:36px; font-size:13px; }
  #chat-input { font-size:16px; min-height:40px; border-radius:20px; padding:8px 14px; }
  #chat-send-btn { min-height:40px; padding:8px 16px; border-radius:20px; }
  .feeds-nav .nav-link { font-size:12px; padding:8px 12px; min-height:34px; }
  .feed-ptz-bar .btn { font-size:14px; padding:6px 12px; min-height:34px; }
  .cfg-inp { width:100%; }

  /* ナビバー コンパクト化 */
  .navbar { padding:0 8px!important; min-height:44px!important; }
  .navbar-brand { font-size:13px; }
  #paused-alert { font-size:11px; padding:2px 8px; }
  .ws-badge { font-size:10px; padding:2px 5px; }

  /* 統計グラフ縦積み */
  .grid-stack-item[gs-id="stats"] .card-body>div:first-child { flex-direction:column!important; }
  .grid-stack-item[gs-id="stats"] .card-body>div:first-child>div:first-child { width:100%!important; flex-direction:row!important; justify-content:center; gap:12px; }
  .subcam-item { flex:0 0 calc(50% - 4px); min-width:0; }
}

/* ══════════════════════════════════════════
   レスポンシブ: タブレット (600-991px)
   ══════════════════════════════════════════ */
@media (min-width:600px) and (max-width:991px) {
  .main-wrap { overflow-x:hidden; }
  .grid-stack-item[gs-id="stats"] .card-body>div:first-child { flex-direction:column!important; }
  .grid-stack-item[gs-id="stats"] .card-body>div:first-child>div:first-child { width:100%!important; }
  .quick-btn { font-size:12px; padding:5px 12px; }
}
