/*
  三色大地家居感
  ─────────────
  暖白 warm-white #fffefb  最上方（Header + Nav），尚未進入 STEP
  亞麻 linen     #faf7f2  暖白，像未漂白棉麻
  燕麥 oatmeal   #e8e0d4  沙色，自然材質感
  胡桃 walnut   #7a6b5a  暖棕，沉穩強調（按鈕、徽章、邊框）
*/
:root {
  --warm-white: #fffefb;
  --linen: #faf7f2;
  --oatmeal: #e8e0d4;
  --walnut: #7a6b5a;
  --walnut-text: #5c4e3d;
  --walnut-muted: #8a7a6a;
}

/* 全站基本設定 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* 錨點捲動時預留 sticky 導覽高度，避免內容被遮住 */
#stage-1,
#stage-2,
#stage-3 {
  scroll-margin-top: 100px;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--warm-white);
  color: var(--walnut-text);
  font-family: "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* 網站背景帶：全寬交錯色塊 */
.site-band {
  width: 100%;
  padding: 0;
}

.site-band-warm-white {
  background-color: var(--warm-white);
}

.site-band-white {
  background-color: var(--linen);
}

.site-band-beige {
  background-color: var(--oatmeal);
}

/* 頁面外框：控制最大寬度與置中 */
.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.site-band:first-child .page-wrapper {
  padding-top: 40px;
  padding-bottom: 28px;
}

.site-band:not(:first-child) .page-wrapper {
  padding-top: 28px;
}

.site-band:last-child .page-wrapper {
  padding-bottom: 80px;
}

/* 頁首與漢堡列：桌面版標題置中，手機版標題與漢堡並排 */
.header-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.btn-refresh {
  font-size: 0.8rem;
  padding: 6px 12px;
  white-space: nowrap;
}

.site-header {
  flex: 1;
  text-align: center;
  margin-bottom: 0;
}

.site-title {
  margin: 0 0 8px;
  font-size: 2.4rem;
  letter-spacing: 0.12em;
}

.site-subtitle {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--walnut-muted);
}

/* 漢堡按鈕：桌面版隱藏，手機版顯示 */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(122, 107, 90, 0.3);
  border-radius: 8px;
  background: rgba(250, 247, 242, 0.9);
  cursor: pointer;
  transition: background 0.2s ease;
}

.nav-hamburger:hover {
  background: rgba(232, 224, 212, 0.95);
}

.nav-hamburger-bar {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--walnut);
  border-radius: 1px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* 漢堡展開時：中間線隱藏，上下線旋轉成 X */
.nav-hamburger.is-open .nav-hamburger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-open .nav-hamburger-bar:nth-child(2) {
  opacity: 0;
}

.nav-hamburger.is-open .nav-hamburger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 導覽膠囊按鈕區：sticky 固定，捲動時可隨時切換階段 */
.step-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  padding: 12px 0;
  flex-wrap: wrap;
  background: rgba(255, 254, 251, 0.95);
  backdrop-filter: blur(10px);
}

.step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(122, 107, 90, 0.25);
  background-color: rgba(250, 247, 242, 0.8);
  color: var(--walnut-text);
  font-size: 0.9rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.step-pill:hover {
  background-color: rgba(250, 247, 242, 0.98);
  box-shadow: 0 4px 10px rgba(122, 107, 90, 0.1);
}

.step-active {
  background-color: var(--oatmeal);
  border-color: rgba(122, 107, 90, 0.4);
  color: var(--walnut-text);
  box-shadow: 0 4px 12px rgba(122, 107, 90, 0.12);
}

/* 通用階段卡片區塊外觀 */
.stage-block {
  position: relative;
  margin-bottom: 28px;
  padding: 28px 24px 24px;
  border-radius: 18px;
  border: 1px solid rgba(122, 107, 90, 0.2);
  box-shadow: 0 8px 24px rgba(122, 107, 90, 0.08);
  overflow: hidden;
}

/* 格子與背景帶相反 */
.stage-block-1,
.stage-block-3 {
  background-color: var(--oatmeal);
}

.stage-block-2 {
  background-color: var(--linen);
}

/* 階段上方標籤帶：橫向條，內含徽章與文字 */
.stage-banner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px;
  margin-bottom: 18px;
  border-radius: 999px;
  background-color: rgba(250, 247, 242, 0.9);
  border: 1px solid rgba(122, 107, 90, 0.2);
  backdrop-filter: blur(4px);
}

.stage-badge {
  padding: 2px 10px;
  border-radius: 999px;
  background-color: var(--walnut);
  color: var(--linen);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stage-banner-text {
  font-size: 0.85rem;
  color: var(--walnut-text);
}

/* 階段內容排版 */
.stage-content {
  margin-top: 2px;
}

.stage-title {
  margin: 0 0 10px;
  font-size: 1.3rem;
  color: var(--walnut-text);
}

.stage-text {
  margin: 0 0 16px;
  font-size: 0.95rem;
}

/* 清單樣式：讓條列看起來更像手寫筆記整理 */
.stage-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.95rem;
}

.stage-list li {
  margin-bottom: 6px;
}

/* 有序清單額外微調，讓數字更清楚 */
.stage-list-ordered {
  padding-left: 22px;
}

/* STEP 3：庫存、已發佈、靈感區、我有問題區 */
.stage-title-spaced {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 2px solid rgba(122, 107, 90, 0.25);
}

.stage-3-stock-published,
.stage-3-inspiration {
  margin-bottom: 8px;
}

.stage-3-row {
  display: flex;
  gap: 24px;
  margin: 16px 0;
  flex-wrap: wrap;
}

.stage-3-half {
  flex: 1;
  min-width: 280px;
}

.section-hint-small {
  margin: -4px 0 8px;
  font-size: 0.8rem;
  color: var(--walnut-muted);
}

.stage-3-stock-published .stage-3-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
}

.stage-3-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: rgba(250, 247, 242, 0.9);
  border-radius: 6px;
  border-left: 3px solid var(--walnut);
  font-size: 0.9rem;
}

.stage-3-list li .stage-3-move-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 0.75rem;
  border: 1px solid rgba(122, 107, 90, 0.4);
  border-radius: 6px;
  background: rgba(250, 247, 242, 0.98);
  color: var(--walnut-text);
  cursor: pointer;
  min-height: 36px;
  transition: background 0.2s ease;
}

.stage-3-list li .stage-3-move-btn:hover {
  background: rgba(232, 224, 212, 0.95);
}

.stage-3-list li .stage-3-item-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.stage-3-list li .stage-3-item-text:hover {
  text-decoration: underline;
}

.stage-3-list .list-placeholder {
  color: var(--walnut-muted);
  font-style: italic;
  border-left-color: transparent;
}

.stage-3-draggable-item {
  cursor: pointer;
}

.stage-3-draggable-item:active {
  cursor: grabbing;
}

.stage-3-draggable-item.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.stage-3-list.drag-over {
  background: rgba(122, 107, 90, 0.1);
  border-radius: 6px;
  min-height: 60px;
  border: 2px dashed rgba(122, 107, 90, 0.3);
}

.inspiration-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
}

.inspiration-card {
  padding: 12px 14px;
  background: rgba(250, 247, 242, 0.95);
  border-radius: 8px;
  border: 1px solid rgba(122, 107, 90, 0.2);
  cursor: pointer;
  transition: box-shadow 0.2s;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.inspiration-card:hover {
  box-shadow: 0 4px 12px rgba(122, 107, 90, 0.1);
}

.inspiration-card-status {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 4px;
}

.inspiration-card-status.draft { background: rgba(122, 107, 90, 0.4); }
.inspiration-card-status.reviewing { background: rgba(122, 107, 90, 0.65); }
.inspiration-card-status.approved { background: var(--walnut); }

.inspiration-card-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.stage-3-question-form {
  margin: 24px 0;
  padding: 24px;
  background: rgba(250, 247, 242, 0.95);
  border-radius: 12px;
  border: 1px solid rgba(122, 107, 90, 0.25);
  box-shadow: 0 2px 12px rgba(122, 107, 90, 0.06);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.photo-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 60px;
}

.photo-preview-item {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(122, 107, 90, 0.25);
}

.stage-3-questions-list {
  margin-top: 24px;
}

.question-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-card {
  padding: 14px 16px;
  background: rgba(250, 247, 242, 0.95);
  border-radius: 8px;
  border: 1px solid rgba(122, 107, 90, 0.2);
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.question-card:hover {
  box-shadow: 0 4px 12px rgba(122, 107, 90, 0.1);
}

.question-card-title {
  font-weight: 600;
  margin-bottom: 6px;
}

.question-card-preview {
  font-size: 0.85rem;
  color: var(--walnut-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspiration-detail-status,
.question-detail-title {
  font-weight: 600;
  margin-bottom: 12px;
}

.inspiration-detail-content,
.question-detail-content {
  padding: 12px;
  background: rgba(232, 224, 212, 0.5);
  border-radius: 6px;
  margin-bottom: 16px;
  white-space: pre-wrap;
}

.question-detail-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.question-detail-photos img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

/* STEP 2：30 日發文系統版面 */
.stage-2-layout {
  display: flex;
  gap: 28px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed rgba(122, 107, 90, 0.3);
}

.stage-2-calendar {
  flex-shrink: 0;
  width: 200px;
}

.calendar-label {
  margin-bottom: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--walnut-muted);
}

.calendar-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.calendar-day {
  display: flex;
  align-items: center;
  gap: 5px;
}

.calendar-day-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(122, 107, 90, 0.3);
  background-color: rgba(250, 247, 242, 0.95);
  color: var(--walnut-text);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
}

.calendar-day-btn:hover {
  background-color: rgba(250, 247, 242, 1);
  border-color: rgba(122, 107, 90, 0.5);
  transform: scale(1.05);
}

.calendar-day-btn.is-active {
  background-color: var(--walnut);
  border-color: var(--walnut);
  color: var(--linen);
}

.calendar-day-dots {
  display: flex;
  gap: 3px;
  margin-left: 4px;
}

.calendar-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: rgba(122, 107, 90, 0.3);
  transition: background-color 0.2s;
}

.calendar-dot.has-rose {
  background-color: rgba(122, 107, 90, 0.6);
}

.calendar-dot.has-jane {
  background-color: var(--walnut);
}

.stage-2-editor {
  flex: 1;
  min-width: 0;
}

.stage-2-day-title {
  margin: 0 0 16px;
  font-size: 1.15rem;
  color: var(--walnut-text);
}

.stage-2-editor .field-label {
  margin-top: 12px;
}

.stage-2-editor .field-label:first-of-type {
  margin-top: 0;
}

.stage-2-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* Jane 建議 & 最終定稿：左右並排 */
.stage-2-jane-final {
  display: flex;
  gap: 20px;
  margin-top: 16px;
}

.stage-2-jane-col {
  flex: 1;
  min-width: 0;
}

.stage-2-final-col {
  flex: 1;
  min-width: 0;
}

.btn-small {
  padding: 6px 12px;
  font-size: 0.8rem;
  margin-top: 10px;
}

/* Threads 貼文預覽：模擬 Threads 介面 */
.threads-preview {
  padding: 16px;
  border-radius: 16px;
  background-color: var(--linen);
  border: 1px solid rgba(122, 107, 90, 0.15);
  box-shadow: 0 2px 12px rgba(122, 107, 90, 0.08);
  min-height: 140px;
}

.threads-preview-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.threads-preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--walnut);
}

.threads-preview-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.threads-preview-username {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--walnut-text);
}

.threads-preview-time {
  font-size: 0.85rem;
  color: var(--walnut-muted);
}

.threads-preview-body {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--walnut-text);
  white-space: pre-wrap;
  word-break: break-word;
}

.threads-preview-placeholder {
  margin: 0;
  color: var(--walnut-muted);
  font-size: 0.9rem;
}

.threads-preview-actions {
  display: flex;
  gap: 20px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(122, 107, 90, 0.12);
}

.threads-preview-icon {
  font-size: 0.8rem;
  color: var(--walnut-muted);
}

.threads-preview-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(122, 107, 90, 0.2);
}

@media (max-width: 768px) {
  .stage-2-jane-final {
    flex-direction: column;
  }
}

/* STEP 1 內部功能區塊：共同外觀 */
.stage-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed rgba(122, 107, 90, 0.3);
}

.stage-section:first-of-type {
  margin-top: 8px;
}

.section-title {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--walnut-text);
}

.section-hint {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--walnut-muted);
}

/* 兩欄版面：左重右輕 */
.section-layout {
  display: flex;
  gap: 18px;
}

.section-layout-two-column {
  align-items: stretch;
}

.section-column {
  min-width: 0;
}

.section-column-main {
  flex: 3;
}

.section-column-preview {
  flex: 2;
}

/* 若需要右側更窄，可加上此類別 */
.section-layout-narrow-right .section-column-main {
  flex: 3.5;
}

.section-layout-narrow-right .section-column-preview {
  flex: 1.5;
}

/* 自我介紹與 30日企劃同一排：左自我介紹、右企劃，兩張卡片 */
.section-row-two {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed rgba(122, 107, 90, 0.3);
}

.section-row-two .stage-section-half {
  flex: 1;
  min-width: 0;
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  padding: 22px 20px 20px;
  border-radius: 14px;
  border: 1px solid rgba(122, 107, 90, 0.2);
  background-color: rgba(250, 247, 242, 0.98);
  box-shadow: 0 4px 16px rgba(122, 107, 90, 0.08);
}

.section-row-two .stage-section-half:first-of-type {
  margin-top: 0;
}

/* 輸入欄位樣式（input / textarea 共用） */
.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--walnut-muted);
}

.field-input,
.field-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(122, 107, 90, 0.3);
  background-color: var(--linen);
  color: var(--walnut-text);
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field-textarea {
  resize: vertical;
  min-height: 180px;
}

.field-input::placeholder,
.field-textarea::placeholder {
  color: var(--walnut-muted);
}

.field-input:focus,
.field-textarea:focus {
  border-color: var(--walnut);
  box-shadow: 0 0 0 2px rgba(122, 107, 90, 0.2);
  background-color: var(--linen);
}

/* 按鈕列與按鈕樣式 */
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

button {
  font-family: inherit;
}

.btn-primary,
.btn-ghost {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-width: 1px;
  border-style: solid;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease,
    border-color 0.2s ease, transform 0.08s ease;
}

.btn-primary {
  background-color: var(--walnut);
  border-color: var(--walnut);
  color: var(--linen);
}

.btn-primary:hover {
  background-color: #6a5d4e;
  border-color: #6a5d4e;
  box-shadow: 0 4px 12px rgba(122, 107, 90, 0.25);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: rgba(250, 247, 242, 0.9);
  border-color: rgba(122, 107, 90, 0.35);
  color: var(--walnut-text);
}

.btn-ghost:hover {
  background-color: var(--oatmeal);
  box-shadow: 0 4px 10px rgba(122, 107, 90, 0.12);
  transform: translateY(-1px);
}

/* 預覽區樣式：像另一頁較小的筆記 */
.preview-label {
  margin-bottom: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--walnut-muted);
}

.preview-label-small {
  margin-top: 14px;
  font-size: 0.75rem;
}

.preview-box {
  min-height: 140px;
  padding: 12px 12px 10px;
  border-radius: 12px;
  border: 1px solid rgba(122, 107, 90, 0.25);
  background-color: rgba(250, 247, 242, 0.98);
  color: var(--walnut-text);
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap; /* 保留換行，像真正的筆記 */
}

.preview-box-compact {
  min-height: 80px;
}

.preview-placeholder {
  margin: 0;
  color: var(--walnut-muted);
  font-size: 0.9rem;
}

.preview-link {
  color: var(--walnut-text);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
  font-size: 0.85rem;
}

.preview-link:hover {
  text-decoration: underline;
}

/* 可點擊放大編輯的輸入欄位 */
.field-input.expandable,
.field-textarea.expandable {
  cursor: pointer;
}

/* 放大編輯彈窗 */
.expand-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.expand-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.expand-modal-backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(122, 107, 90, 0.25);
  cursor: pointer;
}

.expand-modal-box {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  border: 1px solid rgba(122, 107, 90, 0.2);
  background-color: var(--linen);
  box-shadow: 0 20px 50px rgba(122, 107, 90, 0.15);
}

.expand-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(122, 107, 90, 0.2);
}

.expand-modal-title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--walnut-text);
}

.expand-modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--walnut-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.expand-modal-close:hover {
  background-color: rgba(122, 107, 90, 0.12);
  color: var(--walnut-text);
}

.expand-modal-body {
  flex: 1;
  min-height: 0;
  padding: 16px 20px;
}

.item-edit-body .field-label {
  margin-top: 12px;
  margin-bottom: 4px;
}

.item-edit-body .field-label:first-of-type {
  margin-top: 0;
}

.expand-modal-textarea {
  width: 100%;
  height: 320px;
  min-height: 200px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(122, 107, 90, 0.3);
  background-color: var(--linen);
  color: var(--walnut-text);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.expand-modal-textarea:focus {
  border-color: var(--walnut);
  box-shadow: 0 0 0 2px rgba(122, 107, 90, 0.2);
}

.expand-modal-footer {
  padding: 14px 20px 18px;
  border-top: 1px solid rgba(122, 107, 90, 0.2);
}

/* 儲存成功提示 */
.saved-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 20px;
  border-radius: 999px;
  background-color: var(--walnut);
  color: var(--linen);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  z-index: 999;
}

.saved-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* RWD：手機與小螢幕調整間距與字級與欄位排列 */
@media (max-width: 768px) {
  .page-wrapper {
    margin: 24px auto 60px;
    padding: 0 18px;
  }

  /* 漢堡選單容器 */
  .header-nav-wrap {
    position: relative;
  }

  /* 漢堡選單：手機版顯示 */
  .nav-hamburger {
    display: flex;
    flex-shrink: 0;
  }

  /* 手機版標題靠左，漢堡靠右 */
  .site-header {
    text-align: left;
  }

  .site-title {
    font-size: 2rem;
  }

  .site-subtitle {
    font-size: 0.9rem;
  }

  /* 導覽：手機版預設隱藏，點漢堡後展開 */
  .step-nav {
    display: none;
    flex-direction: column;
    margin-top: 0;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(122, 107, 90, 0.15);
    border-radius: 12px;
    background: rgba(255, 254, 251, 0.98);
    border: 1px solid rgba(122, 107, 90, 0.2);
  }

  .step-nav.is-open {
    display: flex;
  }

  .step-nav .step-pill {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
    min-height: 44px;
  }

  .stage-block {
    padding: 22px 18px 20px;
  }

  .stage-title {
    font-size: 1.15rem;
  }

  .stage-text,
  .stage-list {
    font-size: 0.9rem;
  }

  .section-layout {
    flex-direction: column;
  }

  .section-row-two {
    flex-direction: column;
  }

  .stage-2-layout {
    flex-direction: column;
  }

  .stage-2-calendar {
    width: 100%;
  }

  /* 日曆：手機版縮小間距，讓 30 格更緊湊 */
  .calendar-grid {
    gap: 8px 10px;
  }

  .calendar-day-btn {
    width: 26px;
    height: 26px;
    font-size: 0.7rem;
  }

  .calendar-dot {
    width: 5px;
    height: 5px;
  }

  /* 編輯區按鈕：手機版可換行、加大點擊區 */
  .stage-2-actions {
    gap: 8px;
  }

  .stage-2-actions .btn-primary,
  .stage-2-actions .btn-ghost {
    min-height: 44px;
    padding: 10px 16px;
  }

  /* STEP 3：庫存／發布／靈感／提問區，手機版改為單欄堆疊 */
  .stage-3-row {
    flex-direction: column;
    gap: 16px;
  }

  .stage-3-half {
    min-width: 0;
    flex: 1 1 100%;
  }

  .stage-3-stock-published .stage-3-list {
    max-height: 160px;
  }

  .stage-3-question-form {
    padding: 18px;
  }

  .photo-preview-item {
    width: 64px;
    height: 64px;
  }

  .preview-box {
    min-height: 100px;
  }

  /* 彈窗：手機版減少邊距、適應小螢幕 */
  .expand-modal {
    padding: 12px;
  }

  .expand-modal-box {
    max-width: 100%;
    max-height: 90vh;
  }

  .expand-modal-body {
    padding: 12px 16px;
  }

  .expand-modal-textarea {
    height: 240px;
    min-height: 160px;
  }
}

/* 超小螢幕（約 360px 以下）：進一步壓縮 */
@media (max-width: 400px) {
  .page-wrapper {
    padding: 0 14px;
  }

  .site-title {
    font-size: 1.6rem;
  }

  .site-subtitle {
    font-size: 0.8rem;
  }

  .stage-block {
    padding: 18px 14px 18px;
  }

  .calendar-grid {
    gap: 6px 8px;
  }

  .calendar-day-btn {
    width: 24px;
    height: 24px;
    font-size: 0.65rem;
  }

  .stage-2-actions .btn-primary,
  .stage-2-actions .btn-ghost {
    width: 100%;
  }
}


