/* MY LIFE v13 - six image buttons on both computer and phone.
   This file is loaded last to override visual.css's desktop display:none.
   Safe edit points are marked below. No navigation or data code is changed. */

/* DESKTOP: show six category entrances in a 3x2 grid. */
body[data-page="home"] .home-stage .floating-categories {
  display: grid;
  grid-template-columns: repeat(3, 116px);
  gap: 14px;             /* gap between buttons */
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  position: relative;
  z-index: 3;
}

/* Button base styling. Adjust 116px for desktop button size. */
body[data-page="home"] .floating-categories .category {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  width: 116px;         /* desktop width */
  height: 116px;        /* desktop height */
  min-height: 0;
  padding: 7px;
  border-radius: 21px;
  background: rgba(252, 249, 243, 0.80); /* card opacity (0-1) */
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 25px rgba(13, 25, 46, 0.30);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #3d405c;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 140ms ease, background-color 140ms ease;
}
body[data-page="home"] .floating-categories .category:hover {
  transform: translateY(-3px);
  background: rgba(255, 251, 247, .96);
}
body[data-page="home"] .floating-categories .category:focus-visible {
  outline: 3px solid #ffde8c;
  outline-offset: 3px;
}
body[data-page="home"] .floating-categories .cat-icon-img {
  display: block;
  width: 79px;         /* desktop image size */
  height: 79px;
  object-fit: contain;
  flex: none;
  pointer-events: none;
}
body[data-page="home"] .floating-categories .category h3 {
  font-size: 13px;
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
}

/* MEDIUM LAPTOP: keep six visible without crowding the screen. */
@media (min-width: 601px) and (max-height: 680px) {
  body[data-page="home"] .floating-categories .category {width: 96px; height: 96px;}
  body[data-page="home"] .floating-categories {grid-template-columns: repeat(3, 96px); gap: 8px;}
  body[data-page="home"] .floating-categories .cat-icon-img {width: 62px; height: 62px;}
  body[data-page="home"] .home-stage {padding-bottom: 15px;}
}

/* MOBILE: retain the existing 3x2 categories above the four bottom tabs. */
@media (max-width: 600px) {
  body[data-page="home"] .home-stage .floating-categories {
    display: grid;
    grid-template-columns: repeat(3, 78px);
    gap: 9px;
  }
  body[data-page="home"] .floating-categories .category {
    width: 78px;          /* mobile button size */
    height: 78px;
    padding: 5px;
    border-radius: 16px;
    gap: 0;
  }
  body[data-page="home"] .floating-categories .cat-icon-img {width: 52px; height: 52px;}
  body[data-page="home"] .floating-categories .category h3 {font-size: 11px;}
}
@media (max-width: 600px) and (max-height: 640px) {
  body[data-page="home"] .floating-categories .category {height: 68px; width: 70px;}
  body[data-page="home"] .home-stage .floating-categories {grid-template-columns: repeat(3, 70px); gap: 6px;}
  body[data-page="home"] .floating-categories .cat-icon-img {width: 44px; height: 44px;}
  body[data-page="home"] .home-stage {gap: 8px;}
}
@media (prefers-reduced-motion: reduce) {
  body[data-page="home"] .floating-categories .category {transition: none;}
}

/* ===== NO-STARS HOME: change these colors safely in VS Code ===== */
body[data-page="home"] main,
body.home-scene main {background:linear-gradient(150deg,#f7f4f0 0%,#ebe8f0 55%,#f6eee3 100%);color:#3b4056;}
body[data-page="home"] header h1 {color:#3b4056;}
body[data-page="home"] #dateLabel {color:#687084;}
body[data-page="home"] .home-stage {justify-content:center;gap:24px;padding-top:112px;padding-bottom:28px;}
body[data-page="home"] .home-message {margin-bottom:4px;text-shadow:none;}
body[data-page="home"] .home-message>span {color:#8a7790;}
body[data-page="home"] .home-message h2 {color:#3b4056;}
body[data-page="home"] .home-message p {color:#6e7284;}
body[data-page="home"] .floating-categories .category {box-shadow:0 8px 22px rgba(47,46,70,.12);}
@media (max-width:600px){
  body[data-page="home"] .home-stage{justify-content:center;gap:18px;padding-top:85px;padding-bottom:22px;}
  body[data-page="home"] .home-message h2{font-size:24px;}
}
@media (max-width:600px) and (max-height:680px){
  body[data-page="home"] .home-stage{justify-content:center;gap:10px;padding-top:72px;padding-bottom:8px;}
  body[data-page="home"] .home-message{margin-bottom:0;}
  body[data-page="home"] .home-message h2{margin:4px 0;}
}

/* =========================================
   MY LIFE v14｜我的日常主畫面背景
   ========================================= */

/* 電腦版：滿版橫式背景 */
body[data-page="home"] main {
  background:
    linear-gradient(#fff7, #fff7),
    url("assets/tools-wide.png") center center / cover no-repeat;
}

/* 手機版：滿版直式背景 */
@media (max-width: 600px) {
  body[data-page="home"] main {
    background:
      linear-gradient(#fff7, #fff7),
      url("assets/tools-tall.png") center center / cover no-repeat;
  }
}

/* =====================================
   我的日常｜四個水彩工具按鈕
   ===================================== */

/* 電腦版：右上角 */
body[data-page="home"] .desktop-tools > .watercolor-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;

  width: 76px;
  min-width: 76px;
  height: 88px;
  padding: 5px 4px;

  background: rgba(252, 249, 243, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 17px;
  box-shadow: 0 4px 15px rgba(50, 55, 65, 0.12);
  color: #455046;
}

body[data-page="home"] .desktop-tools .watercolor-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

body[data-page="home"] .desktop-tools .watercolor-tool span {
  font-size: 11px;
  white-space: nowrap;
}

/* 較窄的電腦螢幕 */
@media (min-width: 601px) and (max-width: 1000px) {
  body[data-page="home"] .desktop-tools > .watercolor-tool {
    width: 62px;
    min-width: 62px;
    height: 74px;
  }

  body[data-page="home"] .desktop-tools .watercolor-icon {
    width: 42px;
    height: 42px;
  }
}

/* 手機版：底部四格 */
@media (max-width: 600px) {

  body[data-page="home"] .home-tools {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(340px, calc(100% - 24px));
    gap: 8px;
    z-index: 4;
  }

  body[data-page="home"] .home-tools .watercolor-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: auto;

    min-width: 0;
    min-height: 76px;
    padding: 5px 2px;
    gap: 2px;

    background: rgba(252, 249, 243, 0.86);
    border-radius: 16px;
  }

  body[data-page="home"] .home-tools .watercolor-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
  }

  body[data-page="home"] .home-tools .watercolor-tool span {
    font-size: 11px;
    line-height: 1.2;
  }
}

/* =====================================
   電腦版｜水彩工具列的位置
   ===================================== */

/* 非首頁：右上方保留精簡水彩工具列 */
@media (min-width: 601px) {

  body:not([data-page="home"]) .desktop-tools > .watercolor-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 58px;
    min-width: 58px;
    height: 68px;
    padding: 5px 3px;
    border-radius: 14px;
  }

  body:not([data-page="home"]) .desktop-tools .watercolor-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
  }

  body:not([data-page="home"]) .desktop-tools .watercolor-tool span {
    font-size: 10px;
    white-space: nowrap;
  }
}

/* 寬螢幕首頁：四個工具移到左側 */
@media (min-width: 1000px) {

  body[data-page="home"] header .desktop-tools > button.watercolor-tool {
    position: absolute;
    left: 0;
    width: 76px;
    min-width: 76px;
    height: 84px;
    z-index: 6;
  }

  body[data-page="home"] header .desktop-tools > button.watercolor-tool:nth-of-type(1) {
    top: 105px; /* 月曆 */
  }

  body[data-page="home"] header .desktop-tools > button.watercolor-tool:nth-of-type(2) {
    top: 199px; /* 夢想清單 */
  }

  body[data-page="home"] header .desktop-tools > button.watercolor-tool:nth-of-type(3) {
    top: 293px; /* 搜尋 */
  }

  body[data-page="home"] header .desktop-tools > button.watercolor-tool:nth-of-type(4) {
    top: 387px; /* 設定 */
  }
}

/* =====================================
   六大功能｜電腦與手機圖示放大
   ===================================== */

/* 電腦 */
@media (min-width: 601px) {
  body[data-page="home"] .home-stage .floating-categories {
    grid-template-columns: repeat(3, 132px);
    gap: 14px;
  }

  body[data-page="home"] .floating-categories .category {
    width: 132px;
    height: 132px;
    padding: 5px;
  }

  body[data-page="home"] .floating-categories .cat-icon-img {
    width: 100px;
    height: 100px;
  }
}

/* 手機 */
@media (max-width: 600px) {
  body[data-page="home"] .home-stage .floating-categories {
    grid-template-columns: repeat(3, 92px);
    gap: 8px;
  }

  body[data-page="home"] .floating-categories .category {
    width: 92px;
    height: 92px;
    padding: 3px;
  }

  body[data-page="home"] .floating-categories .cat-icon-img {
    width: 70px;
    height: 70px;
  }
}

/* 螢幕高度較短時，避免按鈕擠出畫面 */
@media (min-width: 601px) and (max-height: 680px) {
  body[data-page="home"] .home-stage .floating-categories {
    grid-template-columns: repeat(3, 108px);
    gap: 8px;
  }

  body[data-page="home"] .floating-categories .category {
    width: 108px;
    height: 108px;
  }

  body[data-page="home"] .floating-categories .cat-icon-img {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 600px) and (max-height: 640px) {
  body[data-page="home"] .home-stage .floating-categories {
    grid-template-columns: repeat(3, 78px);
    gap: 6px;
  }

  body[data-page="home"] .floating-categories .category {
    width: 78px;
    height: 78px;
  }

  body[data-page="home"] .floating-categories .cat-icon-img {
    width: 56px;
    height: 56px;
  }
}

/* =====================================
   六大功能｜方框風格實驗區
   ===================================== */

body[data-page="home"] {
--life-card-bg: transparent;
--life-card-border: none;
--life-card-shadow: none;
--life-card-radius: 50%;
}


/* MY LIFE｜六大功能正圓形按鈕 */

body[data-page="home"] .floating-categories .category,
body[data-page="home"] .floating-categories .category:hover {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  box-sizing: border-box;

  background: rgba(252, 249, 243, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(47, 46, 70, 0.10);
}

/* 手機版｜六大功能圓形按鈕與間距 */
@media (max-width: 600px) {

  body[data-page="home"] .home-stage .floating-categories {
    grid-template-columns: repeat(3, 98px);
    column-gap: 14px;
    row-gap: 18px;
    justify-content: center;
  }

  body[data-page="home"] .floating-categories .category {
    width: 98px;
    height: 98px;
    border-radius: 50%;
  }

  body[data-page="home"] .floating-categories .cat-icon-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
  }
}

/* 較窄的手機，自動縮小避免超出螢幕 */
@media (max-width: 350px) {
  body[data-page="home"] .home-stage .floating-categories {
    grid-template-columns: repeat(3, 86px);
    column-gap: 10px;
    row-gap: 14px;
  }

  body[data-page="home"] .floating-categories .category {
    width: 86px;
    height: 86px;
  }

  body[data-page="home"] .floating-categories .cat-icon-img {
    width: 60px;
    height: 60px;
  }
}


/* =====================================
   MY LIFE｜新增紀錄六格圓形選單
   ===================================== */

/* 彈出視窗 */
#categoryPicker {
  width: min(430px, 94vw);
  padding: 24px 18px;
  border-radius: 24px;
}

/* 三欄、兩排 */
#categoryPicker .category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 12px;
}

/* 圓形按鈕 */
#categoryPicker .picker-category {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;

  width: 100%;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1 / 1;
  padding: 7px 4px;

  border-radius: 50%;
  background: rgba(252, 249, 243, 0.80);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(47, 46, 70, 0.10);
}

/* 六張水彩圖片 */
#categoryPicker .picker-icon {
  width: min(65%, 64px);
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
}

/* 圖示下方文字 */
#categoryPicker .picker-category h3 {
  margin: 0;
  font-size: 12px;
  line-height: 1.2;
}

/* 手機版 */
@media (max-width: 600px) {
  #categoryPicker {
    padding: 20px 13px;
  }

  #categoryPicker .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px 10px;
  }

  #categoryPicker .picker-icon {
    width: 62%;
  }
}

/* =====================================
   MY LIFE v14｜隱藏重複新增按鈕
   ===================================== */

/* 六大功能：已有記一筆表單或頁籤 */
body[data-page="category"] .inline-add-row {
  display: none !important;
}

/* 電腦版：不需要新增的頁面 */
@media (min-width: 901px) {

  /* 我的日常：直接點六大功能圖示 */
  body[data-page="home"] .desktop-tools .new-menu,

  /* 六大功能：已有記一筆表單 */
  body[data-page="category"] .desktop-tools .new-menu,

  /* 設定：不需要新增紀錄 */
  body[data-page="settings"] .desktop-tools .new-menu {
    display: none !important;
  }
}

/* =========================================
   MY LIFE v14｜電腦版固定左側工具列
   ========================================= */

@media (min-width: 901px) {

  /* 整排工具固定在畫面左側 */
  body .desktop-tools {
    position: fixed !important;
    left: 15px !important;
    top: 50% !important;
    right: auto !important;
    transform: translateY(-50%) !important;

    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    gap: 10px;

    width: 84px;
    z-index: 50;
  }

  /* 四個水彩按鈕 */
  body .desktop-tools > button.watercolor-tool {
    position: static !important;
    inset: auto !important;
    transform: none !important;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;

    width: 80px;
    min-width: 80px;
    height: 86px;
    padding: 5px;

    border-radius: 18px;
    background: rgba(252, 249, 243, 0.82);
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 5px 16px rgba(47,46,70,0.12);
  }

  /* 四張水彩圖片 */
  body .desktop-tools .watercolor-icon {
    width: 54px;
    height: 54px;
    object-fit: contain;
  }

  /* 圖示名稱 */
  body .desktop-tools .watercolor-tool span {
    font-size: 11px;
    white-space: nowrap;
  }

  /* 左側新增按鈕 */
  body .desktop-tools .desktop-quick-add {
    width: 80px;
    min-width: 80px;
    height: 46px;
    border-radius: 16px;
    background: rgba(252,249,243,0.85);
    font-size: 13px;
  }

  /* 首頁、六大功能、設定不顯示新增 */
  body[data-page="home"] .desktop-quick-add,
  body[data-page="category"] .desktop-quick-add,
  body[data-page="settings"] .desktop-quick-add {
    display: none !important;
  }

  /* 隱藏其他重複的頂端新增 */
  body[data-page="category"] #headerAdd,
  body[data-page="dreams"] #headerAdd,
  body[data-page="calendar"] #calendarAdd {
    display: none !important;
  }

  /* 非首頁內容預留左側空間 */
  body:not([data-page="home"]) main {
    padding-left: 110px;
  }

  /* 打開輸入視窗時，暫時隱藏左側工具 */
  body:has(dialog[open]) .desktop-tools {
    visibility: hidden;
  }
}

/* 較窄的平板／電腦視窗，先維持上方橫排 */
@media (min-width: 601px) and (max-width: 900px) {
  body .desktop-tools {
    position: fixed;
    top: 12px;
    right: 12px;
    left: auto;
    display: flex;
    flex-direction: row;
    gap: 5px;
    z-index: 50;
  }

  body:has(dialog[open]) .desktop-tools {
    visibility: hidden;
  }
}

/* 手機｜工具頁新增生活紀錄 */

#mobileRecordAdd {
  display: none !important;
}

@media (max-width: 600px) {

  /* 夢想清單：取消原本重複的右上角新增夢想 */
  body[data-page="dreams"] #headerAdd {
    display: none !important;
  }

  /* 只在夢想清單及搜尋顯示 */
  body[data-page="dreams"] #mobileRecordAdd,
  body[data-page="search"] #mobileRecordAdd {
    display: grid !important;
    place-items: center;

    order: 3;
    flex: none;
    margin-left: auto;

    width: 66px;
    height: 38px;
    padding: 4px 8px;

    border-radius: 18px;
    background: rgba(252, 249, 243, 0.88);
    color: #566346;
    font-size: 12px;
    box-shadow: 0 3px 10px rgba(50, 50, 65, 0.10);
  }
}

/* 電腦版｜四個水彩工具統一大小 */

@media (min-width: 901px) {

  body .desktop-tools > button.watercolor-tool {
    width: 80px !important;
    min-width: 80px !important;
    height: 86px !important;
    padding: 5px !important;
  }

  body .desktop-tools .watercolor-icon {
    width: 54px !important;
    height: 54px !important;
    object-fit: contain;
  }

  body .desktop-tools .watercolor-tool span {
    font-size: 11px !important;
    white-space: nowrap;
  }
}

/* 紀錄列表｜月份與日期分隔 */

/* 月份：比較醒目 */
.records .month-divider {
  padding: 12px 14px;
  margin-top: 14px;
  border-radius: 13px;
  background: rgba(219, 210, 229, 0.42);
  color: #5C5471;
  font-size: 14px;
  font-weight: 700;
}

/* 每天：細線與日期 */
.records .day-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px 3px;
  color: #697B70;
  font-size: 12px;
  font-weight: 600;
}

.records .day-divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(
    90deg,
    rgba(134, 160, 143, 0.55),
    transparent
  );
}

/* ========================================
   MY LIFE v14｜月曆搜尋區
   ======================================== */

body[data-page="calendar"] .calendar-lookup {
  flex: none;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.85);
}

body[data-page="calendar"] .calendar-lookup label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #655c75;
}

body[data-page="calendar"] #calendarLookup {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  border: 1px solid #d8d2df;
  border-radius: 12px;
  background: rgba(252, 249, 243, 0.92);
  font-size: 13px;
}

/* 搜尋結果 */
body[data-page="calendar"] .calendar-lookup-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 190px;
  overflow-y: auto;
  margin-top: 10px;
}

body[data-page="calendar"] .calendar-lookup-results:empty {
  display: none;
}

body[data-page="calendar"] .calendar-lookup-hit {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 11px 12px;
  border-radius: 11px;
  background: rgba(245, 240, 247, 0.85);
  text-align: left;
  color: #4f4c62;
}

body[data-page="calendar"] .calendar-lookup-hit:hover {
  background: #e8dfed;
}

body[data-page="calendar"] .calendar-lookup-hit span {
  font-size: 11px;
  color: #80758c;
}

body[data-page="calendar"] .calendar-lookup-hit strong {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
}

body[data-page="calendar"] .calendar-lookup-hint {
  margin: 4px 0;
  font-size: 11px;
  color: #82778e;
}

/* 手機版稍微縮小間距 */
@media (max-width: 600px) {
  body[data-page="calendar"] .calendar-lookup {
    padding: 10px;
    margin-bottom: 8px;
  }

  body[data-page="calendar"] .calendar-lookup-results {
    max-height: 145px;
  }
}

/* =====================================
   MY LIFE｜手機月曆搜尋彈窗
   ===================================== */

/* 電腦不顯示手機搜尋按鈕 */
.calendar-mobile-search-button {
  display: none;
}

/* 手機搜尋彈窗 */
#mobileCalendarLookupDialog {
  width: min(440px, calc(100vw - 28px));
  max-height: 82dvh;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 24px;
  background: #fdf9f5;
  color: #514f62;
  box-shadow: 0 18px 55px rgba(37,36,55,0.22);
  overflow: hidden;
  box-sizing: border-box;
}

#mobileCalendarLookupDialog::backdrop {
  background: rgba(40,40,55,0.36);
  backdrop-filter: blur(3px);
}

.mobile-calendar-lookup-inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  max-height: 82dvh;
  box-sizing: border-box;
}

.mobile-calendar-lookup-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

#closeMobileCalendarLookup {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(231,225,235,0.65);
  font-size: 17px;
}

#mobileCalendarLookup {
  width: 100%;
  box-sizing: border-box;
  padding: 13px;
  border-radius: 13px;
  border: 1px solid #d8d2df;
  background: #fff;
  font-size: 16px;
}

#mobileCalendarLookupDialog .calendar-lookup-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-height: 0;
  max-height: 58dvh;
  overflow-y: auto;
  margin-top: 0;
}

.calendar-lookup-more {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(220,232,216,0.8);
  color: #526c56;
  font-size: 13px;
  font-weight: 600;
}

/* 手機：月曆不再常駐搜尋框 */
@media (max-width: 600px) {
  body[data-page="calendar"] .calendar-lookup {
    display: none !important;
  }

  /* =====================================
   MY LIFE｜手機月曆右上角搜尋按鈕
   ===================================== */

/* 預設桌機不顯示 */
.calendar-mobile-search-button {
  display: none;
}

/* 讓月曆頁內容可定位按鈕 */
body[data-page="calendar"] #content {
  position: relative;
}

@media (max-width: 600px) {

  /* 手機版：右上角搜尋按鈕 */
  body[data-page="calendar"] .calendar-mobile-search-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    position: absolute;
    top: 235px;
    right: 12px;
    z-index: 5;

    width: auto;
    margin: 0;
    padding: 8px 12px;

    border-radius: 999px;
    background: rgba(252, 249, 243, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(47, 46, 70, 0.10);

    color: #5e6f59;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
  }

  body[data-page="calendar"] .calendar-mobile-search-icon {
    font-size: 16px;
    line-height: 1;
  }

  body[data-page="calendar"] .calendar-mobile-search-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
  }

  /* 手機版仍然隱藏右側常駐搜尋框 */
  body[data-page="calendar"] .calendar-lookup {
    display: none !important;
  }
}
}

/* 月曆｜水彩放大鏡小圖示 */

body[data-page="calendar"] .calendar-mobile-search-img {
  width: 26px;
  height: 26px;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

/* MY LIFE v14｜未來進行式雙儲存按鈕 */

/* 隱藏時一定不佔位置 */
#savePendingRecord[hidden] {
  display: none !important;
}

/* 只有雙按鈕出現時才改成左右排列 */
#editor .form-actions:has(
  #savePendingRecord:not([hidden])
) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#editor .form-actions:has(
  #savePendingRecord:not([hidden])
) #saveRecord,
#editor .form-actions #savePendingRecord {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 10px 8px;
  font-size: 12px;
  border-radius: 14px;
}

#editor .form-actions #savePendingRecord {
  background: rgba(218, 232, 215, 0.94);
  color: #526F57;
  border: 1px solid #ADC5AC;
  font-weight: 600;
}

/* 六大功能｜未來進行式雙按鈕 */

.category-inline-form .form-actions.inline-dual-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.category-inline-form .inline-dual-actions button {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 6px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 600;
}

.category-inline-form .inline-dual-actions .future-save {
  background: rgba(218, 232, 215, 0.94);
  color: #526f57;
  border: 1px solid #adc5ac;
}

/* =========================================
   MY LIFE｜未來進行式紀錄
   ========================================= */

/* 未完成紀錄增加淡淡的辨識色 */
.record.future-record {
  border-left: 3px solid #9fb7a0;
}

/* 以空方框取代未完成紀錄的原圖示 */
.record .future-checkbox {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 43px;
  height: 43px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid #c4d4c2;
  background: rgba(224, 234, 219, 0.8);
  color: #647b68;
  font-size: 28px;
  line-height: 1;
}

.record .future-checkbox:hover {
  background: #d3e4cf;
}

/* 詳細視窗內的未來進行式資訊 */
#editor .future-detail {
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 15px;
  background: rgba(224, 234, 219, 0.55);
  border: 1px solid rgba(161, 185, 161, 0.45);
}

#editor .future-detail > strong {
  display: block;
  color: #526d58;
  font-size: 15px;
}

#editor .future-detail > p {
  margin: 10px 0 14px;
  color: #66756b;
  font-size: 12px;
  line-height: 1.7;
}

#editor .future-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(143, 168, 144, 0.2);
  font-size: 12px;
}

#editor .future-detail-row span {
  flex-shrink: 0;
  color: #758276;
}

#editor .future-detail-row b {
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}

/* 詳細視窗的確認按鈕 */
#editor #futureCompleteButton {
  min-height: 46px;
  margin-left: 0;
  border-radius: 13px;
  background: #68856b;
  font-size: 13px;
}

#editor #futureCompleteButton[hidden] {
  display: none !important;
}

#editor .form-actions:has(#futureCompleteButton:not([hidden])) {
  justify-content: flex-end;
  flex-wrap: wrap;
}

#editor .form-actions:has(#futureCompleteButton:not([hidden]))
#saveRecord {
  margin-left: 0;
}

@media (max-width: 600px) {
  #editor .form-actions #futureCompleteButton {
    flex: 1;
  }
}

/* =====================================
   MY LIFE｜未來進行式小方框
   ===================================== */

/* 方框與文字放在同一行 */
.record small.future-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

/* 小方框，不再使用大圖示的尺寸 */
.record .future-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  margin: 0;

  border: none;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;

  color: #647b68;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.record .future-checkbox:hover {
  background: rgba(220, 233, 218, 0.6);
}

.record .future-checkbox:focus-visible {
  outline: 2px solid #829f86;
  outline-offset: 2px;
}

/* =====================================
   MY LIFE｜編輯視窗前方警告提示
   ===================================== */

#editor .editor-front-message {
  position: fixed;
  top: max(24px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;

  width: min(420px, calc(100vw - 36px));
  box-sizing: border-box;
  padding: 15px 18px;

  border-radius: 14px;
  background: #775957;
  color: #fff;
  box-shadow: 0 8px 28px rgba(48, 37, 42, 0.25);

  font-size: 13px;
  font-weight: 600;
  line-height: 1.7;
  text-align: center;
  pointer-events: none;
}

#editor .editor-front-message[hidden] {
  display: none !important;
}

/* =====================================
   MY LIFE｜編輯未來進行式：雙儲存按鈕
   ===================================== */

#saveAndCompleteEdit[hidden] {
  display: none !important;
}

/* 編輯未來進行式時，兩個按鈕並排 */
#editor .form-actions:has(
  #saveAndCompleteEdit:not([hidden])
) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* 刪除按鈕另外佔一行 */
#editor .form-actions:has(
  #saveAndCompleteEdit:not([hidden])
) #deleteRecord {
  grid-column: 1 / -1;
  justify-self: start;
}

/* 兩顆儲存按鈕尺寸一致 */
#editor .form-actions:has(
  #saveAndCompleteEdit:not([hidden])
) #saveRecord,
#editor .form-actions #saveAndCompleteEdit {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 10px 6px;
  border-radius: 13px;
  font-size: 12px;
  line-height: 1.5;
}

/* 儲存並完成：柔和鼠尾草綠 */
#editor .form-actions #saveAndCompleteEdit {
  background: #68856b;
  color: #ffffff;
}

/* =====================================
   MY LIFE｜月曆實心／空心紀錄點
   ===================================== */

/* 統一月曆色點尺寸 */
.calendar-layout .day .dots .dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  box-sizing: border-box;
  border-radius: 50%;
}

/* 未來進行式：空心 */
.calendar-layout .day .dots .dot-pending {
  background: transparent;
  border: 1.5px solid var(--dot);
}

/* 手機週曆使用稍小的色點 */
@media (max-width: 600px) {
  .calendar-layout .week-row .dots .dot {
    width: 6px;
    height: 6px;
    flex-basis: 6px;
  }

  .calendar-layout .week-row .dots .dot-pending {
    border-width: 1px;
  }
}

/* =====================================
   MY LIFE｜六大功能紀錄卡片水彩圖示
   ===================================== */

.record-icon .record-watercolor-icon {
  display: block;
  width: 100%;
  height: 100%;
  padding: 2px;
  object-fit: contain;
}
