/* 基礎設定 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', 'Microsoft JhengHei', '微軟正黑體', 'PingFang TC', 'Helvetica Neue', Arial, sans-serif;
    background: #FFFFFF;
    min-height: 100vh;
    padding: 40px 20px 60px;
    color: #6B6B6B;
    font-weight: 400;
    letter-spacing: 0.2px;
    position: relative;
}

/* 手機版基礎調整 */
@media (max-width: 768px) {
    body {
        padding: 20px 12px 40px;
    }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* 區塊一：企劃與自我介紹合併區塊 */
.plan-intro-section {
    background: #FAF8F5;
    border-radius: 12px;
    padding: 40px;
    margin-top: 40px;
    margin-bottom: 50px;
    border: 1px solid #E5E1DB;
}

/* 膠囊導航 */
.tab-capsule {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    padding: 4px;
    background: #FFFFFF;
    border-radius: 50px;
    width: fit-content;
    border: 1px solid #E5E1DB;
}

.tab-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: #6B6B6B;
    font-size: 0.9em;
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.tab-btn:hover {
    background: #FAF8F5;
    color: #5A5A5A;
}

.tab-btn.active {
    background: #9A8B7A;
    color: #FFFFFF;
}

.tab-btn.active:hover {
    background: #8B7D6B;
}

/* 連結區塊 */
.links-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #E5E1DB;
}

.link-card {
    background: #FAF8F5;
    border: 1px solid #E5E1DB;
    border-radius: 12px;
    padding: 24px;
}

.link-card-title {
    color: #6B6B6B;
    font-size: 1em;
    font-weight: 500;
    margin: 0 0 16px 0;
    letter-spacing: 0.2px;
}

.link-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.link-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #E5E1DB;
    border-radius: 6px;
    background: #FFFFFF;
    color: #6B6B6B;
    font-size: 0.9em;
    font-family: inherit;
    transition: all 0.2s;
}

.link-input:focus {
    outline: none;
    border-color: #D4C9B8;
    background: #FAF8F5;
}

.link-input::placeholder {
    color: #9A8B7A;
}

.link-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.link-save-btn {
    background: #9A8B7A;
    color: #FFFFFF;
}

.link-save-btn:hover {
    background: #8B7D6B;
}

.link-open-btn {
    background: #D4C9B8;
    color: #6B6B6B;
}

.link-open-btn:hover:not(:disabled) {
    background: #C4B5A0;
    color: #5A5A5A;
}

.link-open-btn:disabled {
    background: #E5E1DB;
    color: #9A8B7A;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 自我介紹區塊 */
.intro-section {
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
}

.intro-section-title {
    color: #6B6B6B;
    font-size: 1.2em;
    font-weight: 500;
    margin: 0 0 24px 0;
    letter-spacing: 0.3px;
}

.intro-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.intro-card {
    background: #FAF8F5;
    border: 1px solid #E5E1DB;
    border-radius: 12px;
    padding: 24px;
}

.intro-card-title {
    color: #6B6B6B;
    font-size: 0.95em;
    font-weight: 500;
    margin: 0 0 16px 0;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.intro-input-box {
    width: 100%;
    cursor: pointer;
}

.intro-input-preview {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 1px solid #E5E1DB;
    border-radius: 6px;
    background: #FFFFFF;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
}

.intro-input-preview:hover {
    border-color: #D4C9B8;
    background: #FAF8F5;
}

.intro-placeholder {
    color: #9A8B7A;
    font-size: 0.9em;
}

.intro-content {
    color: #6B6B6B;
    font-size: 0.9em;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.intro-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 1px solid #E5E1DB;
    border-radius: 6px;
    font-size: 0.9em;
    font-family: inherit;
    background: #FFFFFF;
    color: #6B6B6B;
    resize: vertical;
    transition: all 0.2s;
    line-height: 1.7;
}

.intro-textarea:focus {
    outline: none;
    border-color: #D4C9B8;
    background: #FAF8F5;
}

/* 區塊二：30天日曆容器 - 七天一排 */
.calendar-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

/* 單天卡片 - 莫蘭迪色系 */
.day-card {
    background: #FAF8F5;
    border: 1px solid #E5E1DB;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    box-shadow: 0 1px 2px rgba(107, 107, 107, 0.08);
}

.day-card:hover {
    border-color: #C4B5A0;
    box-shadow: 0 2px 6px rgba(107, 107, 107, 0.12);
    transform: translateY(-1px);
}

.day-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #E5E1DB;
}

.day-card-title {
    color: #6B6B6B;
    font-size: 0.95em;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.2px;
}

.day-card-number {
    font-weight: 600;
    color: #9A8B7A;
}

.day-card-status {
    font-size: 0.7em;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.day-card-status[data-status="pending"] {
    background: #E8E3DC;
    color: #8B7D6B;
    border: none;
}

.day-card-status[data-status="approved"] {
    background: #5A6B4A;
    color: #FFFFFF;
    border: none;
}

.day-card-status[data-status="revision"] {
    background: #E5D5D0;
    color: #8B7D6B;
    border: none;
}

.day-card-content {
    flex: 1;
    margin-bottom: 16px;
}

.day-card-preview {
    color: #6B6B6B;
    font-size: 0.85em;
    line-height: 1.6;
}

.day-card-text {
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #8B7D6B;
    font-weight: 400;
}

.day-card-images {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.day-card-image {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #E5E1DB;
}

.day-card-footer {
    margin-top: auto;
    padding-top: 12px;
}

.day-card-edit-btn {
    width: 100%;
    background: #D4C9B8;
    color: #6B6B6B;
    border: none;
    padding: 8px 16px;
    font-size: 0.85em;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.day-card-edit-btn:hover {
    background: #C4B5A0;
    color: #5A5A5A;
}

/* 編輯彈窗（第二層） */
.edit-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.edit-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.edit-modal-content {
    background: #FFFFFF;
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.edit-modal-content .edit-section {
    margin: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
}

.day-title {
    color: #6B6B6B;
    font-size: 1.1em;
    font-weight: 400;
    font-family: 'Noto Sans TC', sans-serif;
    letter-spacing: 0.3px;
}

.day-number {
    font-weight: 600;
    color: #9A8B7A;
}

/* 載入動畫 */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    color: #6B6B6B;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #E5E1DB;
    border-top-color: #C4B5A0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 24px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 標題區 */
.header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 20px;
    background: transparent;
}

.header h1 {
    font-size: 2.2em;
    color: #6B6B6B;
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 1.3;
}

.subtitle {
    font-size: 0.9em;
    color: #9A8B7A;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 4px;
}

/* 手機版固定導航 */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-top: 1px solid #E5E1DB;
    padding: 12px 16px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    flex-direction: row;
    gap: 8px;
    justify-content: space-around;
    align-items: center;
}

.nav-btn {
    flex: 1;
    padding: 12px 16px;
    background: #FAF8F5;
    color: #6B6B6B;
    border: 1px solid #E5E1DB;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.nav-btn:hover {
    background: #E8E3DC;
    border-color: #C4B5A0;
    color: #5A5A5A;
}

.nav-btn.active {
    background: #9A8B7A;
    color: #FFFFFF;
    border-color: #9A8B7A;
}

.nav-btn.active:hover {
    background: #8B7D6B;
}

/* 每日發文內容區塊 */
.daily-section {
    margin-top: 0;
    padding: 0;
    scroll-margin-top: 20px;
}

/* 月份標籤頁導航 */
.month-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E5E1DB;
}

.month-tab-btn {
    padding: 12px 28px;
    background: transparent;
    color: #6B6B6B;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
    position: relative;
    margin-bottom: -20px;
}

.month-tab-btn:hover {
    color: #5A5A5A;
    background: #FAF8F5;
}

.month-tab-btn.active {
    color: #9A8B7A;
    border-bottom-color: #9A8B7A;
    font-weight: 600;
}

.month-section {
    margin-bottom: 0;
    display: none;
}

.month-section.active {
    display: block;
}

/* 編輯區塊 */
.edit-section {
    background: #FAF8F5;
    border-radius: 0;
    padding: 50px 40px;
    box-shadow: none;
    border: 1px solid #E5E1DB;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E5E1DB;
}

.section-header h2 {
    color: #6B6B6B;
    font-size: 1.3em;
    font-weight: 400;
    font-family: 'Noto Sans TC', sans-serif;
    letter-spacing: 0.5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.threads-preview-btn {
    background: transparent;
    color: #6B6B6B;
    border: 1px solid #D4C9B8;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.threads-preview-btn:hover {
    background: #E8E3DC;
    border-color: #C4B5A0;
    color: #5A5A5A;
}

.close-btn {
    background: transparent;
    color: #6B6B6B;
    border: 1px solid #E5E1DB;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #E8E3DC;
    border-color: #C4B5A0;
    color: #5A5A5A;
}

/* 表單群組 */
.form-group {
    margin-bottom: 35px;
}

.form-group label {
    display: block;
    margin-bottom: 12px;
    color: #6B6B6B;
    font-weight: 400;
    font-size: 0.9em;
    letter-spacing: 0.3px;
}

/* 輸入框預覽（點擊放大） */
.input-box {
    width: 100%;
    cursor: pointer;
}

.input-preview {
    width: 100%;
    min-height: 80px;
    padding: 20px;
    border: 1px solid #E5E1DB;
    border-radius: 6px;
    background: #FFFFFF;
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
}

.input-preview:hover {
    border-color: #D4C9B8;
    background: #FAF8F5;
}

.input-placeholder {
    color: #9A8B7A;
    font-size: 0.95em;
}

.input-content {
    color: #6B6B6B;
    font-size: 0.95em;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 文字輸入區（直接顯示） */
.content-textarea,
.feedback-textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #E5E1DB;
    border-radius: 6px;
    font-size: 16px; /* 避免 iOS 自動縮放 */
    font-family: inherit;
    background: #FFFFFF;
    color: #6B6B6B;
    resize: vertical;
    transition: all 0.2s;
    line-height: 1.6;
    min-height: 150px; /* 確保足夠的輸入空間 */
    -webkit-appearance: none; /* 移除 iOS 預設樣式 */
}

.content-textarea:focus,
.feedback-textarea:focus {
    outline: none;
    border-color: #D4C9B8;
    background: #FAF8F5;
    box-shadow: 0 0 0 3px rgba(212, 201, 184, 0.1); /* 添加 focus 視覺反饋 */
}

/* 放大輸入彈窗 */
.input-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.input-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-modal-content {
    background: #FFFFFF;
    border-radius: 12px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    margin: auto;
    border: 1px solid #E5E1DB;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.input-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    border-bottom: 1px solid #E5E1DB;
}

.input-modal-header h3 {
    color: #6B6B6B;
    font-size: 0.95em;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.3px;
}

.input-modal-body {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.input-modal-textarea {
    width: 100%;
    min-height: 400px;
    padding: 20px;
    border: 1px solid #E5E1DB;
    border-radius: 6px;
    font-size: 16px; /* 避免 iOS 自動縮放 */
    font-family: inherit;
    background: #FAF8F5;
    color: #6B6B6B;
    resize: vertical;
    transition: all 0.2s;
    line-height: 1.6; /* 改善可讀性 */
}

.input-modal-textarea:focus {
    outline: none;
    border-color: #D4C9B8;
    background: #FFFFFF;
}

.input-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 30px 40px;
    border-top: 1px solid #E5E1DB;
}

/* 照片上傳區 */
.photo-upload-area {
    position: relative;
    min-height: 200px;
    border: 1px dashed #E5E1DB;
    border-radius: 6px;
    background: #FFFFFF;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.photo-upload-area:hover {
    border-color: #D4C9B8;
    background: #FAF8F5;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    color: #9A8B7A;
}

.upload-placeholder span {
    font-size: 0.9em;
    margin-bottom: 12px;
    font-weight: 400;
    color: #9A8B7A;
    letter-spacing: 0.3px;
}

.photo-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.photo-preview-item {
    position: relative;
    width: 100%;
    padding-top: 100%;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #E5E1DB;
}

.photo-preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-item .remove-photo {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(107, 107, 107, 0.8);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 業主回饋區 */
.feedback-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #E5E1DB;
}

.feedback-section h3 {
    color: #6B6B6B;
    margin-bottom: 30px;
    font-size: 1.1em;
    font-weight: 400;
    font-family: 'Noto Sans TC', sans-serif;
    letter-spacing: 0.3px;
}

/* 審核狀態按鈕 */
.status-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.status-btn {
    flex: 1;
    min-width: 120px;
    padding: 14px 24px;
    border: 1px solid #E5E1DB;
    border-radius: 6px;
    background: #FFFFFF;
    color: #6B6B6B;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 400;
    letter-spacing: 0.2px;
}

.status-btn:hover {
    background: #FAF8F5;
    border-color: #D4C9B8;
    color: #5A5A5A;
}

.status-btn.active {
    background: #9A8B7A;
    color: #FFFFFF;
    border-color: #9A8B7A;
}

.status-btn[data-status="approved"].active {
    background: #5A6B4A;
    color: #FFFFFF;
    border-color: #5A6B4A;
}

.status-btn[data-status="approved"].active:hover {
    background: #4A5A3A;
    border-color: #4A5A3A;
}

/* 預覽按鈕容器 */
.preview-button-container {
    margin-top: 30px;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #E5E1DB;
}

/* 操作按鈕 */
.action-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #E5E1DB;
}

.btn {
    padding: 14px 32px;
    border: 1px solid #E5E1DB;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.btn-cancel {
    background: transparent;
    color: #6B6B6B;
    border-color: #E5E1DB;
}

.btn-cancel:hover {
    background: #FAF8F5;
    border-color: #D4C9B8;
    color: #5A5A5A;
}

.btn-save {
    background: #9A8B7A;
    color: #FFFFFF;
    border-color: #9A8B7A;
}

.btn-save:hover {
    background: #8B7D6B;
    border-color: #8B7D6B;
}

.btn-preview {
    background: transparent;
    color: #6B6B6B;
    border: 1px solid #E5E1DB;
    width: 100%;
    max-width: 240px;
}

.btn-preview:hover {
    background: #FAF8F5;
    border-color: #D4C9B8;
}

/* Threads 發文預覽區域（在編輯區塊內） */
.threads-preview-section {
    margin-top: 30px;
    margin-bottom: 30px;
    padding-top: 30px;
    border-top: 2px solid #DDC9BC;
}

.threads-preview-header {
    margin-bottom: 15px;
}

.threads-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 15px;
    background: #FFDC9F;
    border: 2px solid #DDC9BC;
    border-radius: 10px;
    color: #8E7C68;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.threads-toggle-btn:hover {
    background: #FFE8B8;
    border-color: #ED7458;
}

.threads-toggle-btn.active {
    background: #FFE8B8;
    border-color: #ED7458;
}

.toggle-icon {
    font-size: 0.8em;
    transition: transform 0.3s;
}

.threads-toggle-btn.active .toggle-icon {
    transform: rotate(180deg);
}

.threads-list-container {
    margin-top: 15px;
}

.threads-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Threads 卡片樣式（手機版） */
.threads-card {
    background: #FFFFFF;
    border-radius: 0;
    padding: 24px;
    box-shadow: none;
    border: 1px solid #E8E0D8;
    cursor: pointer;
    transition: all 0.3s;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.threads-card:hover {
    border-color: #DDC9BC;
    background: #FAF8F5;
}

.threads-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #EFEFEF;
}

.threads-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #9A8B7A 0%, #C4B5A0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-weight: 500;
    font-size: 1em;
    margin-right: 12px;
    flex-shrink: 0;
}

.threads-author {
    flex: 1;
}

.threads-author-name {
    font-weight: 600;
    color: #000000;
    font-size: 15px;
    margin-bottom: 2px;
    letter-spacing: 0;
}

.threads-time {
    font-size: 13px;
    color: #737373;
    font-weight: 400;
}

.threads-content {
    color: #5A4A3A;
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: 0.95em;
    white-space: pre-wrap;
    word-break: break-word;
    font-weight: 300;
}

.threads-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.threads-image-item {
    width: 100%;
    padding-top: 100%;
    position: relative;
    background: #F5F5F5;
    border-radius: 0;
    overflow: hidden;
}

.threads-image-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.threads-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 0;
    font-size: 0.75em;
    font-weight: 400;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid #E8E0D8;
}

.threads-status.pending {
    background: #FAF8F5;
    color: #8E7C68;
    border-color: #E8E0D8;
}

.threads-status.approved {
    background: #5A4A3A;
    color: #FFFFFF;
    border-color: #5A4A3A;
}

.threads-status.revision {
    background: #FAF8F5;
    color: #C9A88A;
    border-color: #DDC9BC;
}

/* Threads 詳情彈窗 */
.threads-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.threads-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 0;
    max-width: 420px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    margin: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 預覽彈窗（手機版樣式） */
#previewModal .modal-content {
    max-width: 420px;
    padding: 16px;
    border-radius: 16px;
    background: #FFFFFF;
}

#previewModal .threads-detail {
    padding: 0;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.threads-detail {
    margin-top: 20px;
}

.threads-detail .threads-card-header {
    margin-bottom: 16px;
}

.threads-detail .threads-content {
    margin-bottom: 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #000000;
    white-space: pre-wrap;
    word-break: break-word;
}

.threads-detail .threads-images {
    margin-bottom: 16px;
}

.threads-feedback {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #E8E0D8;
}

.threads-feedback-label {
    font-weight: 400;
    color: #5A4A3A;
    margin-bottom: 12px;
    font-size: 0.75em;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.threads-feedback-content {
    color: #5A4A3A;
    line-height: 1.7;
    font-size: 0.9em;
    white-space: pre-wrap;
    font-weight: 300;
}

/* 響應式設計 */
@media (max-width: 768px) {
    .threads-card {
        max-width: 100%;
    }
    
    .modal-content {
        max-width: 100%;
        margin: 10px;
        padding: 20px;
    }
}

/* 響應式設計 - 七天一排的調整 */
@media (max-width: 1200px) {
    .links-section {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    /* 月份標籤頁 */
    .month-tabs {
        margin-bottom: 24px;
        padding-bottom: 16px;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .month-tab-btn {
        padding: 10px 20px;
        font-size: 0.9em;
        white-space: nowrap;
        margin-bottom: -16px;
    }
    
    .month-section {
        margin-bottom: 0;
    }
    
    .calendar-container {
        grid-template-columns: repeat(7, 1fr);
        gap: 12px;
        padding: 0;
    }
    
    .day-card {
        padding: 14px;
        min-height: 140px;
    }
}

@media (max-width: 768px) {
    /* 手機版固定導航顯示 */
    .mobile-nav {
        display: flex;
    }
    
    /* 為固定導航預留底部空間 */
    body {
        padding-bottom: 80px;
    }
    
    /* 標題區 */
    .header {
        padding: 20px 12px;
        margin-bottom: 30px;
    }
    
    .header h1 {
        font-size: 1.6em;
    }
    
    .subtitle {
        font-size: 0.8em;
    }
    
    /* 企劃與自我介紹區塊 */
    .plan-intro-section {
        padding: 24px 16px;
        margin-top: 20px;
        margin-bottom: 30px;
    }
    
    /* 膠囊導航 */
    .tab-capsule {
        margin-bottom: 24px;
        padding: 3px;
    }
    
    .tab-btn {
        padding: 8px 18px;
        font-size: 0.85em;
    }
    
    /* 連結區塊 */
    .links-section {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 30px;
        padding-bottom: 30px;
    }
    
    .link-card {
        padding: 18px;
    }
    
    .link-input-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .link-input {
        width: 100%;
        margin-bottom: 12px;
        padding: 14px 16px; /* 增加觸控目標 */
        font-size: 16px; /* 避免 iOS 自動縮放 */
        min-height: 48px; /* 確保觸控目標足夠大 */
    }
    
    .link-btn {
        width: 100%;
        padding: 14px 16px; /* 增加觸控目標 */
        font-size: 16px; /* 確保文字清晰 */
        min-height: 48px; /* 確保觸控目標足夠大 */
        margin-bottom: 8px;
    }
    
    /* 自我介紹區塊 */
    .intro-section {
        margin-top: 0;
        margin-bottom: 0;
        padding: 0;
    }
    
    .intro-section-title {
        font-size: 1.1em;
        margin-bottom: 16px;
    }
    
    .intro-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .intro-card {
        padding: 18px;
    }
    
    .intro-input-preview {
        min-height: 120px; /* 增加觸控目標 */
        padding: 16px; /* 增加內邊距 */
        font-size: 16px; /* 避免 iOS 自動縮放 */
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(154, 139, 122, 0.1); /* iOS 觸控反饋 */
    }
    
    /* 日曆區塊 */
    /* 月份標籤頁 */
    .month-tabs {
        margin-bottom: 20px;
        padding-bottom: 12px;
        gap: 6px;
        overflow-x: auto;
    }
    
    .month-tab-btn {
        padding: 12px 20px; /* 增加觸控目標 */
        font-size: 15px; /* 確保文字清晰 */
        white-space: nowrap;
        margin-bottom: -12px;
        min-height: 44px; /* 確保觸控目標足夠大 */
        -webkit-tap-highlight-color: rgba(154, 139, 122, 0.1); /* iOS 觸控反饋 */
    }
    
    .month-section {
        margin-bottom: 0;
    }
    
    .calendar-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
        margin-top: 0;
        padding: 0;
    }
    
    .day-card {
        padding: 12px;
        min-height: 120px;
        border-radius: 10px;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(154, 139, 122, 0.1); /* iOS 觸控反饋 */
        touch-action: manipulation; /* 優化觸控響應 */
    }
    
    .day-card-title {
        font-size: 0.85em;
    }
    
    .day-card-text {
        font-size: 0.75em;
        -webkit-line-clamp: 2;
    }
    
    .day-card-image {
        width: 40px;
        height: 40px;
    }
    
    /* 編輯彈窗 */
    .edit-modal {
        padding: 0;
    }
    
    .edit-modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* iOS 流暢滾動 */
    }
    
    .edit-section {
        padding: 20px 16px;
        min-height: 100vh;
        padding-bottom: 100px; /* 為鍵盤和底部導航預留空間 */
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 24px;
        padding-bottom: 16px;
    }
    
    .section-header h2 {
        font-size: 1.1em;
        width: 100%;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .threads-preview-btn {
        flex: 1;
        padding: 12px 16px; /* 增加觸控目標 */
        font-size: 14px; /* 保持可讀性 */
        min-height: 44px; /* 確保觸控目標足夠大 */
    }
    
    .close-btn {
        padding: 12px 16px; /* 增加觸控目標 */
        font-size: 1.4em;
        min-width: 44px; /* 確保觸控目標足夠大 */
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 表單元素 */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 0.9em;
        margin-bottom: 10px;
    }
    
    .input-preview {
        padding: 16px; /* 增加觸控目標 */
        min-height: 100px; /* 增加最小高度 */
        font-size: 16px; /* 避免 iOS 自動縮放 */
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(154, 139, 122, 0.1); /* iOS 觸控反饋 */
    }
    
    .content-textarea,
    .feedback-textarea {
        padding: 16px; /* 增加觸控目標 */
        font-size: 16px; /* 避免 iOS 自動縮放 */
        min-height: 120px; /* 確保足夠的輸入空間 */
    }
    
    /* 照片上傳 */
    .photo-upload-area {
        padding: 16px;
    }
    
    .upload-placeholder {
        padding: 30px 20px;
    }
    
    .photo-preview-container {
        gap: 8px;
    }
    
    .photo-preview-item {
        width: calc(50% - 4px);
    }
    
    /* 狀態按鈕 */
    .status-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .status-btn {
        width: 100%;
        padding: 16px; /* 增加觸控目標 */
        font-size: 16px; /* 確保文字清晰 */
        min-height: 48px; /* 確保觸控目標足夠大 */
    }
    
    /* 操作按鈕 */
    .action-buttons {
        flex-direction: column;
        gap: 12px;
        margin-top: 30px;
        padding-bottom: 20px; /* 為底部導航預留空間 */
    }
    
    .btn {
        width: 100%;
        padding: 16px; /* 增加觸控目標 */
        font-size: 16px; /* 確保文字清晰 */
        min-height: 48px; /* 確保觸控目標足夠大 */
        -webkit-tap-highlight-color: rgba(154, 139, 122, 0.2); /* iOS 觸控反饋 */
    }
    
    /* 預覽按鈕 */
    .preview-button-container {
        margin-top: 20px;
    }
    
    .btn-preview {
        width: 100%;
    }
}

@media (max-width: 480px) {
    /* 超小螢幕優化 */
    body {
        padding: 16px 10px 30px;
    }
    
    .header {
        padding: 16px 10px;
        margin-bottom: 24px;
    }
    
    .header h1 {
        font-size: 1.4em;
    }
    
    .subtitle {
        font-size: 0.75em;
    }
    
    /* 企劃與自我介紹區塊 */
    .plan-intro-section {
        padding: 20px 12px;
        margin-top: 16px;
        margin-bottom: 24px;
    }
    
    /* 膠囊導航 */
    .tab-capsule {
        margin-bottom: 20px;
        padding: 2px;
    }
    
    .tab-btn {
        padding: 8px 16px;
        font-size: 0.8em;
    }
    
    /* 連結區塊 */
    .links-section {
        margin-bottom: 24px;
        padding-bottom: 24px;
    }
    
    .link-card {
        padding: 16px;
    }
    
    .link-card-title {
        font-size: 0.9em;
        margin-bottom: 12px;
    }
    
    /* 自我介紹 */
    .intro-section-title {
        font-size: 1em;
    }
    
    .intro-card {
        padding: 16px;
    }
    
    .intro-card-title {
        font-size: 0.85em;
    }
    
    .intro-input-preview {
        min-height: 110px; /* 增加觸控目標 */
        padding: 14px; /* 增加內邊距 */
        font-size: 16px; /* 避免 iOS 自動縮放 */
    }
    
    /* 月份區塊 */
    /* 月份標籤頁 */
    .month-tabs {
        margin-bottom: 16px;
        padding-bottom: 10px;
        gap: 4px;
        overflow-x: auto;
    }
    
    .month-tab-btn {
        padding: 8px 14px;
        font-size: 0.8em;
        white-space: nowrap;
        margin-bottom: -10px;
    }
    
    .month-section {
        margin-bottom: 0;
    }
    
    /* 日曆 */
    .calendar-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0;
    }
    
    .day-card {
        padding: 10px;
        min-height: 100px;
        border-radius: 8px;
    }
    
    .day-card-title {
        font-size: 0.8em;
    }
    
    .day-card-text {
        font-size: 0.7em;
        -webkit-line-clamp: 2;
    }
    
    .day-card-image {
        width: 32px;
        height: 32px;
    }
    
    /* 編輯區塊 */
    .edit-section {
        padding: 16px 12px;
    }
    
    .section-header h2 {
        font-size: 1em;
    }
    
    .threads-preview-btn {
        font-size: 0.75em;
        padding: 8px 12px;
    }
    
    .close-btn {
        padding: 8px 12px;
        font-size: 1.1em;
    }
    
    /* 輸入框 */
    .input-preview {
        padding: 10px;
        min-height: 70px;
    }
    
    .content-textarea,
    .feedback-textarea {
        padding: 14px; /* 增加觸控目標 */
        font-size: 16px; /* 避免 iOS 自動縮放 */
        min-height: 100px; /* 確保足夠的輸入空間 */
    }
    
    /* 照片上傳 */
    .photo-upload-area {
        padding: 12px;
    }
    
    .upload-placeholder {
        padding: 24px 16px;
        font-size: 0.9em;
    }
    
    .photo-preview-item {
        width: 100%;
    }
    
    /* 按鈕 */
    .status-btn {
        padding: 12px;
        font-size: 0.9em;
    }
    
    .btn {
        width: 100%;
        padding: 12px;
        font-size: 0.9em;
    }
    
    /* 彈窗 */
    .input-modal {
        padding: 10px;
    }
    
    .input-modal-content {
        width: 95%;
        max-width: 95%;
        margin: 10px auto;
    }
    
    .input-modal-header {
        padding: 16px;
    }
    
    .input-modal-header h3 {
        font-size: 1em;
    }
    
    .input-modal-body {
        padding: 16px;
    }
    
    .input-modal-textarea {
        padding: 16px; /* 增加觸控目標 */
        font-size: 16px; /* 避免 iOS 自動縮放 */
        min-height: 250px; /* 增加輸入空間 */
        line-height: 1.6; /* 改善可讀性 */
    }
    
    .input-modal-footer {
        padding: 16px; /* 增加內邊距 */
        gap: 12px;
    }
    
    .input-modal-footer .btn {
        min-height: 48px; /* 確保觸控目標足夠大 */
        font-size: 16px; /* 確保文字清晰 */
    }
    
    /* Threads 預覽 */
    .threads-modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 16px;
        border-radius: 12px;
    }
    
    .threads-card-header {
        padding: 12px 0;
    }
    
    .threads-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9em;
    }
    
    .threads-author-name {
        font-size: 0.9em;
    }
    
    .threads-time {
        font-size: 0.75em;
    }
    
    .threads-content {
        font-size: 0.9em;
        line-height: 1.6;
        padding: 12px 0;
    }
    
    .threads-images {
        gap: 6px;
        margin-top: 12px;
    }
}

