﻿@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+JP:wght@300;400;500;700;900&display=swap');

:root {
  /* サウナ東京 ブランドカラーパレット */
  --bg-dark: #0a0e17;
  --bg-sidebar: #121824;
  --bg-card: #1a2332;
  --bg-card-hover: #222e42;
  
  --accent-cyan: #00f5d4;
  --accent-blue: #3b82f6;
  --accent-amber: #ff9f1c;
  --accent-red: #ff0055;
  --accent-purple: #8338ec;
  --accent-green: #10b981;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-color: rgba(255, 255, 255, 0.08);
  --glass-bg: rgba(26, 35, 50, 0.7);
  --glass-border: rgba(255, 255, 255, 0.12);

  --sidebar-width: 280px;

  /* 📱 iOS / Android Safe Area Insets (Thumb-First & Responsive-Craft) */
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --bottom-nav-height: 56px;
}

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

body {
  font-family: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* 花吹雪キャンバス */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
  display: none;
}

/* LINE風プッシュ・バナー通知コンテナ */
.notification-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  width: 92%;
  max-width: 440px;
}

.line-banner-notification {
  pointer-events: auto;
  background: rgba(22, 27, 34, 0.96);
  border: 1px solid rgba(0, 245, 212, 0.4);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 245, 212, 0.2);
  padding: 12px 14px;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  animation: bannerSlideDown 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.line-banner-notification.mention-alert {
  border-color: rgba(255, 0, 85, 0.6);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 24px rgba(255, 0, 85, 0.35);
}

.line-banner-notification.dismissing {
  transform: translateY(-120%);
  opacity: 0;
}

@keyframes bannerSlideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.banner-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.banner-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
}

.banner-app-icon {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 1px solid var(--border-color);
}

.banner-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.banner-sender {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-time {
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.banner-room-name {
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-text {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.banner-close-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  padding: 4px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-close-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

/* モバイルトップバーの未読ドットバッジ */
.mobile-menu-unread-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-red);
  box-shadow: 0 0 8px rgba(255, 0, 85, 0.8);
  border: 1.5px solid var(--bg-dark);
  animation: pulse-badge 1.5s infinite;
}

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

/* サイドバー */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 0 8px;
}

.logo-badge {
  font-size: 24px;
  background: linear-gradient(135deg, var(--accent-amber), var(--accent-red));
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(255, 159, 28, 0.4);
}

.logo-title {
  font-weight: 900;
  font-size: 18px;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-sub {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 1px;
}

/* ユーザー切り替え */
.user-profile-switcher {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 24px;
}

.profile-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.profile-select {
  width: 100%;
  background: var(--bg-dark);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
}

.profile-select:focus {
  border-color: var(--accent-cyan);
}

.text-cyan {
  color: var(--accent-cyan);
}

.font-bold {
  font-weight: bold;
}

.current-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.user-name {
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--text-muted);
}

/* メインナビゲーション */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
}

.nav-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding: 0 8px;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
  }

  &.active {
    background: linear-gradient(90deg, rgba(0, 245, 212, 0.15), rgba(0, 245, 212, 0.02));
    color: var(--accent-cyan);
    border-left: 4px solid var(--accent-cyan);
  }
}

.badge-unread {
  margin-left: auto;
  background: var(--accent-red);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  
  &.mention-alert {
    animation: pulseAlert 1.2s infinite alternate;
  }
}

@keyframes pulseAlert {
  from { transform: scale(1); box-shadow: 0 0 0 rgba(255, 0, 85, 0); }
  to { transform: scale(1.1); box-shadow: 0 0 10px rgba(255, 0, 85, 0.8); }
}

/* メインコンテンツエリア */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 32px 40px;
  min-width: 0;
}

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

.header-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block !important;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 共通カード */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
}

/* ボタン群 */
.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #00c4a7);
  color: #0a0e17;
  font-weight: 800;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 245, 212, 0.3);

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 245, 212, 0.4);
  }
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.15);
  }
}

.btn-amber {
  background: linear-gradient(135deg, var(--accent-amber), #e68a00);
  color: #0a0e17;
  box-shadow: 0 4px 15px rgba(255, 159, 28, 0.3);
}

.btn-danger-sm {
  background: rgba(255, 0, 85, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(255, 0, 85, 0.3);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;

  &:hover {
    background: var(--accent-red);
    color: white;
  }
}

.btn-edit-sm {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 4px 10px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;

  &:hover {
    background: var(--accent-blue);
    color: white;
  }
}

/* 入力・検索フィールド */
.search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: 10px;
  outline: none;
  font-size: 14px;

  &:focus {
    border-color: var(--accent-cyan);
  }
}

/* 2. LINE WORKSスタイル メンバー予定表CSS */
.schedule-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.schedule-nav-btns {
  display: flex;
  align-items: center;
  gap: 8px;
}

.schedule-matrix-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: rgba(18, 24, 36, 0.8);
  position: relative;
  max-height: 680px;
  overflow-y: auto;
}

.schedule-matrix-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1300px;
  font-size: 12px;
}

.sched-th-member {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 30;
  background: #161e2e;
  width: 220px;
  min-width: 220px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--border-color);
  border-right: 2px solid var(--border-color);
  font-weight: 800;
  color: var(--text-muted);
}

.sched-th-time {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #161e2e;
  padding: 10px 4px;
  text-align: center;
  font-weight: 800;
  color: var(--text-main);
  border-bottom: 2px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  min-width: 46px;
}

.sched-td-member {
  position: sticky;
  left: 0;
  z-index: 10;
  background: #121824;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  border-right: 2px solid var(--border-color);
  vertical-align: middle;
}

.sched-member-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sched-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--accent-cyan);
}

.sched-td-slot {
  position: relative;
  height: 52px;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  vertical-align: top;
  padding: 2px;
  transition: background 0.15s ease;
}

.sched-td-slot:hover {
  background: rgba(0, 245, 212, 0.08);
}

.schedule-bar {
  position: absolute;
  top: 6px;
  height: 40px;
  border-radius: 8px;
  padding: 4px 8px;
  color: #0a0e17;
  font-weight: 800;
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 5;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.schedule-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  z-index: 8;
}

/* 8. ユーザー権限・管理用CSS */
.user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;

  th {
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    font-weight: 700;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
  }

  td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
  }

  tr:hover td {
    background: rgba(255, 255, 255, 0.02);
  }
}

/* 4階層権限バッジ */
.perm-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;

  &.perm-developer {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.3), rgba(239, 68, 68, 0.3));
    color: #e0aaff;
    border: 1px solid rgba(131, 56, 236, 0.6);
  }

  &.perm-admin {
    background: rgba(255, 159, 28, 0.2);
    color: var(--accent-amber);
    border: 1px solid rgba(255, 159, 28, 0.5);
  }

  &.perm-employee {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.5);
  }

  &.perm-parttime {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.5);
  }
}

/* ユーザーステータスバッジ */
.status-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;

  &.status-active {
    background: rgba(0, 245, 212, 0.15);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 245, 212, 0.4);
  }

  &.status-pending {
    background: rgba(255, 159, 28, 0.15);
    color: var(--accent-amber);
    border: 1px solid rgba(255, 159, 28, 0.4);
  }

  &.status-retired {
    background: rgba(255, 0, 85, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(255, 0, 85, 0.4);
  }
}

/* 1. 売上＆カレンダーパネル専用CSS */
.month-summary-box {
  background: linear-gradient(135deg, rgba(26, 35, 50, 0.9), rgba(18, 24, 36, 0.95));
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}

.date-picker-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.year-select {
  background: var(--bg-dark);
  color: #fff;
  border: 1px solid var(--accent-cyan);
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
}

.month-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.month-tab-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;

  &.active {
    background: var(--accent-cyan);
    color: #0a0e17;
    border-color: var(--accent-cyan);
  }
}

.month-stats {
  display: flex;
  gap: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
}

.stat-val {
  font-size: 18px;
  font-weight: 900;
  color: var(--accent-cyan);
}

.progress-track {
  width: 100%;
  height: 12px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 6px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
  border-radius: 10px;
  transition: width 0.4s ease;
}

.progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}

.sales-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
}

.calendar-header-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 800;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day-cell {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px;
  min-height: 80px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;

  &:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 245, 212, 0.05);
  }

  &.selected {
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 245, 212, 0.3);
  }

  &.today {
    background: rgba(255, 159, 28, 0.1);
  }

  &.other-month {
    opacity: 0.3;
  }
}

.calendar-day-num {
  font-size: 12px;
  font-weight: 800;
}

.day-sales-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 4px;
  border-radius: 4px;
  text-align: center;

  &.badge-achieved {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
  }

  &.badge-normal {
    background: rgba(0, 245, 212, 0.15);
    color: var(--accent-cyan);
  }
}

/* カレンダーセル用イベントバッジ */
.event-badge {
  font-size: 10px;
  font-weight: 800;
  background: rgba(255, 159, 28, 0.25);
  color: var(--accent-amber);
  border: 1px solid rgba(255, 159, 28, 0.5);
  padding: 1px 4px;
  border-radius: 4px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sales-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.sales-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sales-card label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.sales-card input {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 8px;
  width: 100%;
  text-align: right;
  box-sizing: border-box;
}

.sales-card input::-webkit-inner-spin-button,
.sales-card input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sub-target-info {
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 600;
}

.sales-total-box {
  background: rgba(0, 245, 212, 0.05);
  border: 1px solid rgba(0, 245, 212, 0.2);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
}

.stacked-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  display: flex;
  overflow: hidden;
}

.legend-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
  font-size: 11px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
}

.legend-color {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* 2. 社内チャットパネル専用CSS */
.chat-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  height: calc(100vh - 140px);
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.chat-sidebar {
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
  font-size: 14px;
}

.room-btn {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-left: 4px solid transparent;
  transition: all 0.15s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.04);
  }

  &.active {
    background: rgba(0, 245, 212, 0.1);
    color: #fff;
    border-left-color: var(--accent-cyan);
  }
}

.room-btn-main {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
}

.room-avatar-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.room-icon-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
}

.room-icon-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-header-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}

.chat-header-group-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.chat-header-group-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.room-btn-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 2px;
  min-width: 0;
}

.room-btn-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.3;
}

.room-btn-preview {
  font-size: 11px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.room-btn-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: 48px;
}

.room-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  line-height: 1.2;
}

.room-unread-badge {
  background: var(--accent-red);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 12px;
  min-width: 20px;
  height: 18px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(255, 0, 85, 0.6);
  line-height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.room-unread-badge.mention-alert {
  background: linear-gradient(135deg, #ff0055, #ff9f1c);
  box-shadow: 0 0 10px rgba(255, 159, 28, 0.8);
  animation: pulse-badge 1.5s infinite;
}

.chat-main {
  display: flex;
  flex-direction: column;
}

.chat-room-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 800;
}

.chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  display: flex;
  gap: 8px;
  max-width: 70%;
  width: fit-content;

  &.self {
    margin-left: auto;
    flex-direction: row-reverse;

    .msg-bubble {
      background: linear-gradient(135deg, var(--accent-blue), #2563eb);
      color: white;
    }

    .msg-author {
      text-align: right;
    }

    .msg-content-wrapper {
      align-items: flex-end;
    }

    .msg-bubble-container {
      align-items: flex-end;
    }
  }
}

.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.msg-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
}

.msg-bubble-container {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
}

.msg-author {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.msg-bubble {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-color);
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  box-sizing: border-box;

  div {
    display: inline;
  }

  &.search-highlight {
    border: 2px solid var(--accent-amber);
    box-shadow: 0 0 10px rgba(255, 159, 28, 0.4);
  }
}

/* フォトグリッドスタイリング (複数写真対応) */
.msg-photo-grid {
  display: grid;
  gap: 6px;
  margin-top: 8px;

  &.grid-1 { grid-template-columns: 1fr; }
  &.grid-2 { grid-template-columns: 1fr 1fr; }
  &.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  &.grid-4 { grid-template-columns: 1fr 1fr; }
}

.grid-photo-item {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease;

  &:hover {
    transform: scale(1.03);
  }
}

.msg-meta-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-dim);
}

.msg-read-status {
  color: var(--accent-cyan);
  font-weight: bold;
}

.msg-reactions-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  position: relative;
  flex-wrap: wrap;
}

.chat-msg.self .msg-reactions-wrapper {
  justify-content: flex-end;
}

.reaction-badge {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  padding: 3px 9px;
  border-radius: 14px;
  font-size: 12px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.15s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
  }

  &.user-reacted {
    border-color: var(--accent-cyan);
    background: rgba(0, 245, 212, 0.18);
    font-weight: 700;
    color: #fff;
    box-shadow: 0 0 8px rgba(0, 245, 212, 0.25);
  }
}

.reaction-info-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 12px;
  padding: 2px 4px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;

  &:hover {
    opacity: 1;
    color: var(--accent-cyan);
  }
}

.add-reaction-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed var(--text-dim);
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 14px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;

  &:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    background: rgba(0, 245, 212, 0.08);
  }
}

/* 🎯 端切れ完全防止: 送信メッセージ(右)は右端アンカー、受信メッセージ(左)は左端アンカー */
.emoji-picker-popover {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  right: auto;
  background: #171c26;
  background: rgba(23, 28, 38, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 8px;
  border-radius: 24px;
  display: none;
  gap: 4px;
  align-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  z-index: 100;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  white-space: nowrap;

  &.active {
    display: flex;
  }
}

.chat-msg.self .emoji-picker-popover {
  left: auto;
  right: 0;
}

.emoji-pick-btn {
  background: transparent;
  border: 1.5px solid transparent;
  font-size: 20px;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  &:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.15);
  }

  &.user-selected {
    background: rgba(0, 245, 212, 0.25);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 8px rgba(0, 245, 212, 0.4);
    transform: scale(1.08);
  }
}

.emoji-more-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: bold;
  width: 32px;
  height: 32px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;

  &:hover {
    background: rgba(0, 245, 212, 0.2);
    border-color: var(--accent-cyan);
    transform: scale(1.1);
  }
}

.emoji-cancel-btn {
  background: rgba(231, 29, 54, 0.15);
  border: 1px solid rgba(231, 29, 54, 0.35);
  color: #ff6b6b;
  font-size: 12px;
  font-weight: bold;
  width: 28px;
  height: 28px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 2px;
  transition: all 0.15s ease;
  padding: 0;

  &:hover {
    background: rgba(231, 29, 54, 0.3);
    border-color: #ff6b6b;
    transform: scale(1.1);
  }
}

/* 🎨 全絵文字パレット モーダル & ボトムシート */
.modal-emoji-sheet {
  max-width: 480px;
  width: 92%;
  border-radius: 18px;
  padding: 20px;
}

@media (max-width: 768px) {
  .modal-emoji-sheet {
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 20px 20px 0 0 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 !important;
    padding: 18px 16px max(18px, env(safe-area-inset-bottom)) !important;
    max-height: 82vh !important;
    max-height: 82dvh !important;
  }
}

.emoji-current-banner {
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.3);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.emoji-current-banner .btn-banner-cancel {
  background: rgba(231, 29, 54, 0.15);
  border: 1px solid rgba(231, 29, 54, 0.4);
  color: #ff6b6b;
  font-size: 11px;
  font-weight: bold;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;

  &:hover {
    background: rgba(231, 29, 54, 0.3);
  }
}

.emoji-search-box {
  position: relative;
  margin-bottom: 12px;
}

.emoji-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  opacity: 0.6;
  pointer-events: none;
}

#emojiSearchInput {
  padding-left: 36px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  width: 100% !important;
  height: 40px !important;
  box-sizing: border-box !important;
}

.emoji-category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;

  &::-webkit-scrollbar {
    display: none;
  }
}

.emoji-cat-tab {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: bold;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  &:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  &.active {
    background: var(--accent-cyan);
    color: #0f172a;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.3);
  }
}

.emoji-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(44px, 1fr));
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 4px;
  -webkit-overflow-scrolling: touch;
}

.palette-emoji-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  font-size: 24px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;

  &:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.18);
    z-index: 2;
  }

  &.is-active-reaction {
    background: rgba(0, 245, 212, 0.25);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 212, 0.4);
    transform: scale(1.08);
  }
}

/* 🔔 リアクション通知トースト */
.reaction-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  gap: 8px;

  &.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.chat-input-area {
  padding: 16px;
  border-top: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}

.stamp-picker-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  overflow-x: auto;
}

.stamp-picker-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;

  &:hover {
    background: rgba(0, 245, 212, 0.2);
    border-color: var(--accent-cyan);
  }
}

.input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

#chatInput {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: 10px;
  outline: none;
  font-size: 13px;
  line-height: 1.4;
  resize: none;
  height: 38px;
  min-height: 38px;
  max-height: 140px;
  overflow-y: auto;
  font-family: inherit;
  box-sizing: border-box;

  &:focus {
    border-color: var(--accent-cyan);
  }
}

/* 画像プレビューフレキシブルコンテナ */
.image-preview-flex {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding: 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.preview-img-container {
  position: relative;
  width: 70px;
  height: 70px;
  flex-shrink: 0;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--accent-cyan);
  }
}

.preview-img-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent-red);
  color: white;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 10px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* @メンションサジェスト */
.mention-suggest-box {
  position: absolute;
  bottom: 80px;
  left: 16px;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--accent-cyan);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  max-height: 200px;
  overflow-y: auto;
  z-index: 100;
}

.mention-suggest-item {
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;

  &:hover {
    background: rgba(0, 245, 212, 0.15);
  }
}

.mention-suggest-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
}

.mention-tag {
  color: var(--accent-cyan) !important;
  font-weight: 800;
  background: rgba(0, 245, 212, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
  vertical-align: baseline;
}

.mention-all-tag {
  color: #ff0055 !important;
  font-weight: 900;
  background: rgba(255, 0, 85, 0.25);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 0, 85, 0.5);
  display: inline-block;
  vertical-align: baseline;
}

/* 3. サンキューカードパネル専用CSS */
.thanks-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
}

.sales-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.thanks-ranking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.ranking-card {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  padding: 16px;
  border-radius: 12px;
}

.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
}

.rank-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;

  &.rank-1 { background: #ffd700; color: #000; }
  &.rank-2 { background: #c0c0c0; color: #000; }
  &.rank-3 { background: #cd7f32; color: #000; }
}

.thanks-form {
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;

  select, textarea {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    outline: none;
    font-size: 13px;
  }
}

.thanks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.thanks-card-item {
  background: rgba(255, 159, 28, 0.08);
  border: 1px solid rgba(255, 159, 28, 0.2);
  padding: 14px 18px;
  border-radius: 12px;
  cursor: pointer;

  &:hover {
    background: rgba(255, 159, 28, 0.15);
  }
}

.thanks-card-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-amber);
  margin-bottom: 6px;
}

.thanks-card-body {
  font-size: 13px;
  line-height: 1.6;
}

/* 4. 組織図 & スタッフ名簿CSS (動的部署表示対応) */
.staff-view-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;

  &.active {
    background: var(--accent-cyan);
    color: #0a0e17;
    border-color: var(--accent-cyan);
  }
}

.org-chart-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.org-level {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.org-level-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--accent-cyan);
  border-bottom: 2px solid rgba(0, 245, 212, 0.2);
  padding-bottom: 6px;
}

.org-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.staff-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.staff-card-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.staff-avatar-large {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-cyan);
}

.emp-type-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;

  &.emp-type-fulltime {
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
  }

  &.emp-type-parttime {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
  }
}

.staff-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 6px;
}

.thanks-count-badge {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-amber);
}

/* 部署管理用モーダル表示スタイル */
.dept-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
}

.dept-manage-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dept-name-text {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dept-count-badge {
  font-size: 11px;
  color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* 絵文字アイコンピッカーオプション */
.emoji-option {
  width: 34px;
  height: 34px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s ease;

  &:hover {
    background: rgba(0, 245, 212, 0.15);
    transform: scale(1.1);
  }

  &.selected {
    background: rgba(0, 245, 212, 0.25);
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 8px rgba(0, 245, 212, 0.5);
  }
}

/* 5. 店舗チェックパネルCSS */
.check-area-bar, .check-date-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.check-area-tabs, .check-date-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.check-area-btn, .check-date-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;

  &.active {
    background: var(--accent-cyan);
    color: #0a0e17;
    border-color: var(--accent-cyan);
  }
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.check-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;

  &.completed {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.05);
  }
}

.check-photo-box {
  width: 100%;
  height: 180px;
  position: relative;
}

.check-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.check-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-location-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}

.check-comment {
  font-size: 12px;
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 12px;
  border-radius: 8px;
}

.btn-status-incomplete {
  width: 100%;
  min-height: 44px;
  background: rgba(255, 159, 28, 0.2);
  color: var(--accent-amber);
  border: 1px solid var(--accent-amber);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-status-incomplete:hover, .btn-status-incomplete:active {
  background: rgba(255, 159, 28, 0.35);
}

.btn-status-complete {
  width: 100%;
  min-height: 44px;
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
  border: 1px solid var(--accent-green);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.btn-status-complete:hover, .btn-status-complete:active {
  background: rgba(16, 185, 129, 0.35);
}

/* 📸 店舗チェック 投稿者＆完了者ログ表示 */
.check-meta-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-dim);
}

.check-author-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.check-author-info {
  white-space: nowrap !important;
  word-break: keep-all;
}

.check-completed-log {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(0, 209, 178, 0.1);
  border: 1px solid rgba(0, 209, 178, 0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  margin-top: 4px;
}

.check-completed-log-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.check-completed-pill {
  white-space: nowrap !important;
  font-weight: 700;
  color: #00d1b2;
  font-size: 11px;
  background: rgba(0, 209, 178, 0.18);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(0, 209, 178, 0.4);
}

.check-completer-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid #00d1b2;
}

.check-completer-name {
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap !important;
}

.check-completed-time {
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.check-incomplete-log {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 184, 0, 0.06);
  border: 1px solid rgba(255, 184, 0, 0.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.check-incomplete-pill {
  white-space: nowrap !important;
  font-weight: 700;
  color: #ffb800;
  font-size: 11px;
  background: rgba(255, 184, 0, 0.15);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 184, 0, 0.35);
  flex-shrink: 0;
}

.check-incomplete-hint {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap !important;
}

/* 6. 社内掲示板CSS (ドラッグ伸縮対応) */
.board-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
}

.board-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  height: fit-content;
}

.board-sidebar-header {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.board-cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.board-cat-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;

  &.active {
    background: rgba(0, 245, 212, 0.15);
    color: var(--accent-cyan);
    border-color: rgba(0, 245, 212, 0.3);
  }
}

.board-cat-count {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 10px;
}

.board-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.board-main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
}

.board-posts-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.board-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;

  &.pinned {
    border: 2px solid var(--accent-amber);
    box-shadow: 0 0 15px rgba(255, 159, 28, 0.2);
  }
}

.pin-badge {
  background: rgba(255, 159, 28, 0.2);
  color: var(--accent-amber);
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
  white-space: nowrap;
}

.board-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 8px;
}

.board-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
}

.board-author {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: bold;
  color: #fff;
}

.board-author-name {
  font-weight: bold;
  color: #fff;
  white-space: nowrap;
}

.board-author-role {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: normal;
  white-space: nowrap;
}

.board-meta-right {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.board-meta-cat {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.board-title {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
}

.board-body {
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

/* 縦横自由ドラッグテキストエリア */
.post-body-textarea {
  resize: both !important;
  min-height: 150px;
  max-height: 600px;
}

.board-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.board-footer-left {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.board-footer-right {
  display: flex;
  align-items: center;
}

.board-comment-count {
  font-size: 12px;
  color: var(--text-dim);
  white-space: nowrap;
  font-weight: 600;
}

.board-comment-input-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.board-comment-input-row input {
  flex: 1;
  min-width: 0;
  height: 40px;
}

.board-comment-input-row button {
  height: 40px;
  padding: 0 16px;
  font-weight: bold;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-mark-read {
  background: rgba(0, 245, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid var(--accent-cyan);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
}

.badge-read-done {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-green);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
}

.read-count-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;

  &:hover {
    color: var(--accent-cyan);
    text-decoration: underline;
  }
}

/* エリアプリセットボタンスタイル (横スクロール対応ピルタグ) */
.area-preset-container {
  display: flex !important;
  gap: 6px !important;
  margin: 8px 0 !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: 6px !important;
  flex-wrap: nowrap !important;
  scrollbar-width: none;
}

.area-preset-container::-webkit-scrollbar {
  display: none;
}

.area-preset-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-main) !important;
  border-radius: 20px !important;
  padding: 6px 14px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  cursor: pointer !important;
  min-height: 36px !important;
  transition: all 0.15s ease !important;
  -webkit-tap-highlight-color: transparent !important;
}

.area-preset-btn:hover, .area-preset-btn:active {
  background: rgba(0, 245, 212, 0.2) !important;
  color: var(--accent-cyan) !important;
  border-color: var(--accent-cyan) !important;
}

/* バッジ・タグ・ピルの共通折り返し禁止・最小サイズ保証 */
.pin-badge,
.manual-cat-badge,
.emp-type-badge,
.perm-badge,
.status-badge,
.tag,
.thanks-count-badge,
.badge-read-done,
.btn-mark-read,
.read-count-btn,
.area-preset-btn,
.check-area-btn,
.check-date-btn,
.board-cat-btn,
.manual-cat-btn,
.filter-btn,
.check-completed-pill,
.check-incomplete-pill,
.check-completer-name,
.check-completed-time,
.check-author-info,
.check-progress-counts,
.check-progress-percent {
  white-space: nowrap !important;
  word-break: keep-all !important;
  flex-shrink: 0;
}

/* 7. 業務マニュアルCSS (ドラッグ伸縮対応) */
.manual-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
}

.manual-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  height: fit-content;
}

.manual-sidebar-header {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.manual-cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.manual-cat-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;

  &.active {
    background: rgba(0, 245, 212, 0.15);
    color: var(--accent-cyan);
    border-color: rgba(0, 245, 212, 0.3);
  }
}

.manual-cat-count {
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 10px;
}

.manual-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.manual-main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
}

.manual-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.manual-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;

  &:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
  }
}

.manual-cat-badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.15);
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
}

.manual-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
}

.manual-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.manual-body-textarea {
  resize: both !important;
  min-height: 250px;
  max-height: 700px;
}

/* 汎用モーダル overlay & content */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex !important;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  position: relative;
}

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

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

  &:hover {
    color: #fff;
  }
}

/* テーマカラーピッカーオプション */
.color-picker-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.color-option {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: bold;
  color: #000;
  border: 2px solid transparent;

  &.selected {
    border-color: #ffffff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
  }
}

/* ==========================================================================
   🔐 ログイン画面スタイル (サウナ東京 ブランドデザイン)
   ========================================================================== */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at 50% 20%, #1e2640 0%, #0d111e 60%, #06080f 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  z-index: 99999;
  padding: 30px 16px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(22, 28, 48, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 159, 28, 0.1);
  box-sizing: border-box;
  animation: loginCardFadeIn 0.4s ease-out;
  margin: auto 0;
}

@media (max-width: 480px) {
  .login-overlay {
    padding: 16px 12px;
  }
  .login-card {
    padding: 24px 18px;
    border-radius: 20px;
  }
  .login-logo-badge {
    width: 48px;
    height: 48px;
    font-size: 26px;
    border-radius: 14px;
    margin-bottom: 10px;
  }
  .login-title {
    font-size: 18px;
  }
  .login-subtitle {
    font-size: 10px;
  }
}

@keyframes loginCardFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ff9f1c 0%, #e71d36 100%);
  border-radius: 18px;
  font-size: 32px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(255, 159, 28, 0.4);
}

.login-title {
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: 0.5px;
}

.login-subtitle {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan, #2ec4b6);
  letter-spacing: 2px;
  margin: 0;
}

.login-error-box {
  background: rgba(231, 29, 54, 0.15);
  border: 1px solid rgba(231, 29, 54, 0.4);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ff8594;
  font-size: 13px;
  animation: shakeError 0.3s ease-in-out;
}

@keyframes shakeError {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.login-form .form-label {
  font-size: 12px;
  font-weight: 700;
  color: #c9d1d9;
  letter-spacing: 0.3px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 14px;
  font-size: 15px;
  color: #8b949e;
  pointer-events: none;
}

.input-with-icon .form-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  background: rgba(13, 17, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.input-with-icon .form-input:focus {
  border-color: var(--accent-orange, #ff9f1c);
  background: rgba(13, 17, 30, 0.95);
  box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.2);
}

.btn-toggle-password {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  padding: 6px 8px;
  color: #8b949e;
  border-radius: 6px;
  z-index: 10;
  pointer-events: auto;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-toggle-password:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.form-hint {
  font-size: 11px;
  color: #8b949e;
  margin-top: 2px;
}

.form-hint code {
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent-orange, #ff9f1c);
}

.btn-login-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff9f1c 0%, #e71d36 100%);
  border: none;
  border-radius: 12px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(255, 159, 28, 0.35);
  margin-top: 6px;
}

.btn-login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(255, 159, 28, 0.5);
  filter: brightness(1.1);
}

.btn-login-submit:active {
  transform: translateY(0);
}

/* 📱 生体認証（Face ID / 指紋認証）ログインUI */
.biometric-login-wrap {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.biometric-divider {
  width: 100%;
  display: flex;
  align-items: center;
  text-align: center;
  margin: 6px 0;
  color: #8b949e;
  font-size: 11px;
}

.biometric-divider::before,
.biometric-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.biometric-divider span {
  padding: 0 10px;
  letter-spacing: 0.5px;
}

.btn-biometric-login {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  background: rgba(46, 196, 182, 0.08);
  border: 1.5px solid rgba(46, 196, 182, 0.5);
  border-radius: 12px;
  color: #e6f1ff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-biometric-login:hover {
  background: rgba(46, 196, 182, 0.18);
  border-color: #2ec4b6;
  box-shadow: 0 6px 22px rgba(46, 196, 182, 0.3);
  transform: translateY(-1px);
}

.btn-biometric-login:active {
  transform: translateY(0);
}

.biometric-btn-icon {
  font-size: 18px;
}

.biometric-hint {
  font-size: 11px;
  color: #8b949e;
  text-align: center;
  line-height: 1.4;
}

/* 📱 生体認証モーダルの最前面表示 (loginOverlay 99999 より上位) */
#modalBiometricInfo,
#modalBiometricEnrollPrompt,
#modalBiometricManage {
  z-index: 100005 !important;
}

/* 📱 サイドバー ユーザーカード内 生体認証ボタン */
.biometric-card-action {
  margin-top: 8px;
  width: 100%;
}

.btn-bio-card {
  width: 100%;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.btn-bio-card.enrolled {
  background: rgba(46, 196, 182, 0.1);
  border: 1px solid rgba(46, 196, 182, 0.35);
  color: #e6f1ff;
}

.btn-bio-card.enrolled:hover {
  background: rgba(46, 196, 182, 0.2);
  border-color: rgba(46, 196, 182, 0.6);
}

.btn-bio-card.not-enrolled {
  background: rgba(255, 159, 28, 0.1);
  border: 1px solid rgba(255, 159, 28, 0.35);
  color: #ffffff;
}

.btn-bio-card.not-enrolled:hover {
  background: rgba(255, 159, 28, 0.2);
  border-color: rgba(255, 159, 28, 0.6);
}

.btn-bio-sub {
  font-size: 10px;
  opacity: 0.85;
}

.login-footer {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
}

.login-footer p {
  margin: 0;
  font-size: 11px;
  color: #8b949e;
  line-height: 1.5;
}

/* サイドバー ログアウト & ユーザー情報拡張 */
.profile-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.btn-logout-tiny {
  background: rgba(231, 29, 54, 0.15);
  border: 1px solid rgba(231, 29, 54, 0.35);
  color: #ff8594;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-logout-tiny:hover {
  background: rgba(231, 29, 54, 0.35);
  color: #ffffff;
  border-color: #e71d36;
}

.admin-user-switch-wrap {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.admin-switch-label {
  font-size: 10px;
  color: #8b949e;
  display: block;
  margin-bottom: 4px;
}

/* ==========================================================================
   🔑 パスワード要件インジケーター & 承認待ちセクション スタイル
   ========================================================================== */
.password-req-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.password-req-box .req-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.password-req-box .req-item {
  font-size: 11px;
  color: #8b949e;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.password-req-box .req-item .req-icon {
  font-size: 10px;
  line-height: 1;
}

.password-req-box .req-item.valid {
  color: var(--accent-green, #00f5d4);
  font-weight: 600;
}

.password-req-box .req-item.valid .req-icon::before {
  content: '✅';
}

/* 承認待ちセクション */
.pending-approval-section {
  background: rgba(255, 159, 28, 0.08);
  border: 1px solid rgba(255, 159, 28, 0.3);
  border-radius: 16px;
  padding: 18px 20px;
  animation: fadeIn 0.3s ease;
}

.pending-approval-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pending-badge {
  background: linear-gradient(135deg, #ff9f1c 0%, #e71d36 100%);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(255, 159, 28, 0.4);
}

.pending-approval-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.pending-approval-card {
  background: rgba(18, 22, 36, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.pending-approval-card .applicant-name {
  font-size: 15px;
  font-weight: bold;
  color: #ffffff;
}

.pending-approval-card .applicant-email {
  font-size: 12px;
  color: var(--accent-cyan);
}

.pending-approval-card .applicant-date {
  font-size: 11px;
  color: var(--text-dim);
}

.pending-approval-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

/* フォーム入力フィールドの視認性最大化（ダーク背景 × 白文字、同系色潰れ防止） */
.form-input,
.login-form input,
.sales-card input,
.search-input {
  background-color: #0d111e !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

/* Chrome/Edge/Safari 等のブラウザ自動補完（Autofill）による背景白化・文字潰れを完全防止 */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px #0d111e inset !important;
  box-shadow: 0 0 0 1000px #0d111e inset !important;
  caret-color: #ffffff !important;
  border-color: rgba(255, 159, 28, 0.5) !important;
  transition: background-color 5000s ease-in-out 0s;
}

.form-input::placeholder,
input::placeholder {
  color: #8b949e !important;
  -webkit-text-fill-color: #8b949e !important;
}

/* 🔢 数字入力のスピンボタン非表示＆文字切れ完全防止 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}
input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}

/* ================================================================== */
/* 📱 スマートフォン & タブレット 完全レスポンシブ対応 (Mobile First) */
/* ================================================================== */

/* モバイルトップバー（PC時は非表示） */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(18, 24, 36, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 900;
  padding: 0 14px;
  align-items: center;
  justify-content: space-between;
}

.mobile-menu-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mobile-topbar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  color: #ffffff;
}

.mobile-logout-btn {
  background: rgba(231, 29, 54, 0.15);
  border: 1px solid rgba(231, 29, 54, 0.4);
  color: #ff8594;
  font-size: 16px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sidebar-backdrop.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.sidebar-close-btn-mobile {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: auto;
}

.btn-chat-back-mobile {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border-color);
  color: var(--accent-cyan);
  font-size: 12px;
  font-weight: bold;
  padding: 5px 10px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

/* 📱 モバイルボトムナビゲーション（PC/デスクトップ時は完全非表示） */
.mobile-bottom-nav {
  display: none;
}

/* 📱 画面幅 900px 以下のモバイルデバイス用レイアウト (Thumb-First & Responsive-Craft) */
@media (max-width: 900px) {
  .mobile-topbar {
    display: flex;
    padding-top: max(8px, env(safe-area-inset-top)) !important;
    height: calc(52px + max(0px, env(safe-area-inset-top))) !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
  }

  .mobile-menu-btn,
  .mobile-logout-btn {
    min-width: 44px !important;
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .sidebar-close-btn-mobile {
    display: flex;
    min-width: 44px !important;
    min-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* サイドバーを画面外からスライドインするドロワーに変換 */
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -320px;
    width: 280px;
    height: 100vh;
    height: 100dvh;
    z-index: 999;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(0);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: max(10px, env(safe-area-inset-top));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .sidebar.mobile-open {
    transform: translateX(320px);
  }

  /* メインコンテンツを全幅（100%）に開放し、ボトムナビとセーフエリアの余白を確保 */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding-top: calc(58px + max(0px, env(safe-area-inset-top))) !important;
    padding-bottom: calc(var(--bottom-nav-height) + max(20px, env(safe-area-inset-bottom))) !important;
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
    box-sizing: border-box !important;
  }

  .main-header {
    display: none; /* モバイルトップバーがあるため非表示 */
  }

  /* 📱 親指ファースト・ボトムナビゲーションバー (Thumb Zone) */
  .mobile-bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: calc(var(--bottom-nav-height) + max(0px, env(safe-area-inset-bottom))) !important;
    padding-bottom: max(0px, env(safe-area-inset-bottom)) !important;
    padding-left: max(6px, env(safe-area-inset-left)) !important;
    padding-right: max(6px, env(safe-area-inset-right)) !important;
    background: rgba(18, 24, 36, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    z-index: 950 !important;
    align-items: center !important;
    justify-content: space-around !important;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6) !important;
  }

  .mobile-bottom-nav-item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: none !important;
    border: none !important;
    color: var(--text-muted, #94a3b8) !important;
    padding: 4px 0 !important;
    min-height: 48px !important;
    min-width: 48px !important;
    flex: 1 !important;
    cursor: pointer !important;
    transition: color 0.15s ease, transform 0.1s ease !important;
    -webkit-tap-highlight-color: transparent !important;
    position: relative !important;
  }

  .mobile-bottom-nav-item:active {
    transform: scale(0.92) !important;
  }

  .mobile-bottom-nav-item.active {
    color: var(--accent-amber, #ff9f1c) !important;
  }

  .mobile-bottom-nav-icon-box {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 24px !important;
  }

  .mobile-bottom-nav-icon {
    font-size: 20px !important;
    line-height: 1 !important;
  }

  .mobile-bottom-nav-label {
    font-size: 10px !important;
    font-weight: 600 !important;
    margin-top: 3px !important;
    letter-spacing: -0.2px !important;
  }

  .mobile-bottom-nav-badge {
    position: absolute !important;
    top: -4px !important;
    right: -8px !important;
    background: #ff0055 !important;
    color: #ffffff !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    padding: 1px 5px !important;
    border-radius: 10px !important;
    min-width: 14px !important;
    height: 14px !important;
    line-height: 14px !important;
    text-align: center !important;
    box-shadow: 0 0 6px rgba(255, 0, 85, 0.8) !important;
  }

  /* 📊 売上管理・カレンダーのグリッドを1カラム縦並びに */
  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .sales-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .month-summary-box {
    padding: 14px !important;
  }

  .calendar-header {
    font-size: 11px !important;
  }

  .calendar-cell {
    min-height: 52px !important;
    padding: 3px !important;
  }

  .calendar-date-num {
    font-size: 11px !important;
  }

  .calendar-sales-val {
    font-size: 9px !important;
  }

  .calendar-event-badge {
    font-size: 9px !important;
    padding: 1px 3px !important;
  }

  /* 📱 モバイル時の全体横スクロール・はみ出し完全防止 */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    touch-action: pan-y !important;
  }

  /* 📱 iOS (iPhone / Safari) のフォーカス時自動拡大ズームを完全防止 (16px保証) */
  input,
  textarea,
  select,
  .form-input,
  .search-input,
  .profile-select,
  #chatInput,
  #thanksMessageInput,
  #loginEmailInput,
  #loginPasswordInput,
  #registerNameInput,
  #registerEmailInput,
  #registerPasswordInput,
  #registerPasswordConfirmInput {
    font-size: 16px !important;
  }

  .app-container,
  .main-content,
  .tab-panel,
  .month-summary-box,
  .card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* 💬 チャットレイアウトのモバイル最適化（LINEアプリスタイル & Safe Area対応） */
  .chat-layout {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    height: calc(100dvh - 58px - max(0px, env(safe-area-inset-top)) - var(--bottom-nav-height) - max(6px, env(safe-area-inset-bottom))) !important;
    min-height: 400px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  .chat-sidebar {
    display: flex;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-right: none !important;
    overflow-y: auto !important;
  }

  .room-btn {
    padding: 12px 14px !important;
    min-height: 54px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .room-btn-main {
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .room-btn-info {
    min-width: 0 !important;
    flex: 1 !important;
    overflow: hidden !important;
  }

  .room-btn-title {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .room-btn-preview {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .room-btn-meta {
    flex-shrink: 0 !important;
    margin-left: 6px !important;
  }

  .chat-main {
    display: none;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* チャットルーム選択時はメインチャットを全画面表示 */
  .chat-layout.chat-view-active .chat-sidebar {
    display: none !important;
  }

  .chat-layout.chat-view-active .chat-main {
    display: flex !important;
  }

  /* チャットヘッダー（スマホで絶対に溢れないコンパクト化） */
  .chat-room-header {
    padding: 8px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 6px !important;
    min-height: 48px !important;
  }

  .chat-room-header > div:first-child {
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .chat-room-header > div:first-child > div {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  #currentRoomTitle {
    font-size: 13px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    max-width: clamp(120px, 38vw, 200px) !important;
  }

  #currentRoomMembers {
    display: none !important;
  }

  .btn-chat-back-mobile {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 12px !important;
    min-height: 44px !important;
    min-width: 44px !important;
    font-size: 12px !important;
    flex-shrink: 0 !important;
    border-radius: 8px !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  #chatSearchInput {
    width: 80px !important;
    font-size: 12px !important;
    padding: 6px 8px !important;
    min-height: 36px !important;
  }

  /* メッセージ表示領域 */
  .chat-messages {
    padding: 10px 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .chat-msg {
    max-width: 88% !important;
  }

  /* スタンプバー（横スワイプ可能） */
  .stamp-picker-bar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
    scrollbar-width: none !important;
    gap: 8px !important;
  }
  .stamp-picker-bar::-webkit-scrollbar {
    display: none !important;
  }
  .stamp-btn {
    min-width: 44px !important;
    min-height: 44px !important;
    font-size: 22px !important;
  }

  /* 入力欄（LINE同様に画面幅ぴったり収まる・セーフエリア＆親指最適化） */
  .chat-input-area {
    padding: 8px 10px !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .input-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #chatAttachBtn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    font-size: 20px !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  .input-with-counter {
    flex: 1 !important;
    min-width: 0 !important;
  }

  #chatInput {
    width: 100% !important;
    box-sizing: border-box !important;
    font-size: 16px !important; /* iOS自動ズーム防止 */
    padding: 10px 12px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 10px !important;
  }

  #chatSendBtn {
    width: 56px !important;
    height: 44px !important;
    min-width: 56px !important;
    min-height: 44px !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  /* ---------------------------------------------------- */
  /* 1. 📊 売上管理 & カレンダー の完全スマホ最適化 (縦1列スタック) */
  /* ---------------------------------------------------- */
  .sales-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .sales-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .calendar-container {
    width: 100% !important;
  }

  .calendar-day-cell {
    min-height: 52px !important;
    padding: 3px !important;
  }

  .calendar-day-num {
    font-size: 11px !important;
  }

  .calendar-sales-val {
    font-size: 8px !important;
    letter-spacing: -0.5px !important;
  }

  .calendar-event-badge {
    font-size: 8px !important;
    padding: 1px 2px !important;
  }

  .date-picker-bar > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
  }

  .month-stats {
    width: 100% !important;
    justify-content: space-between !important;
  }

  /* ---------------------------------------------------- */
  /* 2. 📢 社内掲示板 の完全スマホ最適化 (縦1列スタック & 折り返し防止) */
  /* ---------------------------------------------------- */
  .board-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .board-sidebar {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .board-cat-list {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
    gap: 6px !important;
  }

  .board-cat-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
  }

  .board-main-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  .board-card {
    padding: 14px 12px !important;
    gap: 10px !important;
  }

  .board-card-top-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    gap: 8px !important;
  }

  .board-meta {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .board-author {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .board-author-name {
    font-weight: bold !important;
    color: #fff !important;
    white-space: nowrap !important;
  }

  .board-author-role {
    color: var(--text-dim) !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  .board-meta-right {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    font-size: 11px !important;
    color: var(--text-dim) !important;
  }

  .board-meta-cat {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .board-footer {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .board-footer-left {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .board-footer-right {
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
  }

  .board-comment-count {
    font-size: 12px !important;
    color: var(--text-dim) !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
  }

  .board-comment-input-row {
    width: 100% !important;
    display: flex !important;
    gap: 8px !important;
    margin-top: 8px !important;
  }

  .board-comment-input-row input {
    flex: 1 !important;
    min-width: 0 !important;
    height: 44px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }

  .board-comment-input-row button {
    height: 44px !important;
    min-width: 58px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    font-weight: bold !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  /* ---------------------------------------------------- */
  /* 3. 📖 業務マニュアル の完全スマホ最適化 (縦1列スタック) */
  /* ---------------------------------------------------- */
  .manual-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: 100% !important;
  }

  .manual-sidebar {
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .manual-cat-list {
    display: flex !important;
    flex-direction: row !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 4px !important;
    gap: 6px !important;
  }

  .manual-cat-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
  }

  .manual-main-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  .manual-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* ---------------------------------------------------- */
  /* 4. 👏 サンキューカード の完全スマホ最適化 (縦1列スタック) */
  /* ---------------------------------------------------- */
  .thanks-ranking-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .thanks-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .thanks-form {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px !important;
  }

  .sales-kpi-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .card {
    padding: 14px 10px !important;
    margin-bottom: 14px !important;
    border-radius: 12px !important;
  }

  /* ---------------------------------------------------- */
  /* 5. 🗓️ メンバー予定表 の完全スマホ最適化 */
  /* ---------------------------------------------------- */
  .schedule-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 10px 12px !important;
  }

  .schedule-nav-btns {
    width: 100% !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .schedule-toolbar > div:last-child {
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }

  #scheduleDeptFilter {
    width: 100% !important;
  }

  .filter-group {
    width: 100% !important;
    display: flex !important;
  }

  .filter-group .filter-btn {
    flex: 1 !important;
    text-align: center !important;
  }

  .schedule-matrix-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 10px !important;
  }

  .sched-th-member, .sched-td-member {
    width: 130px !important;
    min-width: 130px !important;
    padding: 8px 8px !important;
  }

  .sched-member-info {
    gap: 6px !important;
  }

  .sched-avatar {
    width: 26px !important;
    height: 26px !important;
  }

  /* ---------------------------------------------------- */
  /* 6. 👥 組織図・スタッフ名簿 / 店舗チェック / ユーザー管理 */
  /* ---------------------------------------------------- */
  .staff-grid,
  .check-grid,
  .pending-approval-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .users-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    width: 100% !important;
  }

  /* ---------------------------------------------------- */
  /* 7. 📸 店舗チェック パネルのモバイル最適化 */
  /* ---------------------------------------------------- */
  .check-area-bar, .check-date-bar {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
  }

  .check-area-tabs, .check-date-tabs {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 6px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
  }

  .check-area-tabs::-webkit-scrollbar,
  .check-date-tabs::-webkit-scrollbar {
    display: none;
  }

  .check-area-btn, .check-date-btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .progress-info {
    flex-wrap: wrap !important;
    gap: 4px 8px !important;
    align-items: center !important;
  }

  #checkProgressLabel {
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
  }

  /* ---------------------------------------------------- */
  /* 8. 🪟 カードヘッダー & モーダルの完全モバイル最適化 */
  /* ---------------------------------------------------- */
  .card-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    margin-bottom: 14px !important;
  }

  .card-header .btn-primary,
  .card-header .btn-secondary {
    width: 100% !important;
    justify-content: center !important;
    min-height: 44px !important;
  }

  .modal-overlay {
    padding: 10px !important;
    padding-top: max(10px, env(safe-area-inset-top)) !important;
    padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal-content {
    width: 96% !important;
    max-width: 96% !important;
    max-height: 90dvh !important;
    padding: 18px 14px !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .modal-header {
    margin-bottom: 14px !important;
  }

  .modal-header .card-title {
    font-size: 16px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* モーダル内の左右分割行をモバイルで縦1列スタック */
  .modal-content div[style*="display:flex"][style*="gap:12px"],
  .modal-content div[style*="display: flex"][style*="gap: 12px"] {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .modal-content div[style*="justify-content:space-between"] {
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
}

/* ==========================================================================
   🖼️ LINEライク チャットアルバム機能 スタイル
   ========================================================================== */

.btn-chat-album {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-chat-album:hover {
  background: rgba(0, 245, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.modal-album-sheet,
.modal-album-detail-sheet {
  max-width: 720px;
  width: 92%;
  max-height: 88vh;
  max-height: 88dvh;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 18px;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .modal-album-sheet,
  .modal-album-detail-sheet {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
  }
}

.btn-create-album-top {
  background: linear-gradient(135deg, var(--accent-cyan), #00b4d8);
  color: #0b132b;
  font-weight: bold;
  border: none;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0, 245, 212, 0.3);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-create-album-top:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 245, 212, 0.45);
}

.btn-album-back {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-album-back:hover {
  background: rgba(255, 255, 255, 0.15);
}

.btn-album-menu-dots {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-album-menu-dots:hover {
  background: rgba(255, 255, 255, 0.15);
}

.album-options-dropdown {
  position: absolute;
  top: 60px;
  right: 20px;
  background: #1a202c;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 100;
  min-width: 150px;
}

.album-option-item {
  background: transparent;
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.album-option-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.album-option-item.danger {
  color: #ff6b6b;
}

.album-option-item.danger:hover {
  background: rgba(231, 29, 54, 0.15);
}

.room-albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  overflow-y: auto;
  padding: 12px 2px;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

@media (min-width: 600px) {
  .room-albums-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
  }
}

.album-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.album-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 245, 212, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.album-cover-collage {
  width: 100%;
  aspect-ratio: 1 / 1;
  position: relative;
  background: #141820;
  display: grid;
  gap: 2px;
  overflow: hidden;
}

.album-cover-collage.collage-1 {
  grid-template-columns: 1fr;
}

.album-cover-collage.collage-2 {
  grid-template-columns: 1fr 1fr;
}

.album-cover-collage.collage-3 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.album-cover-collage.collage-3 .collage-img:first-child {
  grid-row: span 2;
}

.album-cover-collage.collage-4 {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.collage-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-card-info {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.album-card-title {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.album-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.album-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  overflow-y: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
  flex: 1;
}

@media (min-width: 600px) {
  .album-photos-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
}

.album-photo-item {
  aspect-ratio: 1 / 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.album-photo-item:hover {
  opacity: 0.85;
  transform: scale(1.02);
}

.album-upload-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  background: rgba(255, 255, 255, 0.02);
}

.album-upload-dropzone:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.05);
}

.create-album-previews-area {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px;
  -webkit-overflow-scrolling: touch;
}

.preview-album-img-wrap {
  position: relative;
  width: 68px;
  height: 68px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.preview-album-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-album-img-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: #ff6b6b;
  border: none;
  border-radius: 50%;
  font-size: 11px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* 💬 チャット内アルバム通知カード */
.msg-album-card {
  background: rgba(26, 32, 44, 0.85);
  border: 1px solid rgba(0, 245, 212, 0.35);
  border-radius: 14px;
  padding: 12px;
  max-width: 260px;
  cursor: pointer;
  margin-top: 6px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.msg-album-card:hover {
  border-color: var(--accent-cyan);
  background: rgba(26, 32, 44, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 245, 212, 0.25);
}

.msg-album-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 8px;
}

.msg-album-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  margin-bottom: 8px;
}

.msg-album-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.msg-album-card-title {
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  margin-bottom: 4px;
}

.msg-album-card-footer {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-save-to-album {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-muted);
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 12px;
  cursor: pointer;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-save-to-album:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 245, 212, 0.08);
}

/* ==========================================================================
   ♨️ サウナ業界インテリジェンス・レーダー（最新トレンド＆速報）スタイル
   ========================================================================== */
.sauna-intelligence-card {
  border: 1px solid rgba(0, 245, 212, 0.25) !important;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.85) 0%, rgba(13, 17, 23, 0.95) 100%) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
}

.sauna-news-tabs {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sauna-news-tabs::-webkit-scrollbar {
  height: 4px;
}

.sauna-news-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.news-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #c9d1d9;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.news-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.news-tab-btn.active {
  background: linear-gradient(135deg, rgba(0, 245, 212, 0.2), rgba(0, 180, 216, 0.2));
  border-color: var(--accent-cyan);
  color: #00f5d4;
  box-shadow: 0 0 12px rgba(0, 245, 212, 0.25);
}

.sauna-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .sauna-news-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.news-item-card {
  background: rgba(22, 27, 34, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.news-item-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 245, 212, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.news-item-card.is-new-item::before {
  content: "NEW";
  position: absolute;
  top: 10px;
  right: -24px;
  background: linear-gradient(135deg, #ff0055, #ff5400);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 26px;
  transform: rotate(45deg);
  box-shadow: 0 2px 6px rgba(255, 0, 85, 0.4);
}

.news-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.news-category-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cat-badge-x_buzz {
  background: rgba(29, 155, 240, 0.15);
  color: #1d9bf0;
  border: 1px solid rgba(29, 155, 240, 0.35);
}

.cat-badge-new_open {
  background: rgba(255, 159, 28, 0.15);
  color: #ff9f1c;
  border: 1px solid rgba(255, 159, 28, 0.35);
}

.cat-badge-campaign {
  background: rgba(255, 0, 85, 0.15);
  color: #ff3366;
  border: 1px solid rgba(255, 0, 85, 0.35);
}

.cat-badge-goods {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.cat-badge-collab {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.cat-badge-industry {
  background: rgba(0, 245, 212, 0.15);
  color: #00f5d4;
  border: 1px solid rgba(0, 245, 212, 0.35);
}

.news-source-badge {
  font-size: 11px;
  color: var(--text-muted);
}

.news-title-text {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.45;
  margin-bottom: 8px;
}

.news-highlight-text {
  font-size: 12px;
  color: #cbd5e1;
  line-height: 1.5;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid var(--accent-cyan);
}

.news-points-list {
  margin: 0 0 12px 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.news-points-list li {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
  position: relative;
  padding-left: 16px;
}

.news-points-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--accent-cyan);
  font-weight: bold;
}

.news-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.news-tag-chip {
  font-size: 10px;
  color: #8b949e;
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
}

.news-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 10px;
  margin-top: auto;
  gap: 8px;
}

.news-metrics-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-amber);
}

.news-link-btn {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(0, 245, 212, 0.08);
  border: 1px solid rgba(0, 245, 212, 0.2);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.news-link-btn:hover {
  background: rgba(0, 245, 212, 0.2);
  border-color: var(--accent-cyan);
  color: #ffffff;
}

/* ==========================================================================
   📱 モバイル WebKit (iOS Safari) クラッシュ防止・GPUメモリ軽量化ガード
   ========================================================================== */
@media (max-width: 768px) {
  /* 🛡️ 重層的なbackdrop-filterによるJetsam OOMクラッシュを遮断 */
  .login-overlay,
  .modal-overlay {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(10, 14, 20, 0.96) !important;
  }

  .login-card,
  .modal-content {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: #161b22 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  }

  .sidebar,
  .mobile-header,
  .mobile-bottom-nav {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  /* 入力フォームのズーム防止 (iOS Safariは16px未満で自動ズームしクラッシュを誘発) */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
  }
}