:root {
  --bar-cyan: #00e5ff;
  --bar-amber: #ffd600;
  --bar-fire-red: #ff0033;
  --btn-green: var(--bar-cyan);
}
body {
  font-family:
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  margin: 0;
  padding: 0 0 140px 0;
  padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px));
  background-color: #0b0d13;
  color: #f8fafc;
  overflow-x: hidden;
  touch-action: pan-y;
  box-sizing: border-box;
  min-height: 100vh;
  position: relative;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

/* 固定背景レイヤー（ホーム・実行中など通常画面用） */
#bg-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #0b0d13;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
  pointer-events: none;
}

/* 上部ヘッダー（壁紙透過対応） */
.header-sticky-wrapper {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 800;
  background: transparent; /* 壁紙を全面に反映 */
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  padding-top: env(safe-area-inset-top, 0px);
}

.header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 6px 16px;
  box-sizing: border-box;
}
/* ヘッダー3連ストリーク表示 */
.header-streak-group {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 auto;
  padding: 2px 0;
}

.header-streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 2px 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  user-select: none;
}

.header-streak-icon {
  font-size: 1.15rem;
  line-height: 1;
  display: inline-block;
}

/* 炎（🔥）の上下位置（マイナスで上、プラスで下） */
.header-streak-icon.icon-fire {
  transform: translateY(-3px);
}

/* 星（🌟）の上下位置（マイナスで上、プラスで下） */
.header-streak-icon.icon-star {
  transform: translateY(-2px);
}

/* 王冠（👑）の上下位置（マイナスで上、プラスで下） */
.header-streak-icon.icon-crown {
  transform: translateY(-5px);
}

.streak-roller-window {
  display: inline-block;
  height: 1.15em;
  overflow: hidden;
  vertical-align: middle;
  position: relative;
}

.streak-roller-num {
  display: inline-block;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2),
    opacity 0.25s ease;
}

.streak-roller-num.roll-up {
  transform: translateY(-100%);
  opacity: 0;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: 0;
}

/* カウントダウン操作ボタン（✕ & もう1回挑戦） */
.btn-urgent-close {
  position: absolute;
  top: max(20px, env(safe-area-inset-top, 20px));
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #f8fafc;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3100;
  transition:
    background 0.15s,
    transform 0.1s;
}

.btn-urgent-close:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.2);
}

.btn-urgent-retry {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #94a3b8;
  border-radius: 20px;
  padding: 8px 20px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  transition:
    transform 0.1s,
    background 0.15s,
    color 0.15s;
}

.btn-urgent-retry:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.icon-btn {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  line-height: 1;
  overflow: hidden;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
  transition:
    background-color 0.2s,
    transform 0.2s;
}
.icon-btn:active {
  transform: scale(0.92);
  background-color: rgba(255, 255, 255, 0.15);
}
.icon-btn svg {
  width: 22px;
  height: 22px;
  stroke: #f8fafc;
  display: block;
}
.icon-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  transform: none;
}

.user-avatar-large {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--bar-cyan);
  box-sizing: border-box;
  color: #f8fafc;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.15s,
    opacity 0.15s;
}
.user-avatar-large:active {
  transform: scale(0.95);
  opacity: 0.85;
}
.user-avatar-large svg {
  width: 36px;
  height: 36px;
  stroke: #f8fafc;
}
.user-avatar-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* 1日達成数プログレスバー（緑色・ドットメモリ・右端5pt余白） */
.daily-goal-bar-container {
  margin: 0 16px 8px 16px;
  background: transparent;
  border: none;
  border-radius: 14px;
  padding: 6px 4px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.daily-goal-text {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  z-index: 5;
  pointer-events: none;
}

.daily-goal-track-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
}

.daily-goal-track {
  width: 100%;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}

.daily-goal-fill {
  height: 100%;
  background: linear-gradient(90deg, #059669, #10b981);
  border-radius: 14px;
  transition: width 0.3s ease;
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}

/* 達成数プログレスバー：上部1〜3割の立体ホワイトアウト */
.daily-goal-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.35) 13%,
    rgba(255, 255, 255, 0.15) 27%,
    rgba(255, 255, 255, 0) 35%,
    transparent 100%
  );
  border-radius: inherit;
  pointer-events: none;
}

/* メモリドットを非表示 */
.daily-goal-dot {
  display: none !important;
}

.daily-goal-icon {
  font-size: 1.3rem;
  line-height: 1;
  user-select: none;
}

/* サイドメニュー */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2500;
}
/* サイドメニュー */
.sidebar-drawer {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: #161b26;
  z-index: 2500;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  transition: left 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-sizing: border-box;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px
    calc(24px + env(safe-area-inset-bottom, 0px)) 16px;
}

.sidebar-drawer.active {
  left: 0;
}
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.sidebar-header h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #f8fafc;
}

/* サイドメニュー（一本線区切り・フォント1.1倍） */
.sidebar-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}
.sidebar-menu-item {
  padding: 16px 4px;
  border-radius: 0;
  background: transparent;
  color: #f8fafc;
  font-size: 1.05rem; /* 1.1倍 */
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: opacity 0.15s;
  box-sizing: border-box;
  width: 100%;
}
.sidebar-menu-item:last-child {
  border-bottom: none;
}
.sidebar-menu-item:active {
  opacity: 0.6;
}

/* 画像クロッパーモーダル（全画面大型ビュー） */
.cropper-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  z-index: 3500;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-sizing: border-box;
  padding: 12px;
}
.cropper-container {
  width: 100%;
  max-width: 440px;
  height: 92vh;
  max-height: 800px;
  background: #161b26;
  border-radius: 18px;
  padding: 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.cropper-canvas-wrap {
  width: 100%;
  flex: 1;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #07090e;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}
.cropper-mask-circle {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
  pointer-events: none;
  border: 2px solid var(--bar-cyan);
}
.cropper-mask-rect {
  position: absolute;
  border-radius: 12px;
  outline: 999px solid rgba(0, 0, 0, 0.75);
  pointer-events: none;
  border: 2px solid var(--bar-cyan);
}

/* マイタスク青枠追加ボタン */
.btn-add-mycard-blue {
  width: 100%;
  background: rgba(37, 99, 235, 0.15);
  border: 1.5px solid #2563eb;
  color: #60a5fa;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition:
    background 0.15s,
    transform 0.1s;
}
.btn-add-mycard-blue:active {
  transform: scale(0.98);
  background: rgba(37, 99, 235, 0.25);
}

/* マイタスク画面（右からスライドイン） */
#standaloneDictModal .modal-content {
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}
#standaloneDictModal.active .modal-content {
  transform: translateX(0);
}

/* マイタスク長押し選択・削除UI */
.dict-item-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  overflow: hidden;
  border-radius: 10px;
}
.dict-item-checkbox {
  position: absolute;
  left: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: all 0.2s;
}
.dict-item-checkbox.checked {
  background: var(--bar-cyan);
  border-color: var(--bar-cyan);
}
.dict-item-checkbox.checked::after {
  content: "✓";
  color: #0b0d13;
  font-size: 14px;
  font-weight: 900;
}
.dict-item {
  width: 100%;
  transition: transform 0.25s ease;
  margin-bottom: 0 !important;
  user-select: none;
  -webkit-user-select: none;
}
.is-select-mode .dict-item-checkbox {
  display: flex;
}
.is-select-mode .dict-item {
  transform: translateX(42px);
}

.dict-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-icon-reset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #f8fafc;
  transition:
    background-color 0.2s,
    transform 0.2s;
  padding: 0;
  flex-shrink: 0;
}
.btn-icon-reset:active {
  transform: scale(0.92) rotate(-90deg);
  background-color: rgba(255, 255, 255, 0.15);
}
.btn-icon-reset svg {
  width: 18px;
  height: 18px;
  stroke: #f8fafc;
}

.btn {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  transition:
    transform 0.1s,
    opacity 0.15s;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: #2563eb;
  color: #fff;
}
.btn-success {
  background: var(--bar-cyan);
  color: #0b0d13;
  font-weight: bold;
}
.btn-danger {
  background: var(--bar-fire-red);
  color: #fff;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* フローティングピル型フッターナビゲーション */
.bottom-nav-container {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom, 16px));
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  z-index: 900;
  pointer-events: none;
}

/* ホーム画面追加時（スタンドアロン起動時）はセーフエリアを無視して24px固定 */
@media (display-mode: standalone) {
  .bottom-nav-container {
    bottom: 24px;
  }
}
.bottom-nav-pill {
  pointer-events: auto;
  background: rgba(18, 22, 32, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 40px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, 0.65),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  width: 92%;
  max-width: 410px;
  box-sizing: border-box;
  justify-content: space-between;
}
.nav-pill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 5px 6px;
  border-radius: 18px;
  color: #94a3b8;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  user-select: none;
  flex: 1;
  text-align: center;
}
.nav-pill-item.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}
.nav-pill-item.active .nav-icon svg {
  stroke: var(--bar-cyan);
}
.nav-pill-item:active {
  transform: scale(0.92);
}
.nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}
.nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.03em;
}

.nav-profile-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid var(--bar-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.nav-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nav-profile-avatar svg {
  width: 14px;
  height: 14px;
  stroke: #f8fafc;
}

.nav-chat-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 8px;
  height: 8px;
  background: #ff0033;
  border: 1.5px solid #161b26;
  border-radius: 50%;
  display: none;
}

.nav-chat-badge.show {
  display: block;
}

/* 実行中用バッジ */
.nav-in-progress-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--bar-cyan);
  color: #0b0d13;
  font-size: 0.65rem;
  font-weight: 900;
  border-radius: 10px;
  border: 1.5px solid #161b26;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-sizing: border-box;
}
.nav-in-progress-badge.show {
  display: flex;
}

/* タブアイコンのポンッと弾むアニメーション */
@keyframes tabIconBounce {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.35) translateY(-4px);
  }
  65% {
    transform: scale(0.92) translateY(1px);
  }
  100% {
    transform: scale(1) translateY(0);
  }
}
.tab-bounce-active {
  animation: tabIconBounce 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* メインコンテナ */
.main-slider-wrapper {
  width: 100%;
  overflow: hidden;
  position: relative;
  margin-top: 18px; /* 達成数プログレスバーとの間隔を10px拡張 */
}
.main-slides {
  display: flex;
  width: 300%; /* 3画面分 */
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.main-slide-page {
  width: 33.333%;
  padding: 0 16px;
  box-sizing: border-box;
  min-height: calc(100vh - 160px);
}

/* ヘッダー位置の実行中バナー（初期非表示） */
.header-in-progress-banner {
  display: none;
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  border-radius: 14px;
  padding: 8px 16px;
  margin: 0 16px 8px 16px;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.95rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.35);
  letter-spacing: 0.03em;
}

/* 実行中タブ表示時のヘッダー切り替え */
.header-sticky-wrapper.is-in-progress-view #dailyGoalBarContainer {
  display: none;
}
.header-sticky-wrapper.is-in-progress-view .header-in-progress-banner {
  display: block;
}

/* 開始タブ表示時のヘッダー非表示 */
.header-sticky-wrapper.is-home-view {
  display: none;
}

/* 実行中表示時：開始画面と完全同一の全画面フォーカス（ヘッダー非表示） */
body.is-in-progress-view .header-sticky-wrapper {
  display: none !important;
}

body.is-in-progress-view {
  overflow: hidden !important;

  height: 100vh;

  height: 100dvh;

  touch-action: none;
}

/* 実行中表示時は右下の新規追加ボタン（＋）を非表示 */

body.is-in-progress-view .fab-group {
  display: none !important;
}

body.is-home-view .main-slider-wrapper,
body.is-in-progress-view .main-slider-wrapper {
  margin-top: 0 !important;
}

/* 実行中用 縦スナップスクロール全画面コンテナ */
#scheduleListInProgress {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  box-sizing: border-box;
}
#scheduleListInProgress::-webkit-scrollbar {
  display: none;
}

/* 1タスクごとの全画面スナップページ（開始画面の .home-seamless-container と完全一致） */
.prog-snap-page {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: 0 20px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  box-sizing: border-box;
  overflow: hidden;
  container-type: inline-size;
}

/* タイマー中央の終了時刻設定タップエリア（透明ピッカー内包） */
.prog-time-trigger-box {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.prog-time-trigger-box input[type="time"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  border: none;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
}
.prog-time-trigger-box input[type="time"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

/* チェックリスト カルーセル（開始画面の .home-sub-task と全く同じ位置・サイズ） */
.prog-carousel-container {
  position: absolute;
  top: calc(43% + 170px);
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 8;
}

.prog-carousel-arrow {
  background: none;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition:
    transform 0.08s ease,
    opacity 0.15s ease,
    background 0.15s ease;
  z-index: 10;
}

.prog-carousel-arrow svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  stroke-width: 2.5;
  display: block;
  pointer-events: none;
}

.prog-carousel-arrow:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.2);
}

.prog-carousel-arrow.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden;
}

.prog-carousel-text {
  font-family:
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: min(2.4rem, 6.5cqw);
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  letter-spacing: -0.02em;
  transition:
    transform 0.18s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.18s ease;
}

/* スライドアニメーション */
.prog-carousel-text.slide-out-left {
  transform: translateX(-35px);
  opacity: 0;
}
.prog-carousel-text.slide-in-right {
  transform: translateX(35px);
  opacity: 0;
}
.prog-carousel-text.slide-out-right {
  transform: translateX(35px);
  opacity: 0;
}
.prog-carousel-text.slide-in-left {
  transform: translateX(-35px);
  opacity: 0;
}

/* 完了ボタン（開始画面の開始ボタンと完全同一の物理構造・エメラルドグリーン仕様） */
.prog-complete-btn {
  position: absolute;
  top: calc(43% + 230px);
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 67px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 9px 0 #047857,
    0 10px 20px rgba(0, 0, 0, 0.55);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
  z-index: 10;
}

.prog-complete-btn:active {
  transform: translateX(-50%) translateY(9px);
  box-shadow:
    0 0 0 #047857,
    0 4px 12px rgba(16, 185, 129, 0.3);
}

.prog-complete-btn svg {
  width: 38px;
  height: 38px;
  stroke: #ffffff;
  stroke-width: 3.5;
}

/* 予定追加／編集モーダル表示時の背面スクロール固定 */
body.modal-open {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

/* 予定追加／編集モーダル */

.event-edit-overlay {
  display: none;

  position: fixed;

  top: 0;

  left: 0;

  width: 100vw;

  height: 100%;

  height: 100dvh;

  background: rgba(0, 0, 0, 0.7);

  backdrop-filter: blur(6px);

  z-index: 2500;

  justify-content: center;

  align-items: flex-start;

  padding-top: env(safe-area-inset-top, 0px);

  overflow: hidden;

  box-sizing: border-box;

  opacity: 0;

  transition: opacity 0.3s ease-out;

  overscroll-behavior: contain;

  touch-action: none;
}

.event-edit-overlay.active {
  opacity: 1;
}

.event-edit-container {
  position: relative;

  width: 100%;

  max-width: 480px;

  height: calc(100dvh - env(safe-area-inset-top, 0px));

  max-height: 100%;

  background: #0b0d13;

  border-radius: 16px 16px 0 0;

  display: flex;

  flex-direction: column;

  margin: 0 auto;

  overflow: hidden;

  transform: translateY(100vh);

  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);

  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);

  touch-action: auto;
}

.event-edit-overlay.active .event-edit-container {
  transform: translateY(0);
}

.event-edit-header {
  display: flex;

  align-items: center;

  justify-content: space-between;

  padding: 16px;

  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  background: #0b0d13;

  border-radius: 20px 20px 0 0;

  z-index: 10;
}

.event-edit-title {
  font-size: 1.1rem;

  font-weight: 700;

  color: #f8fafc;
}

.btn-edit-close {
  width: 50px;

  height: 50px;

  border-radius: 50%;

  background: none;

  color: #f8fafc;

  border: none;

  font-size: 1.2rem;

  font-weight: bold;

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;
}

.btn-edit-save {
  width: 50px;

  height: 50px;

  border-radius: 50%;

  background: #3b82f6;

  color: #ffffff;

  border: none;

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  padding: 0;
}

.btn-edit-save svg {
  width: 28px;

  height: 28px;

  stroke: #ffffff;

  stroke-width: 3;

  display: block;
}

.event-edit-scroll-area {
  flex: 1;

  overflow-y: auto;

  -webkit-overflow-scrolling: touch;

  overscroll-behavior: contain;

  padding: 16px;

  padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));

  box-sizing: border-box;
}

/* btn-save-check はヘッダーレイアウト変更に伴い削除 */

.event-slider-wrapper {
  width: 100%;
  overflow: visible;
  border-radius: 16px;
  touch-action: pan-y;
}

.event-slides {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 20px;
  transform: none !important;
  transition: none;
}

.event-slider-wrapper.is-single-slide-view .event-slides {
  width: 100%;
  transform: none !important;
}

.event-slider-wrapper.is-single-slide-view .event-slide-page:first-child {
  display: none;
}

.event-slider-wrapper.is-single-slide-view .event-slide-page:last-child {
  width: 100%;
}

.event-slide-page {
  width: 100%;
  box-sizing: border-box;
}

.event-main-box {
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  position: relative;
}

/* 矢印ボタン非表示 */
.slide-arrow-row {
  display: none !important;
}

.title-input-wrapper {
  position: relative;
  width: 100%;
}

.event-title-textarea {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
  resize: none;
  min-height: 80px;
  outline: none;
  font-family: inherit;
  line-height: 1.3;
  word-break: break-all;
  white-space: pre-wrap;
  padding-right: 42px;
  box-sizing: border-box;
}
.event-title-textarea::placeholder {
  color: #64748b;
}

.btn-start-now-edit {
  display: none;
  width: 100%;
  background: linear-gradient(135deg, #ff7a00 0%, #ff5100 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  margin-bottom: 8px;
  box-shadow:
    0 6px 0 #b33900,
    0 6px 16px rgba(255, 81, 0, 0.3);
  text-align: center;
  transition:
    transform 0.1s,
    box-shadow 0.1s;
}

.btn-start-now-edit:active {
  transform: translateY(2px) scale(0.98);
  box-shadow:
    0 1px 0 #b33900,
    0 3px 8px rgba(255, 81, 0, 0.2);
}

/* 音声入力ボタン */
.btn-voice-mic {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #94a3b8;
  transition: all 0.2s;
  flex-shrink: 0;
  padding: 0;
}
.btn-voice-mic:hover {
  color: var(--bar-cyan);
  border-color: var(--bar-cyan);
}
.btn-voice-mic.listening {
  background: #dc2626 !important;
  border-color: #f87171 !important;
  color: #ffffff !important;
  animation: pulse-mic 0.8s infinite alternate;
}
@keyframes pulse-mic {
  from {
    transform: scale(1);
    box-shadow: 0 0 4px #dc2626;
  }
  to {
    transform: scale(1.15);
    box-shadow: 0 0 14px #ef4444;
  }
}

.title-voice-btn {
  position: absolute;
  right: 0;
  top: 4px;
}

.event-icons-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}
.event-icon-btn {
  background: transparent;
  border: none;
  border-radius: 10px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  color: #f8fafc;
  padding: 0;
}
.event-icon-btn svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}
.event-icon-btn.active {
  border-color: var(--bar-cyan);
  background: rgba(0, 229, 255, 0.15);
  color: var(--bar-cyan);
}
.icon-alert-box {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ef4444;
}
.icon-alert-box:hover,
.icon-alert-box.active {
  border-color: #f87171;
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.hidden-date-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.slide-arrow-row {
  width: 100%;
  display: flex;
  margin-top: 10px;
}
.slide-arrow-btn {
  background: none;
  border: none;
  color: #f8fafc;
  cursor: pointer;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
}
.slide-arrow-btn:active {
  transform: scale(0.9);
}
.slide-arrow-btn svg {
  width: 28px;
  height: 28px;
  stroke: #f8fafc;
}

.box-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 6px;
}
.event-memo-wrapper {
  position: relative;
  width: 100%;
}
.event-memo-textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.95rem;
  padding: 8px;
  padding-right: 44px;
  resize: vertical;
  min-height: 70px;
  box-sizing: border-box;
  font-family: inherit;
}
.memo-voice-btn {
  position: absolute;
  right: 8px;
  top: 8px;
}

.checklist-container {
  background: transparent;
  padding: 4px 0;
  margin-top: 6px;
  max-height: none;
  overflow: visible;
}

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  background: transparent;
  padding: 4px 0;
  border-bottom: none;
}
.checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--bar-cyan);
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.checklist-item input[type="text"] {
  flex: 1;
  padding: 4px;
  font-size: 0.95rem;
  background: transparent !important;
  border: none !important;
  color: #ffffff;
  outline: none;
}
.checklist-item input[type="text"]::placeholder {
  color: #64748b;
}
.btn-remove-item {
  background: none;
  border: none;
  color: #64748b;
  font-weight: bold;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 4px;
}
.btn-remove-item:hover {
  color: #ef4444;
}

.unified-picker-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
}
.unified-picker-card.card-yellow {
  border-color: rgba(255, 214, 0, 0.6);
}
.unified-picker-card.card-red {
  border-color: rgba(255, 0, 51, 0.5);
}

.picker-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.time-picker-row {
  display: flex;
  gap: 6px;
}
.drum-triplet {
  flex: 1;
  background: #161b26;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 8px 4px;
  text-align: center;
  outline: none;
}
.drum-triplet:focus {
  border-color: var(--bar-cyan);
}

/* サブモーダル */
.sub-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 2600; /* 予定編集モーダル(2500)の前面に表示 */
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sub-modal.active {
  display: flex;
  opacity: 1;
}
.sub-modal-content {
  background: #161b26;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 20px;
  width: 90%;
  max-width: 360px;
  color: #f8fafc;
  box-sizing: border-box;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  transform: translateY(100vh);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 85vh;
  overflow-y: auto;
}
.sub-modal.active .sub-modal-content {
  transform: translateY(0);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-content {
  background: #161b26;
  color: #f8fafc;
  padding: 20px;
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: #f8fafc;
}
.close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  font-weight: bold;
  color: #94a3b8;
  cursor: pointer;
}

.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 6px;
  color: #94a3b8;
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 0.95rem;
  word-break: break-all;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  background-color: #0b0d13;
  color: #ffffff;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--bar-cyan);
  outline: none;
}

/* カード */
.card-swipe-wrapper {
  position: relative;
  margin-left: 18px;
  margin-right: 18px;
  margin-bottom: 24px;
  border-radius: 20px;
  z-index: 1;
  perspective: 1000px;
  transition: transform 0.2s ease;
}
.card-swipe-wrapper.menu-active {
  z-index: 1100 !important;
}
.card-swipe-wrapper.is-dragging-card {
  opacity: 0.95;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.75);
  z-index: 1200 !important;
  pointer-events: none;
  transition: none !important;
  will-change: transform;
}

.drag-placeholder {
  border: 2px dashed rgba(0, 229, 255, 0.5);
  background: rgba(0, 229, 255, 0.05);
  border-radius: 20px;
  margin-bottom: 12px;
  margin-left: 18px;
  margin-right: 18px;
  box-sizing: border-box;
  transition: all 0.2s ease;
}

.card {
  position: relative;
  border-radius: 20px;
  padding: 18px 20px;
  color: #f8fafc;
  background: rgba(22, 27, 38, 0.85);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow:
    0 10px 0 rgba(0, 0, 0, 0.5),
    0 20px 40px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  overflow: visible;
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
  touch-action: manipulation;
}

.card:active:not(:has(.card-edit-btn:active)) {
transform: translateY(6px);
box-shadow:
0 4px 0 rgba(0, 0, 0, 0.5),
0 10px 20px rgba(0, 0, 0, 0.4);
}

/* ホームプログレスバー：立体溝 ＆ 上部光沢仕上げ */
.card-slim-bar-track {
  width: 100%;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  margin-top: 12px;
  margin-bottom: 4px;
}

.card-slim-bar-fill {
  height: 100%;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  transition: width 0.3s ease;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}

.card-slim-bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.35) 13%,
    rgba(255, 255, 255, 0.15) 27%,
    rgba(255, 255, 255, 0) 35%,
    transparent 100%
  );
  border-radius: inherit;
  pointer-events: none;
}

.bar-cyan-fill {
  background: linear-gradient(90deg, #0284c7, var(--bar-cyan));
  box-shadow:
    0 0 12px rgba(0, 229, 255, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}

.bar-amber-fill {
  background: linear-gradient(90deg, #d97706, #ffd600);
  box-shadow:
    0 0 12px rgba(255, 214, 0, 0.6),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}

.bar-red-fill {
  background: linear-gradient(90deg, #b91c1c, #ff0033);
  box-shadow:
    0 0 12px rgba(255, 0, 51, 0.5),
    inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}

.bar-overdue-fill {
  background: #7f1d1d;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}

/* カード右上の編集ボタン（立体的アフォーダンス） */
.menu-container {
  position: absolute;
  right: 12px;
  top: 12px;
  z-index: 1050;
}

.card-edit-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.1s ease,
    background 0.15s ease,
    color 0.15s ease;
  padding: 0;
  box-sizing: border-box;
}

.card-edit-btn:active {
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.card-edit-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  display: block;
}
.dropdown-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: #161b26;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.8);
  border-radius: 12px;
  display: none;
  flex-direction: column;
  z-index: 2000;
  min-width: 120px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 開始（1件フォーカス画面）シームレス・円形UI */
body.is-focus-view .header-sticky-wrapper {
  display: none !important;
}

body.is-focus-view {
  background: #0b0d13;
  /* フォーカス画面のみスクロールを完全に無効化 */
  overflow: hidden !important;
  height: 100vh;
  height: 100dvh;
  touch-action: none;
}

body.is-focus-view #bg-layer {
  display: none;
}

body.is-focus-view .fab-group {
  display: none !important;
}

body.is-focus-view .main-slider-wrapper,
body.is-in-progress-view .main-slider-wrapper {
  margin-top: 0 !important;
}
#scheduleListDetail {
  height: 100%;
  overflow: hidden !important;
  touch-action: none;
}
.home-seamless-container {
  position: relative;

  width: 100%;

  height: 100vh;

  height: 100dvh;

  color: #fff;

  padding: 0 20px;

  box-sizing: border-box;

  overflow: hidden;

  container-type: inline-size;
}

/* タスク名：タイマーの上部に一定距離で配置 */
.home-task-title {
  position: absolute;
  bottom: calc(60% + 150px);
  left: 20px;
  right: 20px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* タイマーを画面中心に完全固定 */
/* タイマーを画面中心に完全固定（1.2倍化: 260px -> 312px） */
.home-timer-wrapper {
  position: absolute;
  top: 43%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 312px;
  height: 312px;
  margin: 0;
  z-index: 5;
}

.home-timer-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none; /* JS側の-90度起点と二重回転するのを防ぐ */
  z-index: 2;
}

.home-timer-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 10;
}

.home-timer-progress {
  fill: none;
  stroke: url(#timer-grad);
  stroke-width: 10;
  stroke-linecap: round;
  filter: drop-shadow(0 0 8px rgba(252, 211, 77, 0.7));
}

/* --- 開始円形ガソリンメーター用ブロック --- */
.home-gauge-block {
  transition: none;
}
.home-gauge-block.active-white {
  fill: #ffffff;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.85));
}
.home-gauge-block.active-red {
  fill: #ff3344;
  filter: drop-shadow(0 0 8px rgba(255, 51, 68, 0.9));
}
.home-gauge-block.off {
  fill: rgba(255, 255, 255, 0.08);
  filter: none;
}
.home-gauge-block.off.is-red-slot {
  fill: rgba(255, 51, 68, 0.12);
}

/* 点滅アニメーション（白・赤で正確なドロップシャドウを反映） */
.home-gauge-block.active-white.blinking {
  animation: homeBlockBlinkWhite 0.8s infinite alternate ease-in-out;
}
.home-gauge-block.active-red.blinking {
  animation: homeBlockBlinkRed 0.8s infinite alternate ease-in-out;
}
.home-gauge-block.active-red.blinking-1-5x {
  animation: homeBlockBlinkRed 0.53s infinite alternate ease-in-out;
}
.home-gauge-block.active-red.blinking-2x {
  animation: homeBlockBlinkRed 0.4s infinite alternate ease-in-out;
}

@keyframes homeBlockBlinkWhite {
  0% {
    opacity: 0.15;
    filter: none;
  }
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.9));
  }
}

@keyframes homeBlockBlinkRed {
  0% {
    opacity: 0.15;
    filter: none;
  }
  100% {
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(255, 51, 68, 0.95));
  }
}

.home-timer-text-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 3;
  width: 100%;
}

.home-timer-label {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 4px;
}

.home-timer-time {
  font-size: 3.4rem;
  font-weight: 900;
  color: #fff9c4;
  text-shadow: 0 0 2px rgba(253, 224, 71, 0.5);
  letter-spacing: -1px;
}

/* 分・秒の単位を小さくするための専用クラス */
.time-unit {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 4px 0 2px;
  opacity: 0.9;
  letter-spacing: normal;
}

.home-sub-task {
  position: absolute;
  top: calc(43% + 170px);
  left: 16px;
  right: 16px;
  font-family:
    "Noto Sans JP",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: min(2.4rem, 6.5cqw);
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

/* 開始ボタン：初動タスク名の下に配置（立体的な物理ボタン質感） */
.home-start-btn {
  position: absolute;
  top: calc(43% + 230px);
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 67px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7a00 0%, #ff5100 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 9px 0 #9b5c04,
    0 10px 20px rgba(0, 0, 0, 0.55);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
  z-index: 10;
}

.home-start-btn:active {
  transform: translateX(-50%) translateY(9px);
  box-shadow:
    0 0 0 #9b5c04,
    0 4px 12px rgba(255, 81, 0, 0.3);
}

.home-start-btn svg {
  width: 80px;
  height: 80px;
  color: #ffffff;
  margin-left: 2px; /* 三角形が視覚的に中央に見えるよう微調整 */
}

/* 開始（全カード）画面カード */

.overview-section-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #94a3b8;
  margin: 0 18px 8px 18px;
  letter-spacing: 0.03em;
}

#scheduleListOverview .card-swipe-wrapper {
  border-radius: 14px;
}
#scheduleListOverview .overview-header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-right: 32px;
}
#scheduleListOverview .card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

#scheduleListOverview .card-slim-bar-track {
  margin-top: 12px;
  margin-bottom: 4px;
  height: 28px;
  border-radius: 8px;
  position: relative;
  overflow: hidden; /* はみ出しを完全にカット */
  background: rgba(0, 0, 0, 0.35); /* 溝として少し深みのある暗い背景 */
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4); /* レールとしての凹み感 */
}

#scheduleListOverview .card-bar-time-overlay {
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
}

#scheduleListOverview .card-slim-bar-fill {
  height: 100%;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.25);
}

/* 進捗バー（水色・赤色）の上部のみに立体的なハイライトを適用 */
#scheduleListOverview .card-slim-bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.45) 0%,
    rgba(255, 255, 255, 0.25) 15%,
    rgba(255, 255, 255, 0.05) 30%,
    transparent 100%
  );
  border-radius: inherit;
  pointer-events: none;
}

#scheduleListOverview .menu-container {
  top: 6px;
  right: 8px;
}

/* 初動CTAボタン */
.step-box-cta-btn {
  width: calc(100% + 20px) !important; /* 左右10pxずつ拡張 */
  margin-left: -10px;
  margin-right: -10px;
  min-height: 84px;
  height: auto;
  background: linear-gradient(135deg, #ff7a00 0%, #ff5100 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow:
    0 6px 0 #b33900,
    0 8px 24px rgba(255, 81, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
  margin-top: 6px;
  position: relative;
}

.step-box-cta-btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow:
    0 1px 0 #b33900,
    0 4px 12px rgba(255, 81, 0, 0.3);
}

.step-cta-content-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  flex: 1;
  overflow: hidden;
  padding-right: 12px;
}

/* 今すぐ始める！（上部ラベル） */
.step-cta-top-label {
  font-size: 0.95rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  text-align: left;
  width: 100%;
  letter-spacing: 0.03em;
  margin: 0;
}

/* 初動タスク名（下部） */
.step-item-title {
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffffff;
  word-break: break-all;
  line-height: 1.3;
  text-align: left;
  margin: 0;
  width: 100%;
}

/* オレンジ枠内の最右端・実行中アイコン */
.step-cta-right-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-sizing: border-box;
}

.step-cta-right-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
}

/* 補足文言 */
.step-sub-note {
  font-size: 0.95rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  user-select: none;
  z-index: 2;
}

/* 現在の継続〜（枠線・背景廃止、1.5倍サイズ） */
.card-streak-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 4px 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: #f1f5f9;
  margin-top: 12px;
  user-select: none;
  z-index: 2;
}

.bar-chart-container {
  background: #161b26;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 12px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.chart-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}
.chart-avg {
  font-size: 0.85rem;
  color: var(--bar-cyan);
  font-weight: 700;
}

.chart-grid-wrapper {
  display: flex;
  gap: 8px;
  height: 170px;
  align-items: flex-end;
  padding-top: 20px;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
  position: relative;
}
.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
}
.chart-bar-fill {
  width: 65%;
  max-width: 28px;
  background: linear-gradient(to top, #0284c7, var(--bar-cyan));
  border-radius: 4px 4px 0 0;
  min-height: 0px;
  transition: height 0.3s ease;
  position: relative;
}
.chart-bar-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 2px;
  text-align: center;
}
.chart-x-labels {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.chart-x-label {
  flex: 1;
  text-align: center;
  font-size: 0.7rem;
  color: #94a3b8;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.period-selector {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 14px;
}
.period-btn {
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  cursor: pointer;
  color: #94a3b8;
}
.period-btn.active {
  background: var(--bar-cyan);
  color: #0b0d13;
  border-color: var(--bar-cyan);
  font-weight: 700;
}

.history-card {
  background: #161b26;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-left: 5px solid #475569;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 5px;
  cursor: pointer;
}
.history-card.completed {
  border-left-color: var(--bar-cyan);
}
.history-card.overdue {
  border-left-color: var(--bar-fire-red);
}

.standalone-modal-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.modal-menu-btn {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
}
.modal-menu-btn:active {
  background: rgba(255, 255, 255, 0.1);
}
.modal-menu-btn.btn-danger-text {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.3);
}

.dict-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
}
.dict-item:active {
  background: rgba(255, 255, 255, 0.1);
}
.dict-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 1rem;
  color: #f8fafc;
}
.dict-tasks {
  font-size: 0.85rem;
  color: #94a3b8;
}

/* FAB */
.fab-group {
  position: fixed;
  right: 24px;
  bottom: 88px;
  display: flex;
  gap: 16px;
  z-index: 850;
  pointer-events: none;
}
.fab {
  border-radius: 50%;
  border: 1.5px solid rgba(79, 42, 180, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  touch-action: none;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  pointer-events: auto;
  user-select: none;
}
.fab:active {
  transform: scale(0.88);
}

.fab-add {
  width: 70px;
  height: 66px;
  font-size: 34px;
  background: #2563eb;
  color: #f8fafc;
  font-weight: 700;
  box-shadow:
    0 5px 0 #51239c,
    0 10px 20px rgba(68, 10, 163, 0.55);
  transition:
    transform 0.08s ease,
    box-shadow 0.08s ease;
  opacity: 1;
}

.fab-add:active {
  transform: translateY(6px);
  box-shadow:
    0 5px 0 #51239c,
    0 10px 20px rgba(68, 10, 163, 0.55);
}

/* ホーム画面追加時（スタンドアロン起動時）の専用位置設定 */
@media (display-mode: standalone) {
  .bottom-nav-container {
    bottom: 24px;
  }
  .fab-group {
    bottom: 122px; /* 88px + 34px */
  }
}

/* 達成時 1行メッセージ */

.mission-complete-toast {
  position: fixed;

  top: 45%;

  left: 50%;

  /* 出現時の初期スケール */
  transform: translate(-50%, -50%) scale(0.6);

  background: linear-gradient(
    135deg,
    rgba(0, 229, 255, 0.95),
    rgba(2, 132, 199, 0.95)
  );

  color: #040810;

  /* 枠の大きさ・余白調整（好みに合わせて変更可能） */
  padding: 24px 32px;

  min-width: 260px;

  max-width: 85vw;

  border-radius: 28px;

  font-size: 1.25rem;

  font-weight: 900;

  line-height: 1.5;

  text-align: center;

  white-space: pre-line; /* 改行文字（\n）を反映 */

  box-shadow:
    0 0 40px rgba(0, 229, 255, 0.8),
    0 16px 36px rgba(0, 0, 0, 0.5);

  border: 3px solid #ffffff;

  z-index: 4000;

  opacity: 0;

  pointer-events: none;

  /* アニメーション時間と弾み感のイージング */
  transition:
    transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.3s ease;
}

.mission-complete-toast.show {
  /* 表示完了時のスケール（1.05倍などで少し迫力を出すことも可能） */
  transform: translate(-50%, -50%) scale(1.05);

  opacity: 1;
}

/* 紙吹雪Canvas */
#confettiCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 3999;
}

/* カウントダウンオーバーレイ（下からスライド＆ホーム背景準拠） */
#urgent-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background: #0b0d13;
  z-index: 3000;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

#urgent-overlay.active {
  opacity: 1;
}

.countdown-fullscreen-box {
   position: relative;
   width: 100%;
   height: 100vh;
   height: 100dvh;
   box-sizing: border-box;
   overflow: hidden;
   transform: translateY(100vh);
   transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
 }

#urgent-overlay.active .countdown-fullscreen-box {
  transform: translateY(0);
}

.countdown-top-wrapper {
   position: absolute;
   top: 43%;
   left: 50%;
   transform: translate(-50%, -50%);
   width: 312px;
   height: 312px;
   margin: 0;
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 5;
 }

.countdown-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 10;
}

.circle-progress {
  fill: none;
  stroke: #ff0033;
  stroke-width: 10;
  stroke-dasharray: 904.78;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.05s linear;
  filter: drop-shadow(0 0 10px rgba(255, 0, 51, 0.6));
}

.countdown-number {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 88pt;
  font-weight: 900;
  color: #ff4d4d;
  z-index: 2;
  line-height: 1;
  text-shadow: 0 0 30px rgba(255, 77, 77, 0.8);
  user-select: none;
  margin: 0;
  padding: 0;
}

.countdown-action-giant {
   position: absolute;
   top: calc(43% + 170px);
   left: 50%;
   transform: translateX(-50%);
   font-size: 1.55rem;
   font-weight: 900;
   color: #ffffff;
   text-align: center;
   line-height: 1.35;
   white-space: nowrap;
   text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
   padding: 14px 20px;
   border: 2px solid #ff7a00;
   border-radius: 18px;
   background: rgba(255, 122, 0, 0.12);
   width: 90%;
   max-width: 360px;
   box-sizing: border-box;
   z-index: 10;
 }

.countdown-action-giant.highlight-zero {
  border-color: #ff0033 !important;
  background: rgba(255, 0, 51, 0.25) !important;
  color: #ff4d4d !important;
  box-shadow: 0 0 30px rgba(255, 0, 51, 0.6) !important;
}

@keyframes screenFlashTriple {
  0% {
    background-color: rgba(255, 255, 255, 0.95);
  }
  30% {
    background-color: #0b0d13;
  }
  60% {
    background-color: rgba(255, 255, 255, 0.95);
  }
  100% {
    background-color: #0b0d13;
  }
}
.flash-active-triple {
  animation: screenFlashTriple 0.4s ease-out forwards;
}

.countdown-success-actions {
   position: absolute;
   top: calc(43% + 170px);
   left: 50%;
   transform: translateX(-50%);
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 12px;
   width: 90%;
   max-width: 360px;
   box-sizing: border-box;
   z-index: 10;
   animation: popInSuccess 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  }

.countdown-success-actions .btn-action-success {
  width: 100%;
  margin: 0 auto;
}

.btn-action-success {
  width: 100%;
  max-width: 360px;
  min-height: 84px;
  height: auto;
  background: linear-gradient(135deg, #ff7a00 0%, #ff5100 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  z-index: 10;
  box-shadow:
    0 6px 0 #b33900,
    0 8px 24px rgba(255, 81, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition:
    transform 0.1s ease,
    box-shadow 0.1s ease;
}

.btn-action-success:active {
  transform: translateY(2px) scale(0.98);
  box-shadow:
    0 1px 0 #b33900,
    0 4px 12px rgba(255, 81, 0, 0.3);
}

@keyframes popInSuccess {
   0% {
     transform: translateX(-50%) scale(0.6);
     opacity: 0;
   }
   100% {
     transform: translateX(-50%) scale(1);
     opacity: 1;
   }
 }

/* レスポンシブPC対応 */
@media (min-width: 768px) {
  body {
    display: flex;
    justify-content: center;
    background-color: #05070a;
  }
  .main-slider-wrapper,
  .header-sticky-wrapper,
  .chat-overlay-container,
  .bottom-nav-container,
  .profile-fullscreen-container {
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }
  .fab-group {
    right: calc(50% - 216px);
  }
}

.step-sub-note {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  user-select: none;
  z-index: 2;
}

/* 独立したチャット画面 */
.chat-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background: #0b0d13;
  z-index: 850;
  flex-direction: column;
  box-sizing: border-box;
  padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  transition: opacity 0.25s ease-out;
}
.chat-overlay.active {
  display: flex;
  opacity: 1;
}
.chat-overlay-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  background: #0b0d13;
  position: relative;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 12px 16px;
  background: rgba(22, 27, 38, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  z-index: 10;
  box-sizing: border-box;
}

.chat-header-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
}
.chat-messages-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-sizing: border-box;
}
.chat-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  animation: popIn 0.2s ease-out forwards;
}
.chat-row.chat-row-me {
  flex-direction: row-reverse;
}
.chat-avatar {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  overflow: hidden;
  margin-top: 2px;
}
.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.chat-bubble-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 78%;
}
.chat-row-me .chat-bubble-group {
  align-items: flex-end;
}
.chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-row-me .chat-meta {
  flex-direction: row-reverse;
}
.chat-username {
  font-size: 0.75rem;
  font-weight: 700;
  color: #94a3b8;
}
.chat-time {
  font-size: 0.65rem;
  color: #64748b;
  font-family: "Roboto Mono", monospace;
}
.chat-bubble {
  background: #161b26;
  border: 1.5px solid var(--bar-cyan);
  border-radius: 4px 14px 14px 14px;
  padding: 8px 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  color: #f8fafc;
  font-size: 0.9rem;
  line-height: 1.4;
  word-break: break-all;
}
.chat-row-me .chat-bubble {
  background: var(--bar-cyan);
  border: none;
  border-radius: 14px 4px 14px 14px;
  color: #0b0d13;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.35);
}
.chat-bubble .highlight-task {
  font-weight: 700;
  color: var(--bar-cyan);
}
.chat-row-me .chat-bubble .highlight-task {
  color: #0b0d13;
  text-decoration: underline;
}
.chat-reactions-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.reaction-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 3px 8px;
  font-size: 0.8rem;
  color: #cbd5e1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition:
    transform 0.1s,
    background 0.15s;
  user-select: none;
  line-height: 1;
}
.reaction-btn:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.15);
}
.reaction-btn.has-reacted {
  border-color: var(--bar-cyan);
  background: rgba(0, 229, 255, 0.15);
  color: var(--bar-cyan);
  font-weight: 700;
}
.reaction-count {
  font-family: "Roboto Mono", monospace;
  font-size: 0.72rem;
}
.floating-emoji {
  position: absolute;
  pointer-events: none;
  font-size: 1.5rem;
  z-index: 4000;
  animation: floatUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes floatUp {
  0% {
    transform: translate(0, 0) scale(0.8);
    opacity: 1;
  }
  50% {
    transform: translate(var(--dx, 0), -40px) scale(1.3);
    opacity: 0.9;
  }
  100% {
    transform: translate(var(--dx, 0), -80px) scale(1);
    opacity: 0;
  }
}

/* 全画面プロフィール画面 */
.profile-fullscreen-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background: #0b0d13;
  z-index: 2000;
  flex-direction: column;
  box-sizing: border-box;
  padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px));
  opacity: 0;
  transition: opacity 0.25s ease-out;
}
.profile-fullscreen-overlay.active {
  display: flex;
  opacity: 1;
}
.profile-fullscreen-container {
  width: 100%;
  max-width: 480px;
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  background: #0b0d13;
  position: relative;
}
.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px 16px;
  background: rgba(22, 27, 38, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  z-index: 10;
  box-sizing: border-box;
}

.profile-header-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
}
.profile-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

/* 画像・壁紙一体型バナー */
.profile-banner-container {
  position: relative;
  width: 100%;
  height: 150px;
  border-radius: 16px;
  background: #161b26;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-banner-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
}
.profile-banner-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #161b26;
  border: 2px solid var(--bar-cyan);
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.profile-banner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-banner-avatar svg {
  width: 44px;
  height: 44px;
  stroke: #f8fafc;
}

.camera-badge-btn {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(18, 22, 32, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
  padding: 0;
  transition: transform 0.1s;
}
.camera-badge-btn:active {
  transform: scale(0.9);
}
.camera-badge-btn svg {
  width: 15px;
  height: 15px;
  stroke: #f8fafc;
}
.avatar-cam-badge {
  bottom: 0;
  right: 0;
}
.wallpaper-cam-badge {
  bottom: 12px;
  right: 12px;
}

/* 一本線区切りリスト */
.profile-line-list {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.profile-line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  cursor: pointer;
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  font-size: 0.95rem;
  font-weight: 700;
  box-sizing: border-box;
  width: 100%;
  text-align: left;
}
.profile-line-item:last-child {
  border-bottom: none;
}
.profile-line-item:active {
  opacity: 0.7;
}
.profile-name-input-clean {
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  text-align: right;
  padding: 0 !important;
  outline: none !important;
  width: 60% !important;
}

/* 吹き出しアクティブ時の親ラッパー：後続のカードより前面へ */
.card-swipe-wrapper.active-tooltip {
  z-index: 2500 !important;
}

/* ホームカードタップ時の吹き出しコンテナ */
.card-tooltip-bubble {
  position: absolute;
  left: 10px;
  right: 10px;
  top: calc(100% + 12px);
  background: #161b26;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 16px;
  z-index: 2550;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
  animation: popInBubble 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  user-select: none;
  pointer-events: auto; /* 背面カードへのタップ貫通を防止 */
}

/* 吹き出し上部の三角ポインター */
.card-tooltip-bubble::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 8px 8px 8px;
  border-style: solid;
  border-color: transparent transparent #161b26 transparent;
  pointer-events: none;
}

/* 吹き出し内の初動タスク名テキスト（中央揃え） */
.card-tooltip-title {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
  text-align: center; /* 初動タスクは中央揃え */
  word-break: break-all;
}

/* 吹き出し内での btn-start-now-edit の表示 */
.card-tooltip-bubble .btn-start-now-edit {
  display: block !important;
  width: 100%;
  margin: 0 auto;
}

@keyframes popInBubble {
  0% {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 編集モーダル内の削除ボタン */
.btn-delete-event-modal {
  width: 100%;
  padding: 13px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 12px;
  color: #ef4444;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-sizing: border-box;
  transition:
    background 0.15s,
    transform 0.1s;
}

.btn-delete-event-modal:active {
  background: rgba(239, 68, 68, 0.2);
  transform: scale(0.98);
}

/* 編集モーダル：マイタスク（お気に入り星）ボタン */
.btn-star-favorite {
  color: #94a3b8;
  transition: color 0.2s ease, transform 0.15s ease, background 0.2s ease;
}

.btn-star-favorite.active {
  color: #eab308 !important;
  background: rgba(234, 179, 8, 0.15) !important;
  border-color: rgba(234, 179, 8, 0.4) !important;
}

.btn-star-favorite.active svg {
  fill: #eab308;
  stroke: #eab308;
  filter: drop-shadow(0 0 6px rgba(234, 179, 8, 0.6));
}

.btn-star-favorite:active {
  transform: scale(0.9);
}