/* ==========================================================================
   GANREF 經典亮色系極簡高雅風格 - CSS 設計
   ========================================================================== */
:root {
  --font-title: 'League Gothic', 'Inter', -apple-system, sans-serif;
  --font-body: 'Noto Sans TC', 'Inter', -apple-system, sans-serif;

  --bg-main: #FFFFFF;
  --bg-dark-nav: #1B1B1B;

  --color-accent: #E50012;
  /* GANREF 經典紅 */
  --color-sat: #0066CC;
  /* 星期六藍 */
  --color-muted: #666666;

  --text-main: #111111;
  --text-muted: #999999;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* ==========================================================================
   基礎設定與排版清除
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   頂部導覽列 (Navbar)
   ========================================================================== */
.navbar {
  background-color: var(--bg-dark-nav);
  color: #FFFFFF;
  padding: 0.6rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-family: 'Montserrat', var(--font-title);
  font-size: 1.65rem;
  font-weight: 800;
  color: #FFFFFF;
  text-decoration: none;
  display: flex;
  align-items: center;
  letter-spacing: -0.5px;
  text-transform: none; /* 允許大小寫混排 */
}

.logo-camera-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 12px;
  margin-right: 12px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.25rem;
}

.nav-links a {
  color: #BBBBBB;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.nav-links a:hover {
  color: #FFFFFF;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.search-btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #CCCCCC;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.search-btn-icon:hover {
  color: #FFFFFF;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.welcome-msg {
  color: #999999;
  font-size: 0.8rem;
}

/* ==========================================================================
   通用按鈕元件
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background-color: #FFFFFF;
  color: #111111;
  border-color: #FFFFFF;
}

.btn-primary:hover {
  background-color: #E0E0E0;
  color: #000000;
}

.btn-secondary {
  background-color: transparent;
  border-color: #555555;
  color: #DDDDDD;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #CCCCCC;
  color: #FFFFFF;
}

.btn-danger {
  background-color: transparent;
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.btn-danger:hover {
  background-color: var(--color-accent);
  color: #FFFFFF;
}

.btn-block {
  display: flex;
  width: 100%;
}

/* ==========================================================================
   主要版面配置與 TODAY'S PHOTO 大標題
   ========================================================================== */
.main-container {
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 10px 4rem;
  flex: 1;
}

.title-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.2rem;
  margin-bottom: 1rem;
}

.title-main-wrapper {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.title-main {
  font-family: var(--font-title);
  font-size: 2.0rem;
  font-weight: 300;
  letter-spacing: 6px;
  color: #111111;
  line-height: 1;
  text-transform: uppercase;
}

.title-month-display {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 400;
  color: #111111;
  letter-spacing: 1px;
}

.italic-month {
  font-size: 2.2rem;
  font-style: normal;
  font-weight: 700;
  margin-left: 2px;
}

.title-underline {
  width: 60px;
  height: 3px;
  background-color: #111111;
  margin-top: 0.75rem;
}

/* ==========================================================================
   個人 Profile 區塊
   ========================================================================== */
/* Profile 與左右月份箭頭混合排版容器 */
.owner-profile-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  /* 使左右箭頭對齊中間卡片的底部 */
  width: 100%;
  margin: 0 auto 3rem;
  gap: 2rem;
}

.owner-profile-section {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  max-width: 600px;
  /* 控制中間文字寬度，留出左右空間給箭頭 */
  flex-grow: 1;
  align-items: start;
}

.profile-avatar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.profile-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: #EEEEEE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #888888;
  overflow: hidden;
  border: none;
}

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

.profile-info {
  font-size: 0.85rem;
  color: #333333;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.label-mvp {
  background-color: #111111;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 2px;
}

.profile-name {
  font-weight: 700;
  color: #111111;
}

.profile-comment {
  line-height: 1.5;
  color: #555555;
}

/* ==========================================================================
   月份切換與日曆主體 (完全仿照 GANREF)
   ========================================================================== */
.calendar-section {
  width: 100%;
  margin-top: 1rem;
}

.month-selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;
}

.btn-arrow {
  background: none;
  border: none;
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 700;
  color: #111111;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: color var(--transition-fast);
  padding: 5px 0;
  letter-spacing: 0.5px;
}

.btn-arrow:hover {
  color: #111111;
  /* 保持字體顏色 */
}

/* GANREF 左箭頭結構 */
.ganref-arrow-left {
  position: relative;
  display: inline-block;
  width: 40px;
  /* 正常時的實體寬度，固定不動以鎖死日期文字 */
  height: 8px;
  /* 讓箭頭斜角跟線段有對齊的高度 */
  overflow: visible;
}

/* 左箭頭水平線 */
.ganref-arrow-left::after {
  content: '';
  position: absolute;
  right: 0; /* 固定在右邊 */
  bottom: 0;
  width: 100%; /* 起始寬度 100% */
  height: 1px;
  background-color: #111111;
  transition: width 0.3s ease; /* 寬度向左延伸的動畫 */
}

/* 左箭頭斜角圖案 */
.ganref-arrow-left::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 10px;
  height: 4px;
  background-color: #111111;
  transform: skewX(-45deg);
  /* 斜切角 */
  transform-origin: left bottom;
  transition: left 0.3s ease; /* 隨着水平線變長，斜角同步往左移動 */
}

/* GANREF 右箭頭結構 */
.ganref-arrow-right {
  position: relative;
  display: inline-block;
  width: 40px;
  /* 正常時的實體寬度，固定不動以鎖死日期文字 */
  height: 8px;
  overflow: visible;
}

/* 右箭頭水平線 */
.ganref-arrow-right::after {
  content: '';
  position: absolute;
  left: 0; /* 固定在左邊 */
  bottom: 0;
  width: 100%; /* 起始寬度 100% */
  height: 1px;
  background-color: #111111;
  transition: width 0.3s ease; /* 寬度向右延伸的動畫 */
}

/* 右箭頭斜角圖案 */
.ganref-arrow-right::before {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 10px;
  height: 4px;
  background-color: #111111;
  transform: skewX(45deg);
  /* 斜切角 */
  transform-origin: right bottom;
  transition: right 0.3s ease; /* 隨着水平線變長，斜角同步往右移動 */
}

/* Hover 滑鼠移動過去時，水平線變長且斜角向外側位移，但 ganref-arrow 容器寬度不變 */
.btn-arrow:hover .ganref-arrow-left::after {
  width: 65px;
}
.btn-arrow:hover .ganref-arrow-left::before {
  left: -25px; /* 寬度增加了 25px (65px - 40px)，所以斜角向左偏移 25px */
}

.btn-arrow:hover .ganref-arrow-right::after {
  width: 65px;
}
.btn-arrow:hover .ganref-arrow-right::before {
  right: -25px; /* 寬度增加了 25px (65px - 40px)，所以斜角向右偏移 25px */
}

/* 星期標頭 - 上下一條細黑水平線 */
.calendar-week-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 1.00rem;
  font-weight: 700;
  color: #111111;
  border-top: 1px solid #111111;
  border-bottom: 1px solid #111111;
  padding: 0.5rem 0;
  margin-bottom: 0px;
  letter-spacing: 0.5px;
}

.week-day.sun {
  color: var(--color-accent);
}

.week-day.sat {
  color: var(--color-sat);
}

/* 日曆網格與星期 Row */
.calendar-grid-container {
  display: flex;
  flex-direction: column;
}

/* 星期行 - 只有底部是細黑橫線，行與行之間不使用 margin 隔開，改由格子內部 padding 撐出天然對稱行距 */
.week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: start;
  /* 防止 Grid stretch 對齊拉扁子元素，確保 aspect-ratio 正常運作 */
  border-bottom: 1px solid #111111;
  /* 只有底部水平橫線 */
  margin-bottom: 0;
  /* 移除外距 */
}

/* 單一日格子 - 純白底色，移除 flex 佈局，利用上下各 8px padding 自動形成 16px 行距，使高度與直向線絕對對稱 */
.day-cell {
  position: relative;
  width: 100%;
  background-color: var(--bg-main);
  cursor: pointer;
  overflow: visible;
  display: block;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 0;
  padding-right: 0;
}

/* 縱向分割細黑線：絕對定位，縮進 top/bottom 8px，與橫線對稱分離 */
.day-cell::after {
  content: '';
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background-color: #111111;
  /* 純黑色縱線 */
  z-index: 2;
}

/* 每行最後一個 (SAT 週六) 移除縱向分割線 */
.day-cell:last-child::after {
  display: none;
}

/* 照片容器 - 採用絕對定位拉滿內容區，使縮圖極大化，且不會碰到黑色縱線與底部的黑色橫線 */
.day-photo-wrap {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 9px;
  /* 留出右側間距，不碰到縱向黑線 */
  bottom: 8px;
  /* 留出底部間距，不碰到下方的橫向黑線 */
  width: calc(100% - 17px);
  /* 寬度配合 left 與 right 縮排 */
  height: calc(100% - 16px);
  /* 高度配合 top 與 bottom 縮排 */
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  z-index: 1;
  overflow: hidden;
}

.day-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* 日期數字 - 大字粗體 */
.day-number {
  position: absolute;
  top: 14px;
  left: 16px;
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 700;
  z-index: 5;
  pointer-events: none;
}

/* 預設無照片時的顏色 (極簡淡灰) */
.day-cell .day-number {
  color: #CCCCCC;
}

.day-cell.sun .day-number {
  color: var(--color-accent);
}

.day-cell.sat .day-number {
  color: var(--color-sat);
}

/* 當有照片時，日期數字變成純白色並帶有柔和陰影 */
.day-cell:has(.day-photo-wrap) .day-number {
  color: #FFFFFF !important;
  font-size: 1.4rem;
  top: 14px;
  left: 16px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* 今天高亮 - 徹底移除任何今天日期格可能產生的邊框或黑框 */
.day-cell.is-today {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* 未到日期 */
.day-cell.is-future {
  opacity: 0.35;
  cursor: not-allowed;
}

.day-cell.is-future:hover {
  box-shadow: none;
}

/* 其他月份 */
.day-cell.is-sibling {
  opacity: 0.25;
}

/* ==========================================================================
   BACK NUMBER 區塊樣式
   ========================================================================== */
.back-number-section {
  max-width: 780px;
  margin: 4rem auto 2rem;
  text-align: center;
}

.back-number-title {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: #111111;
  margin-bottom: 2rem;
}

.back-number-year-block {
  margin-bottom: 2rem;
}

.back-number-year-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}

.back-number-year-line {
  flex: 1;
  height: 1px;
  background-color: #E0E0E0;
}

.back-number-year-text {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 700;
  color: #111111;
  letter-spacing: 1px;
}

/* 12 個月份網格 */
.back-number-months-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.5rem;
}

.back-number-month-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #111111;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: opacity var(--transition-fast);
}

.back-number-month-item:hover {
  opacity: 0.7;
}

.back-number-month-num {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.back-number-month-name {
  font-size: 0.55rem;
  font-weight: 600;
  color: #777777;
  letter-spacing: 0.5px;
  margin-top: 2px;
  text-transform: uppercase;
}

/* 未來的月份 - 禁用與灰字 */
.back-number-month-item.is-future-month {
  color: #CCCCCC !important;
  cursor: not-allowed;
  pointer-events: none;
}

.back-number-month-item.is-future-month .back-number-month-name {
  color: #CCCCCC !important;
}

/* 當前選中的月份 (底線高亮) */
.back-number-month-item.is-active-month {
  border-bottom: 2px solid var(--color-accent);
}

/* 展開摺疊按鈕 */
.back-number-toggle-wrapper {
  margin-top: 1.5rem;
}

.back-number-toggle-btn {
  background: none;
  border: none;
  font-size: 0.85rem;
  color: #111111;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.back-number-toggle-btn:hover {
  color: var(--color-accent);
}

.toggle-icon {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.back-number-toggle-btn.active .toggle-icon {
  transform: rotate(180deg);
}

/* ==========================================================================
   彈窗 (Modals) 與 大圖燈箱 (Lightbox)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 6px;
  width: 90%;
  max-width: 460px;
  padding: 2.5rem 2rem;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  transform: scale(0.96);
  transition: transform var(--transition-fast);
  color: #111111;
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: #999999;
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: #111111;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  border-left: 4px solid var(--color-accent);
  padding-left: 0.75rem;
}

.modal-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* 表單 */
.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group textarea {
  border: 1px solid #CCCCCC;
  border-radius: 4px;
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #111111;
}

.form-group-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.form-group-checkbox input {
  width: 15px;
  height: 15px;
}

.form-group-checkbox label {
  font-size: 0.8rem;
  color: #555555;
  cursor: pointer;
}

.form-error {
  color: var(--color-accent);
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

/* 上傳拖曳區 */
.file-dropzone {
  border: 2px dashed #CCCCCC;
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  background: var(--color-empty-day);
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.file-dropzone:hover {
  border-color: #111111;
}

.dropzone-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-preview-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #FFFFFF;
}

.file-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.btn-primary.btn-block {
  background-color: #111111;
  color: #FFFFFF;
}

.btn-primary.btn-block:hover {
  background-color: #333333;
}

/* 獨立照片詳細頁視圖 (仿 GANREF) */
.photo-detail-view {
  width: 100%;
  margin: 1.5rem auto 3rem;
  animation: fadeIn 0.3s ease-in-out;
}

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

.detail-navigation {
  margin-bottom: 1.5rem;
}

.btn-back-calendar {
  background: none;
  border: 1px solid #111111;
  padding: 0.5rem 1.2rem;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  color: #111111;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  background-color: #FFFFFF;
}

.btn-back-calendar:hover {
  background-color: #111111;
  color: #FFFFFF;
}

/* 相片超大展示區，仿 GANREF 置中黑色高質感視窗 */
.detail-photo-wrapper {
  position: relative;
  width: 100%;
  height: 820px; /* 從 650px 提高到 820px，讓照片看起來非常霸氣 */
  background-color: #0B0B0B;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #111111;
}

.detail-zoom-viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  cursor: grab;
}

.detail-zoom-viewport:active {
  cursor: grabbing;
}

.detail-zoom-viewport img {
  max-width: 100%; /* 從 96% 擴展至 100% 滿版 */
  max-height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: center center;
  transition: transform 0.1s ease-out;
}

/* 放大縮小控制項 (配合使用者需求永久隱藏) */
.detail-zoom-controls {
  display: none !important;
  position: absolute;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 30px;
  display: flex;
  gap: 16px;
  z-index: 100;
  backdrop-filter: blur(5px);
}

.detail-zoom-controls button {
  background: none;
  border: none;
  color: #FFFFFF;
  font-size: 1.1rem;
  font-weight: 700;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.1s;
}

.detail-zoom-controls button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.detail-zoom-controls button:active {
  transform: scale(0.9);
}

/* 下方文字日記排版 - 仿 GANREF 左右雙欄 */
.detail-content-container {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  margin-top: 2.5rem;
  padding: 0 10px;
}

.detail-main-info {
  border-right: 1px solid #EEEEEE;
  padding-right: 3rem;
}

.detail-date {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: var(--color-accent);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.detail-title {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  color: #111111;
  letter-spacing: -0.5px;
}

.detail-desc-box {
  background-color: #FAFAFA;
  padding: 1.5rem 2rem;
  border-left: 3px solid #111111;
  font-size: 1.05rem;
  color: #333333;
  line-height: 1.8;
  white-space: pre-wrap; /* 支援日記換行 */
}

.detail-sidebar-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2rem;
}

.detail-meta-box {
  background: #FFFFFF;
  border: 1px solid #EEEEEE;
  padding: 1.5rem;
}

.meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1.2rem;
}

.meta-row:last-child {
  margin-bottom: 0;
}

.meta-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.meta-value {
  font-size: 0.95rem;
  color: #111111;
  font-weight: 600;
}

.detail-action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.detail-action-buttons .btn {
  border-radius: 2px;
  padding: 0.8rem;
  font-weight: 700;
}

.detail-action-buttons #detail-download-btn {
  background-color: #111111;
  color: #FFFFFF;
}

.detail-action-buttons #detail-download-btn:hover {
  background-color: #333333;
}

@media (max-width: 992px) {
  .detail-content-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .detail-main-info {
    border-right: none;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .owner-profile-container {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .owner-profile-section {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 0.75rem;
    order: -1;
    /* 小螢幕時 Profile 排在最上方 */
  }

  .owner-profile-container .btn-arrow {
    width: 100%;
    justify-content: center;
  }

  .back-number-months-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* 個人設定頁面樣式 - 仿 GANREF 極簡高雅風格 */
.settings-view {
  max-width: 800px;
  margin: 2rem auto 4rem;
  background: #FFFFFF;
  border: 1px solid #E5E5E5;
  padding: 3rem 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
  animation: fadeIn 0.3s ease-in-out;
}

.settings-header {
  border-bottom: 2px solid #111111;
  padding-bottom: 1rem;
  margin-bottom: 2.5rem;
}

.settings-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #111111;
  letter-spacing: -0.5px;
}

.settings-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.settings-card-body {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.settings-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #111111;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.settings-group input[type="text"],
.settings-group input[type="password"],
.settings-group textarea {
  border: 1px solid #CCCCCC;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: #111111;
  border-radius: 2px;
  transition: border-color 0.2s;
  background-color: #FAFAFA;
}

.settings-group input:focus,
.settings-group textarea:focus {
  border-color: #111111;
  background-color: #FFFFFF;
  outline: none;
}

.field-tip {
  font-size: 0.75rem;
  color: #888888;
  line-height: 1.4;
}

/* 大頭貼上傳區域 */
.avatar-settings {
  border-bottom: 1px dashed #EEEEEE;
  padding-bottom: 1.5rem;
}

.avatar-upload-wrapper {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 0.5rem;
}

.current-avatar-preview {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: #EEEEEE;
  border: 1px solid #DDDDDD;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #888888;
  overflow: hidden;
}

.current-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-upload-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.avatar-upload-inputs .btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  border-radius: 2px;
  font-weight: 700;
}

.upload-tip {
  font-size: 0.7rem;
  color: #999999;
}

/* 隱私設定開關 */
.is-public-settings {
  background-color: #FAFAFA;
  padding: 1.2rem;
  border: 1px solid #EEEEEE;
}

.toggle-switch-wrapper {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.toggle-switch-wrapper input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.toggle-switch-wrapper label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #333333;
  cursor: pointer;
  text-transform: none;
}

/* 密碼區塊 */
.settings-password-section {
  border-top: 1px solid #EEEEEE;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.password-sec-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 0.5rem;
  border-left: 3px solid var(--color-accent);
  padding-left: 0.5rem;
}

.settings-error {
  color: var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
}

.settings-footer-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.settings-footer-actions .btn {
  padding: 0.8rem 2rem;
  font-weight: 700;
  border-radius: 2px;
}

/* 不公開分享提示區塊 */
.private-view {
  max-width: 600px;
  margin: 6rem auto;
  text-align: center;
  padding: 4rem 2rem;
  border: 1px solid #E5E5E5;
  background-color: #FAFAFA;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.01);
  animation: fadeIn 0.3s ease-in-out;
}

.private-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.private-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}

.private-desc {
  font-size: 0.9rem;
  color: #666666;
  line-height: 1.7;
}