        @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@400;500;600;700;800;900&family=Noto+Serif+TC:wght@600;700;800&display=swap');

        /* -------------------------------------------------------------
           【全站核心變數：全亮色馬卡龍主題設定】
           ------------------------------------------------------------- */
        :root {
            /* 共用設計系統：先定義用途，再由各頁主題套用品牌色。 */
            --surface-page: #F7F6F3;
            --surface-card: #FFFFFF;
            --text-primary: #303238;
            --text-main: var(--text-primary);
            --text-secondary: #60646E;
            --text-muted: #686B72;
            --border-default: #E2DED8;
            --focus-ring: #5C96E2;
            --focus-ring-soft: rgba(92, 150, 226, 0.35);

            --page-home-bg: #F6F3EF;
            --page-decor-bg: #F4F6F2;
            --page-rp-bg: #F4F0F5;
            --page-event-bg: #F3F6F9;

            --radius-control: 8px;
            --radius-panel: 10px;
            --radius-card: 16px;
            --radius-pill: 999px;
            --shadow-modal: 0 20px 60px rgba(35, 37, 41, 0.14);

            /* RWD 規格：平板 992px、緊湊版 768px、手機 576px。 */

            /* 未套用頁面主題時的安全預設值。 */
            --theme-page-bg: var(--surface-page);
            --theme-card: var(--surface-card);
            --theme-text: var(--text-primary);
            --theme-border: var(--border-default);
            --accent: #C98E82;

            /* 1. 房屋裝潢（暖米白 & 鼠尾草綠） */
            --decor-bg: var(--surface-page);
            --decor-card: var(--surface-card);
            --decor-text: var(--text-primary);
            --decor-pink: #C98E82;
            --decor-border: var(--border-default);
            --decor-green: #86A58D;
            --decor-green-dark: #587260;
            --decor-green-soft: #EEF4EF;
            --decor-green-border: #CBD9CE;

            /* 2. RP店面（粉霧薰衣草紫 & 馬卡龍紫） */
            --rp-bg: var(--surface-page);
            --rp-card: var(--surface-card);
            --rp-text: var(--text-primary);
            --rp-purple: #826A88;
            --rp-border: var(--border-default);

            /* 3. 活動舉辦（霧藍背景 & 夜空藍主色） */
            --event-bg: var(--page-event-bg);
            --event-card: var(--surface-card);
            --event-text: var(--text-primary);
            --event-orange: #4F6F91;
            --event-border: #DCE3EA;

            /* 共通狀態顏色 */
            --status-open: #89C391;    
            --status-closed: #8E929D;  
            --status-waiting: #E29B5C; 
            --accent-green: #AEC3B0;

            /* 字體分工：內文保持清楚，標題改用較具刊物感的明體。 */
            --font-body: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
            --font-display: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
        }

        /* 優化 1：解決畫面抖動，改用現代響應式標準，不強制顯示捲軸軌道 */
        html {
            scrollbar-gutter: stable;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        .skip-link {
            position: fixed;
            top: 12px;
            left: 12px;
            z-index: 2000;
            padding: 10px 14px;
            border: 2px solid var(--focus-ring);
            border-radius: var(--radius-control);
            background: #FFFFFF;
            color: var(--text-primary);
            font-weight: 800;
            text-decoration: none;
            transform: translateY(calc(-100% - 24px));
            transition: transform 0.18s ease;
        }

        .skip-link:focus-visible {
            transform: translateY(0);
            outline: 3px solid var(--focus-ring-soft);
            outline-offset: 2px;
        }

        #browseView,
        #detailView,
        #managementView {
            scroll-margin-top: 92px;
        }

        /* 優化 2：補齊 Linux 與 Android 共通字型標準，確保跨平台一致性 */
        body {
            background-color: var(--theme-page-bg);
            color: var(--theme-text);
            font-family: var(--font-body);
            -webkit-font-smoothing: antialiased;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            padding-bottom: 0;
            transition: background-color 0.4s cubic-bezier(0.25, 1, 0.5, 1), color 0.4s ease;
        }

        main { flex: 1 0 auto; width: 100%; }

        /* -------------------------
            固定式導覽列 Navigation
           ------------------------- */
        .navbar {
            position: sticky;
            top: 0;
            z-index: 100;
            background-color: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(8px);
            width: 100%;
            padding: 0;
            display: block;
            box-sizing: border-box;
            border-bottom: 1px solid rgba(0, 0, 0, 0.03);
            transition: background-color 0.4s ease, border-color 0.4s ease;
        }

        .navbar-inner {
            width: 100%;
            max-width: 1232px;
            min-height: 84px;
            margin: 0 auto;
            padding: 20px 24px;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
            align-items: center;
            box-sizing: border-box;
        }

        .brand-logo {
            display: flex;
            align-items: center;
            min-width: 170px;
            gap: 10px;
            justify-self: start;
            cursor: pointer;
            border: 0;
            background: transparent;
            color: inherit;
            font: inherit;
        }

        .logo-icon {
            width: 42px;
            height: 46px;
            background-color: transparent !important;
            border-radius: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #33363F;
            font-weight: bold;
            border: 0 !important;
            box-shadow: none !important;
            transition: transform 0.2s ease;
        }

        .brand-logo:hover .logo-icon {
            transform: translateY(-1px);
        }

        .logo-icon svg { display: block; width: 42px; height: 46px; overflow: visible; }
        .logo-icon img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: normal; border: 0; box-shadow: none; transform-origin: center; }
        .logo-home { display: none !important; transform: scale(1.35); }
        .logo-section { transform: scale(1.7); }
        body:not(.theme-home) .navbar .logo-icon { overflow: hidden; }

        .logo-title {
            font-size: 18px;
            font-weight: 700;
            letter-spacing: -0.5px;
            transition: color 0.4s ease;
        }

        .site-footer {
            flex: 0 0 auto;
            margin-top: auto;
            padding: 20px 24px 28px;
            color: var(--text-muted);
            font-size: 11px;
            letter-spacing: 0.04em;
            text-align: center;
        }

        .nav-menu {
            display: flex;
            gap: 8px;
            justify-self: center;
        }

        .nav-item {
            padding: 10px 18px;
            border-radius: 24px;
            font-size: 14px;
            font-weight: 600;
            text-decoration: none;
            color: inherit;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: background-color 0.2s, color 0.2s;
            border: 0;
            background: transparent;
            cursor: pointer;
            font-family: inherit;
        }

        .nav-item svg {
            transition: stroke 0.2s ease, fill 0.2s ease;
        }

        .nav-item.active {
            box-shadow: 0 4px 10px rgba(0,0,0,0.03);
        }

        /* 會員登入 */
        .auth-area {
            position: relative;
            justify-self: end;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-login {
            background-color: var(--decor-pink);
            color: #303238;
            border: none;
            padding: 10px 24px;
            font-size: 14px;
            font-weight: 600;
            border-radius: 24px;
            cursor: pointer;
            transition: transform 0.1s, opacity 0.2s, background-color 0.4s, color 0.4s;
        }

        .btn-login:hover {
            opacity: 0.9;
            transform: scale(1.02);
        }

        /* 已登入頭像 */
        .user-profile-trigger {
            position: relative;
            display: none;
            align-items: center;
            cursor: pointer;
            border: none;
            background: none;
            outline: none;
        }

        .user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--accent-green);
            border: 2px solid #FFFFFF;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: #FFFFFF;
            font-size: 14px;
            overflow: hidden;
        }
        .user-avatar img { width: 100%; height: 100%; object-fit: cover; }

        .profile-dropdown {
            display: none;
            position: absolute;
            top: 50px;
            right: 0;
            background-color: #FFFFFF;
            border-radius: 16px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
            border: 1px solid var(--decor-border);
            width: 180px;
            padding: 8px;
            z-index: 101;
        }

        .profile-dropdown.show {
            display: block;
        }

        .notification-badge {
            position: absolute;
            top: -3px;
            right: -3px;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 2px solid #FFFFFF;
            border-radius: 999px;
            background: #C95757;
            color: #FFFFFF;
            font-size: 10px;
            font-weight: 800;
            line-height: 1;
        }

        .notification-menu-count {
            min-width: 22px;
            margin-left: auto;
            padding: 2px 7px;
            border-radius: 999px;
            background: #C95757;
            color: #FFFFFF;
            font-size: 10px;
            font-weight: 800;
            line-height: 1.5;
            text-align: center;
        }

        .notification-panel {
            display: none;
            position: absolute;
            top: 50px;
            right: 0;
            z-index: 102;
            width: min(360px, calc(100vw - 32px));
            max-height: min(520px, calc(100vh - 92px));
            overflow: hidden;
            border: 1px solid var(--theme-border);
            border-radius: 16px;
            background: #FFFFFF;
            color: var(--text-primary);
            box-shadow: 0 16px 42px rgba(32,34,38,.14);
        }

        .notification-panel.show {
            display: flex;
            flex-direction: column;
        }

        .notification-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 16px;
            padding: 16px 18px 12px;
            border-bottom: 1px solid var(--border-default);
        }

        .notification-panel-header h2 {
            font-size: 16px;
            font-weight: 850;
        }

        .notification-mark-all {
            border: 0;
            background: transparent;
            color: var(--text-secondary);
            font: inherit;
            font-size: 11.5px;
            font-weight: 750;
            cursor: pointer;
        }

        .notification-mark-all:hover {
            color: var(--text-primary);
        }

        .notification-panel-footer {
            display: flex;
            justify-content: flex-end;
            padding: 8px 12px;
            border-top: 1px solid var(--border-default);
        }

        .notification-panel-footer[hidden] {
            display: none;
        }

        .notification-clear-read {
            min-height: 36px;
            padding: 7px 9px;
            border: 0;
            border-radius: 8px;
            background: transparent;
            color: var(--text-secondary);
            font: inherit;
            font-size: 11.5px;
            font-weight: 750;
            cursor: pointer;
        }

        .notification-clear-read:hover {
            background: var(--surface-page);
            color: var(--text-primary);
        }

        .notification-list {
            overflow-y: auto;
            padding: 6px;
        }

        .notification-item {
            width: 100%;
            display: grid;
            grid-template-columns: 34px minmax(0, 1fr) auto auto;
            gap: 10px;
            align-items: start;
            padding: 12px;
            border: 0;
            border-radius: 11px;
            background: transparent;
            color: inherit;
            font: inherit;
            text-align: left;
            cursor: pointer;
        }

        .notification-item:hover {
            background: var(--surface-page);
        }

        .notification-item.is-unread {
            background: color-mix(in srgb, var(--accent) 9%, #FFFFFF);
        }

        .notification-item-icon {
            width: 34px;
            height: 34px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: color-mix(in srgb, var(--accent) 15%, #FFFFFF);
            color: var(--accent);
        }

        .notification-item-copy {
            min-width: 0;
        }

        .notification-item-copy strong,
        .notification-item-copy span,
        .notification-item-copy small {
            display: block;
        }

        .notification-item-copy strong {
            margin-bottom: 2px;
            overflow: hidden;
            font-size: 12.5px;
            font-weight: 800;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .notification-item-copy span {
            color: var(--text-secondary);
            font-size: 12px;
            line-height: 1.5;
        }

        .notification-item-copy small {
            margin-top: 5px;
            color: var(--text-muted);
            font-size: 10.5px;
        }

        .notification-unread-dot {
            width: 7px;
            height: 7px;
            margin-top: 6px;
            border-radius: 50%;
            background: var(--accent);
        }

        .notification-delete {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            margin-top: 1px;
            border-radius: 7px;
            color: var(--text-muted);
            cursor: pointer;
            opacity: .35;
            transition: background .15s ease, color .15s ease, opacity .15s ease;
        }

        .notification-item:hover .notification-delete,
        .notification-delete:focus-visible {
            opacity: 1;
        }

        .notification-delete:hover,
        .notification-delete:focus-visible {
            background: color-mix(in srgb, var(--danger, #C66A6A) 12%, transparent);
            color: var(--danger, #C66A6A);
            outline: none;
        }

        .notification-delete .lucide-icon {
            width: 15px;
            height: 15px;
        }

        .notification-empty {
            padding: 34px 18px;
            color: var(--text-muted);
            font-size: 12.5px;
            text-align: center;
        }

        .dropdown-divider {
            border: 0; 
            border-top: 1px solid rgba(0, 0, 0, 0.05); 
            margin: 6px 0;
        }

        .dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            padding: 10px 16px;
            color: inherit;
            text-decoration: none;
            font-size: 13.5px;
            font-weight: 600;
            border-radius: 8px;
            transition: background-color 0.2s;
            border: 0;
            background: transparent;
            text-align: left;
            cursor: pointer;
            font-family: inherit;
        }

        .dropdown-item:hover {
            background-color: rgba(0,0,0,0.02);
        }

        .lucide-icon {
            width: 1.15em;
            height: 1.15em;
            flex: 0 0 auto;
            fill: none;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

        .pin-likes .lucide-icon,
        .detail-action .lucide-icon {
            width: 15px;
            height: 15px;
        }

        .pin-likes.liked .lucide-icon,
        .detail-action.liked .lucide-icon {
            fill: currentColor;
        }

        /* -------------------------
            篩選列與展開抽屜 (房屋、RP用)
           ------------------------- */
        .filter-section {
            max-width: 1400px;
            margin: 0 auto 18px;
            padding: 0 16px;
        }

        .filter-header-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
        }

        .filter-title {
            font-size: 13px;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: var(--text-muted);
        }

        .btn-toggle-filters {
            background-color: var(--decor-card);
            border: 1px solid var(--decor-border);
            color: inherit;
            position: relative;
            width: 44px;
            height: 44px;
            padding: 0;
            border-radius: 10px;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: transform 0.2s, box-shadow 0.2s, color 0.2s, background-color 0.4s, border-color 0.4s;
            box-shadow: 0 2px 5px rgba(0,0,0,0.02);
        }

        .btn-toggle-filters:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,0.05); }

        #filterButtonLabel {
            position: absolute;
            right: calc(100% + 8px);
            top: 50%;
            z-index: 5;
            padding: 7px 10px;
            border-radius: 7px;
            background: #33353A;
            color: #FFFFFF;
            white-space: nowrap;
            box-shadow: 0 6px 16px rgba(32, 34, 38, 0.14);
            opacity: 0;
            visibility: hidden;
            transform: translate(4px, -50%);
            pointer-events: none;
            transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
        }

        .btn-toggle-filters:hover #filterButtonLabel,
        .btn-toggle-filters:focus-visible #filterButtonLabel {
            opacity: 1;
            visibility: visible;
            transform: translate(0, -50%);
        }

        .filter-group-container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .filter-pill {
            padding: 8px 16px;
            background-color: var(--decor-card);
            border: 1px solid rgba(0, 0, 0, 0.05);
            border-radius: 20px;
            font-size: 13px;
            font-weight: 500;
            color: inherit;
            cursor: pointer;
            transition: color 0.2s, background-color 0.4s, border-color 0.4s;
            font-family: inherit;
        }

        .filter-pill.selected {
            background-color: var(--decor-pink);
            border-color: var(--decor-pink);
            color: #303238;
        }

        /* 絲滑 Grid 展開容器 */
        .drawer-wrapper {
            display: grid;
            grid-template-rows: 0fr;
            transition: grid-template-rows 0.35s cubic-bezier(0.25, 1, 0.5, 1);
            overflow: hidden;
            margin-bottom: 0px;
        }

        .drawer-wrapper.open {
            grid-template-rows: 1fr;
            margin-bottom: 25px;
        }

        .advanced-filter-drawer {
            min-height: 0;
            opacity: 0;
            transform: translateY(-8px);
            transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.4s, border-color 0.4s;
            background-color: var(--decor-card);
            border-radius: 16px;
            box-shadow: inset 0 2px 8px rgba(0,0,0,0.01), 0 4px 12px rgba(0,0,0,0.01);
            border: 1px solid var(--decor-border);
            padding: 24px;
        }

        .drawer-wrapper.open .advanced-filter-drawer {
            opacity: 1;
            transform: translateY(0);
        }

        /* 優化 3：行內樣式抽離，預設改為剛性等分網格 */
        .drawer-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
        }

        .drawer-group {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .drawer-group.span-2 {
            grid-column: span 2;
        }

        .drawer-group label,
        .drawer-group .field-group-label {
            font-size: 12px;
            font-weight: 700;
            color: var(--text-muted);
            letter-spacing: 0.5px;
        }

        .drawer-input {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid var(--decor-border);
            border-radius: 12px;
            background-color: var(--decor-bg);
            color: inherit;
            font-size: 13px;
            outline: none;
            transition: border-color 0.2s, background-color 0.4s, color 0.4s;
        }

        .drawer-select {
            width: 100%;
            padding: 10px 14px;
            border: 1px solid var(--decor-border);
            border-radius: 12px;
            background-color: var(--decor-bg);
            color: var(--decor-text);
            font-size: 13px;
            font-weight: 500;
            outline: none;
            cursor: pointer;
            transition: border-color 0.2s, background-color 0.4s, color 0.4s;
            appearance: none;
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M1 3l4 4 4-4' stroke='%238E929D' stroke-width='1.5' fill='none' stroke-linecap='round'/></svg>");
            background-repeat: no-repeat;
            background-position: right 14px center;
            color-scheme: light !important; 
        }
        
        .drawer-select option {
            background-color: #FFFFFF !important;
            color: #33363F !important;
        }

        /* 空間色系專用彩色按鈕 */
        .color-selector {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 4px 0;
            margin-top: 4px;
        }

        .color-icon {
            width: 26px;
            height: 26px;
            padding: 0;
            appearance: none;
            border-radius: 50%;
            border: 2px solid transparent;
            cursor: pointer;
            transition: transform 0.15s, border-color 0.15s;
            box-shadow: 0 2px 5px rgba(0,0,0,0.1);
            padding: 0;
        }

        .filter-drawer-actions { display: flex; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--decor-border); }
        .btn-clear-filters {
            border: 0;
            background: transparent;
            color: var(--text-muted);
            padding: 8px 10px;
            font: inherit;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
        }
        .btn-clear-filters:hover { color: inherit; }
        .applied-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
        .applied-filter-label { color: var(--text-muted); font-size: 12px; font-weight: 700; margin-right: 2px; }
        .applied-filter-chip {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border: 1px solid var(--decor-border);
            background: var(--decor-card);
            color: inherit;
            border-radius: 999px;
            padding: 6px 9px 6px 11px;
            font: inherit;
            font-size: 11.5px;
            font-weight: 700;
            cursor: pointer;
        }
        .applied-filter-chip span { opacity: 0.55; }
        .applied-clear-all { border: 0; background: transparent; color: var(--text-muted); font-size: 11.5px; font-weight: 700; cursor: pointer; }
        .filter-drawer-actions .applied-filters { width: 100%; margin-top: 0; }
        .filter-drawer-actions .applied-clear-all { margin-left: auto; }

        .color-icon:hover { transform: scale(1.15); }
        .color-icon.selected { border-color: #33363F; transform: scale(1.1); }
        .color-icon.all-colors { background: linear-gradient(45deg, #E25C5C, #5C96E2, #E2D05C); }
        .upload-form-panel .color-icon { position: relative; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, outline-color .16s ease; }
        .upload-form-panel .color-icon:hover { transform: translateY(-1px) scale(1.06); }
        .upload-form-panel .color-icon.selected {
            border-color: transparent;
            outline: none;
            box-shadow: 0 2px 5px rgba(0,0,0,.1);
            transform: none;
        }
        .upload-form-panel .color-icon.selected::after {
            content: "✓";
            position: absolute;
            left: 50%;
            top: 50%;
            color: #111318;
            font-size: 13px;
            font-weight: 900;
            line-height: 1;
            text-shadow: -1px -1px 0 rgba(255,255,255,.9), 1px -1px 0 rgba(255,255,255,.9), -1px 1px 0 rgba(255,255,255,.9), 1px 1px 0 rgba(255,255,255,.9);
            transform: translate(-50%, -50%);
        }
        .color-selection-status { min-height: 18px; margin-top: 7px; color: var(--text-muted); font-size: 11.5px; font-weight: 700; }

        button:focus-visible,
        a:focus-visible,
        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible,
        [tabindex]:focus-visible {
            outline: 3px solid var(--focus-ring);
            outline-offset: 3px;
        }

        /* -------------------------------------------------------------
            【重要視覺核心：橫向無限滾動的事件流行事曆】
           ------------------------------------------------------------- */
        .calendar-section {
            display: none; 
            max-width: 1400px;
            margin: 30px auto 20px auto;
            padding: 0 24px;
        }

        .calendar-mask-container {
            position: relative;
            width: 100%;
        }

        /* 左右漸變消失遮罩 */
        .calendar-mask-container::before,
        .calendar-mask-container::after {
            content: '';
            position: absolute;
            top: 0;
            bottom: 0;
            width: 50px; 
            z-index: 5;
            pointer-events: none; 
            transition: background 0.4s ease;
        }

        .calendar-mask-container::before {
            left: 0;
            background: linear-gradient(to right, var(--event-bg) 0%, rgba(249, 243, 238, 0) 100%);
        }

        .calendar-mask-container::after {
            right: 0;
            background: linear-gradient(to left, var(--event-bg) 0%, rgba(249, 243, 238, 0) 100%);
        }

        /* 實體左右箭頭按鈕 */
        .calendar-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 36px;
            height: 36px;
            background-color: #FFFFFF;
            border: 1px solid var(--event-border);
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 10;
            box-shadow: 0 4px 12px rgba(0,0,0,0.04);
            color: var(--event-text);
            transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s cubic-bezier(0.25, 1, 0.5, 1), color 0.2s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.2s cubic-bezier(0.25, 1, 0.5, 1);
        }

        .calendar-nav-btn:hover {
            background-color: var(--event-orange);
            border-color: var(--event-orange);
            color: #FFFFFF;
            transform: translateY(-50%) scale(1.05);
        }

        .calendar-nav-btn:active {
            transform: translateY(-50%) scale(0.95);
        }

        .calendar-nav-btn.btn-left { left: -10px; }
        .calendar-nav-btn.btn-right { right: -10px; }

        .calendar-scroll-wrapper {
            width: 100%;
            overflow-x: auto;
            white-space: nowrap;
            padding: 10px 0;
            scrollbar-width: none; 
            scroll-behavior: smooth;
        }
        .calendar-scroll-wrapper::-webkit-scrollbar {
            display: none; 
        }

        .calendar-week-grid {
            display: inline-flex;
            min-width: 100%; 
            justify-content: flex-start; 
            gap: 12px;
            align-items: center;
            padding: 0 50px; 
        }

        .calendar-day-card {
            display: inline-block;
            border-radius: 16px;
            padding: 12px 20px;
            text-align: center;
            cursor: pointer;
            min-width: 100px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.01);
            border: 1px solid transparent;
            position: relative;
            transition: color 0.25s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.25s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.25s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s cubic-bezier(0.25, 1, 0.5, 1);
        }

        /* 月份卡片顏色漸變設定 */
        .calendar-day-card.month-7 { background-color: #FFFFFF; border-color: #EFE6DE; color: #594E4A; }
        .calendar-day-card.month-7:hover { border-color: var(--event-orange); }
        .calendar-day-card.month-7.active {
            background-color: var(--event-orange); border-color: var(--event-orange); color: #FFFFFF;
            box-shadow: 0 8px 16px rgba(226, 155, 92, 0.25);
        }

        .calendar-day-card.month-8 { background-color: #FFFFFF; border-color: #EFECE1; color: #59554A; }
        .calendar-day-card.month-8:hover { border-color: #D3B980; }
        .calendar-day-card.month-8.active { background-color: #D3B980; border-color: #D3B980; color: #FFFFFF; box-shadow: 0 8px 16px rgba(211, 185, 128, 0.25); }

        .calendar-day-card.month-9 { background-color: #FFFFFF; border-color: #EFE6E6; color: #594A4A; }
        .calendar-day-card.month-9:hover { border-color: #CE8A8A; }
        .calendar-day-card.month-9.active { background-color: #CE8A8A; border-color: #CE8A8A; color: #FFFFFF; box-shadow: 0 8px 16px rgba(206, 138, 138, 0.25); }

        .calendar-day-card.month-10 { background-color: #FFFFFF; border-color: #E1EFE9; color: #4A594E; }
        .calendar-day-card.month-10:hover { border-color: #89A38F; }
        .calendar-day-card.month-10.active { background-color: #89A38F; border-color: #89A38F; color: #FFFFFF; box-shadow: 0 8px 16px rgba(137, 163, 143, 0.25); }

        .calendar-day-card.month-11 { background-color: #FFFFFF; border-color: #EFECE1; color: #59554A; }
        .calendar-day-card.month-11:hover { border-color: #D4BD8A; }
        .calendar-day-card.month-11.active { background-color: #D4BD8A; border-color: #D4BD8A; color: #FFFFFF; box-shadow: 0 8px 16px rgba(212, 189, 138, 0.25); }

        .calendar-day-card.month-12 { background-color: #FFFFFF; border-color: #E1E9EF; color: #4A5359; }
        .calendar-day-card.month-12:hover { border-color: #8AA4CE; }
        .calendar-day-card.month-12.active { background-color: #8AA4CE; border-color: #8AA4CE; color: #FFFFFF; box-shadow: 0 8px 16px rgba(138, 164, 206, 0.25); }

        .month-divider {
            display: inline-block;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: 1px;
            text-transform: uppercase;
            padding: 8px 14px;
            background-color: rgba(0, 0, 0, 0.03);
            border-radius: 12px;
            margin: 0 8px;
            color: var(--event-text);
            opacity: 0.7;
        }

        .calendar-day-name { font-size: 11px; font-weight: 700; opacity: 0.6; margin-bottom: 4px; text-transform: uppercase; }
        .calendar-day-num { font-size: 18px; font-weight: 800; }
        .calendar-day-dot {
            width: 5px; height: 5px; background-color: var(--event-orange); border-radius: 50%;
            position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); transition: background-color 0.2s;
        }
        .calendar-day-card.active .calendar-day-dot { background-color: #FFFFFF; }

        /* 活動頁：精簡且連續的日期列 */
        .calendar-section { margin: 18px auto 14px; }
        .calendar-section .filter-header-bar { align-items: flex-end; margin-bottom: 10px; }
        .calendar-heading-copy { display: flex; flex-direction: column; gap: 4px; }
        .calendar-heading-copy .filter-title { font-size: 15px; }
        .calendar-month-label { color: var(--text-muted); font-size: 12px; font-weight: 650; }
        .calendar-mask-container { max-width: 100%; }
        .calendar-scroll-wrapper { padding: 6px 0; }
        .calendar-week-grid { gap: 8px; padding: 0 52px; }
        .calendar-day-card {
            min-width: 78px;
            padding: 10px 14px 13px;
            background: rgba(255,255,255,0.8) !important;
            border-color: var(--event-border) !important;
            color: var(--event-text) !important;
        }
        .calendar-day-card.active {
            background: var(--event-orange) !important;
            border-color: var(--event-orange) !important;
            color: #FFF !important;
            box-shadow: 0 7px 16px rgba(79,111,145,0.22) !important;
        }
        .calendar-day-name { text-transform: none; }
        .month-divider { display: none; }

        /* -------------------------
            多元版面瀑布流結構
           ------------------------- */
        .gallery-container { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
        .gallery-summary {
            max-width: 1400px;
            margin: 24px auto 18px;
            padding: 0 16px;
            display: flex;
            align-items: flex-end;
            justify-content: space-between;
            gap: 20px;
        }
        .gallery-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
        .sort-select {
            border: 1px solid rgba(0,0,0,0.06); border-radius: 999px; background: rgba(255,255,255,0.78);
            color: var(--text-muted); padding: 9px 32px 9px 14px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
        }
        .gallery-heading { font-size: clamp(24px, 3vw, 36px); line-height: 1.15; letter-spacing: -0.8px; }
        .gallery-description { margin-top: 8px; color: var(--text-muted); font-size: 14px; line-height: 1.6; }
        .gallery-count {
            flex: 0 0 auto;
            padding: 8px 14px;
            border-radius: 999px;
            background: rgba(255,255,255,0.72);
            border: 1px solid rgba(0,0,0,0.05);
            color: var(--text-muted);
            font-size: 13px;
            font-weight: 700;
        }
        .empty-state {
            width: 100%;
            min-height: 180px;
            padding: 64px 20px;
            text-align: center;
            color: var(--text-muted);
            background: rgba(255,255,255,0.55);
            border: 1px dashed rgba(0,0,0,0.1);
            border-radius: 18px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }
        .empty-state strong { color: inherit; font-size: 16px; }
        .empty-state span { font-size: 13px; line-height: 1.6; }
        .empty-state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
        .decor-grid { display: grid; width: 100%; }
        .rp-standard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; width: 100%; }
        .event-wide-grid { display: grid; grid-template-columns: 1fr; gap: 20px; max-width: 900px; margin: 0 auto; }

        .pin-card {
            background-color: var(--decor-card); border-radius: 16px; overflow: hidden;
            box-shadow: 0 1px 3px rgba(0,0,0,0.01), 0 4px 12px rgba(0,0,0,0.01);
            transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s, background-color 0.4s, border-color 0.4s;
            cursor: pointer;
        }
        .decor-grid .pin-card { min-width: 0; }
        .pin-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05); }

        .event-wide-grid .pin-card { display: flex; }
        .event-wide-grid .pin-image-wrapper { width: 40%; height: 100%; }
        .event-wide-grid .pin-details { width: 60%; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; }

        .pin-image-wrapper { position: relative; width: 100%; overflow: hidden; background-color: #EFECE8; }
        .pin-image { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 0.5s ease; }
        .pin-card:hover .pin-image { transform: scale(1.03); }

        .overlay-tag {
            position: absolute; top: 12px; left: 12px; background-color: rgba(255, 255, 255, 0.9);
            color: #33363F; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); z-index: 2;
        }

        .status-badge {
            position: absolute; top: 12px; right: 12px; color: #FFFFFF; font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 12px; z-index: 2; box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        }
        .status-badge.open { background-color: var(--status-open); color: #1E3A24; }
        .status-badge.closed { background-color: var(--status-closed); }
        .status-badge.waiting { background-color: var(--status-waiting); color: #3E240C; }

        .visit-status-badge {
            left: 12px;
            right: auto;
        }
        .pin-card:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

        .pin-details { padding: 16px; }
        .pin-title {
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 8px;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
            overflow: hidden;
        }
        .pin-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 12px; }
        .pin-tag {
            display: inline-flex;
            align-items: center;
            min-height: 24px;
            padding: 4px 9px;
            border-radius: 999px;
            background: var(--decor-bg);
            border: 1px solid var(--decor-border);
            color: var(--text-muted);
            font-size: 11px;
            font-weight: 700;
        }
        button.pin-tag {
            font-family: inherit;
            cursor: pointer;
            transition: color .16s ease, border-color .16s ease, background-color .16s ease;
        }
        body.theme-decor button.pin-tag:hover { color: var(--decor-green-dark); border-color: var(--decor-green); background: var(--decor-green-soft); }
        body.theme-rp button.pin-tag:hover { color: #76547F; border-color: #B9A4BF; background: #FBF7FC; }
        body.theme-rp .pin-tag { background: var(--rp-bg); border-color: var(--rp-border); }
        .pin-info-row { font-size: 13px; opacity: 0.8; margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
        .pin-info-item { display: flex; align-items: center; gap: 6px; }
        .pin-context-row, .pin-address-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
            margin-bottom: 12px;
        }
        .pin-context-row .pin-tags { flex: 1 1 auto; margin: 2px 0 0; }
        .pin-context-row .visit-status-badge,
        .pin-address-row .status-badge { position: static; flex: 0 0 auto; box-shadow: none; }
        .pin-address-row .pin-info-item { min-width: 0; }
        .pin-address-row .pin-info-item span { overflow-wrap: anywhere; }

        .pin-meta { display: flex; align-items: center; justify-content: space-between; border-top: 1px dashed rgba(0, 0, 0, 0.08); padding-top: 12px; transition: border-color 0.4s; }
        .author-group { display: flex; align-items: center; gap: 8px; }
        .author-avatar { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #303238; transition: background-color 0.4s, color 0.4s; }
        .author-name { font-size: 12px; font-weight: 600; }
        .pin-likes { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; transition: color 0.2s; border: 0; background: transparent; cursor: pointer; padding: 5px; border-radius: 8px; }
        .pin-likes:hover { background: rgba(0,0,0,0.03); }
        .pin-likes.liked { color: #D97979 !important; }

        /* -------------------------
            內容詳細頁
           ------------------------- */
        .detail-view { max-width: 1180px; margin: 0 auto; padding: 30px 24px 80px; }
        .detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
        .btn-back-detail, .detail-action {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            border: 1px solid var(--decor-border);
            background: rgba(255,255,255,0.8);
            color: inherit;
            padding: 9px 14px;
            border-radius: 999px;
            font: inherit;
            font-size: 12.5px;
            font-weight: 750;
            cursor: pointer;
        }
        .detail-actions { display: flex; gap: 8px; }
        .detail-action.liked { background: #F6DEDA; border-color: #F0CBC5; color: #A85252; }
        .detail-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr); gap: 16px 28px; align-items: start; min-width: 0; }
        .detail-gallery { min-width: 0; }
        .detail-primary-panel { min-width: 0; }
        .detail-sections { grid-column: 1; grid-row: 2; min-width: 0; }
        .detail-sidebar { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 16px; min-width: 0; align-self: start; }
        .detail-info-panel {
            min-width: 0;
            position: relative;
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: center;
            column-gap: 10px;
        }
        .detail-image-stage {
            position: relative;
            aspect-ratio: 3 / 2;
            overflow: hidden;
            border-radius: 24px;
            background: #242428;
            isolation: isolate;
        }
        .detail-image-stage::before {
            content: '';
            position: absolute;
            inset: -24px;
            z-index: 0;
            background-image: var(--detail-backdrop, none);
            background-position: center;
            background-size: cover;
            filter: blur(12px) brightness(0.6) saturate(0.85);
            transform: scale(1.08);
        }
        .detail-image-stage::after {
            content: '';
            position: absolute;
            inset: 0;
            z-index: 1;
            background: rgba(12, 14, 20, 0.10);
            pointer-events: none;
        }
        .detail-image-stage { cursor: zoom-in; }
        .detail-main-image {
            position: relative;
            z-index: 2;
            width: 100%;
            height: 100%;
            aspect-ratio: auto;
            object-fit: contain;
            display: block;
            border-radius: 0;
            background: transparent;
        }
        .detail-gallery-nav {
            position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
            width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.72);
            background: rgba(255,255,255,0.9); color: #33363F; box-shadow: 0 4px 16px rgba(0,0,0,0.14);
            display: grid; place-items: center; padding: 0; cursor: pointer; line-height: 0;
        }
        .gallery-chevron { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
        .detail-gallery-nav:hover { background: #FFF; }
        .detail-gallery-nav.prev { left: 14px; }
        .detail-gallery-nav.next { right: 14px; }
        .detail-image-count {
            position: absolute; right: 14px; bottom: 14px; z-index: 3; padding: 6px 10px;
            border-radius: 999px; background: rgba(20,22,27,0.72); color: #FFF; font-size: 11px; font-weight: 800;
        }
        .image-lightbox {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 1200;
            align-items: center;
            justify-content: center;
            padding: 28px;
            background: rgba(12, 14, 20, 0.88);
            backdrop-filter: blur(10px);
            opacity: 0;
            transition: opacity .2s ease;
        }
        .image-lightbox.active { display: flex; opacity: 1; }
        .image-lightbox-content { position: relative; display: grid; place-items: center; width: min(1120px, calc(100% - 128px)); height: min(85dvh, 900px); min-width: 0; min-height: 0; }
        .image-lightbox-image { display: block; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 18px 60px rgba(0,0,0,.42); }
        .image-lightbox-close,
        .image-lightbox-nav {
            position: absolute;
            z-index: 2;
            display: grid;
            place-items: center;
            border: 1px solid rgba(255,255,255,.55);
            color: #FFF;
            background: rgba(18,20,26,.7);
            cursor: pointer;
        }
        .image-lightbox-close { top: -50px; right: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 26px; line-height: 1; }
        .image-lightbox-nav { top: 50%; width: 48px; height: 48px; padding: 0; border-radius: 50%; transform: translateY(-50%); line-height: 0; }
        .image-lightbox-nav .gallery-chevron { width: 24px; height: 24px; }
        .image-lightbox-nav.prev { left: -62px; }
        .image-lightbox-nav.next { right: -62px; }
        .image-lightbox-nav[hidden] { display: none; }
        .image-lightbox-count { position: absolute; right: 8px; bottom: -28px; color: rgba(255,255,255,.9); font-size: 12px; font-weight: 800; }
        .detail-thumbnails { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
        .detail-thumbnail { border: 2px solid transparent; padding: 0; border-radius: 12px; overflow: hidden; background: transparent; cursor: pointer; opacity: 0.72; }
        .detail-thumbnail.active { border-color: var(--decor-pink); opacity: 1; }
        .detail-thumbnail img { width: 112px; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
        .detail-panel { background: rgba(255,255,255,0.82); border: 1px solid var(--decor-border); border-radius: 22px; padding: 22px; box-shadow: 0 8px 28px rgba(0,0,0,0.025); }
        .detail-kicker { color: var(--text-muted); font-size: 11px; font-weight: 800; letter-spacing: 0.8px; margin-bottom: 9px; }
        .detail-title {
            max-width: 100%;
            margin-bottom: 13px;
            font-size: clamp(24px, 3vw, 34px);
            line-height: 1.25;
            letter-spacing: -0.6px;
            overflow-wrap: anywhere;
            word-break: break-word;
        }
        .detail-author { display: flex; align-items: flex-start; gap: 10px; padding-top: 16px; margin-top: 15px; border-top: 1px dashed rgba(0,0,0,0.09); }
        .detail-author-avatar { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 50%; display: grid; place-items: center; background: var(--decor-pink); font-weight: 800; }
        .detail-author-copy { min-width: 0; flex: 1 1 auto; }
        .detail-author-copy strong, .detail-author-copy span { display: block; }
        .detail-author-copy strong,
        .detail-author-copy span { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
        .detail-author-copy span { color: var(--text-muted); font-size: 11.5px; margin-top: 2px; }
        .detail-section { margin-top: 22px; background: rgba(255,255,255,0.68); border: 1px solid var(--decor-border); border-radius: 22px; padding: 24px; }
        .detail-section h2 { font-size: 17px; margin-bottom: 12px; }
        .detail-section p { color: #60646E; line-height: 1.85; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; word-break: break-word; }
        body.theme-rp .rp-description-section {
            height: auto;
            min-height: 0;
            align-self: start;
            margin-top: 18px;
            padding: 18px 24px;
        }
        body.theme-rp .rp-description-section h2 { margin-bottom: 8px; }
        body.theme-rp .rp-description-section p { line-height: 1.7; }
        .detail-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1px; background: var(--decor-border); border: 1px solid var(--decor-border); border-radius: 16px; overflow: hidden; }
        .detail-info-item { min-width: 0; background: #FFF; padding: 14px 16px; }
        .detail-info-item span { display: block; color: var(--text-muted); font-size: 10.5px; font-weight: 700; margin-bottom: 5px; }
        .detail-info-item strong { display: block; min-width: 0; max-width: 100%; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
        .detail-info-item.long-schedule { grid-column: 1 / -1; }
        .detail-info-item.schedule-lead { grid-column: 1 / -1; }
        .detail-info-item.long-schedule strong {
            white-space: pre-line;
            line-height: 1.75;
            word-break: normal;
            font-variant-numeric: tabular-nums;
        }
        .detail-info-toggle {
            display: none;
            width: 100%;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            border: 0;
            background: transparent;
            color: inherit;
            padding: 0;
            font: inherit;
            font-size: 14px;
            font-weight: 800;
            text-align: left;
            cursor: pointer;
        }
        .detail-info-toggle .gallery-chevron { width: 18px; height: 18px; transition: transform .18s ease; }
        .detail-info-panel.is-open .detail-info-toggle .gallery-chevron { transform: rotate(180deg); }
        .detail-info-collapsible { display: block; grid-column: 1 / -1; grid-row: 2; margin-top: 9px; }
        .detail-weather-control {
            position: relative;
            grid-column: 2;
            grid-row: 1;
            align-self: center;
            justify-self: end;
            z-index: 4;
        }
        .detail-weather-button {
            position: relative;
            width: 40px;
            height: 40px;
            display: grid;
            place-items: center;
            padding: 0;
            border: 1px solid var(--decor-border);
            border-radius: 50%;
            background: #FFF;
            color: var(--theme-text, #2F3136);
            cursor: pointer;
            transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
        }
        .detail-weather-button:hover { border-color: var(--accent, #6F8C78); background: var(--theme-page-bg, #F7F5F2); transform: translateY(-1px); }
        .detail-weather-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
        .detail-weather-button::after {
            content: attr(data-tooltip);
            position: absolute;
            right: 0;
            bottom: calc(100% + 8px);
            width: max-content;
            max-width: 210px;
            padding: 6px 9px;
            border-radius: 6px;
            background: #2F3136;
            color: #FFF;
            font-size: 11px;
            font-weight: 700;
            line-height: 1.35;
            pointer-events: none;
            opacity: 0;
            transform: translateY(3px);
            transition: opacity .14s ease, transform .14s ease;
        }
        .detail-weather-button:hover::after,
        .detail-weather-button:focus-visible::after { opacity: 1; transform: translateY(0); }
        .detail-weather-popover {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            width: min(320px, calc(100vw - 44px));
            max-height: 320px;
            overflow-y: auto;
            padding: 16px;
            border: 1px solid var(--decor-border);
            border-radius: 10px;
            background: #FFF;
            color: var(--theme-text, #2F3136);
            box-shadow: 0 16px 38px rgba(27, 31, 35, .16);
        }
        .detail-weather-popover[hidden] { display: none; }
        .detail-weather-popover-header { padding-right: 26px; margin-bottom: 12px; }
        .detail-weather-popover-header strong { display: block; font-size: 14px; }
        .detail-weather-popover-header span { display: block; margin-top: 2px; color: var(--text-muted); font-size: 11px; }
        .detail-weather-current { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; margin-bottom: 8px; border-radius: 7px; background: var(--theme-page-bg, #F7F5F2); }
        .detail-weather-current span { color: var(--text-muted); font-size: 11px; font-weight: 700; }
        .detail-weather-current strong { font-size: 14px; }
        .detail-weather-list { display: grid; gap: 1px; border: 1px solid var(--decor-border); border-radius: 7px; overflow: hidden; background: var(--decor-border); }
        .detail-weather-row { display: grid; grid-template-columns: minmax(92px, 1fr) auto; align-items: center; gap: 12px; padding: 9px 11px; background: #FFF; font-size: 12px; }
        .detail-weather-row time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
        .detail-weather-row strong { text-align: right; }
        .detail-weather-note { margin: 10px 2px 0; color: var(--text-muted); font-size: 10.5px; line-height: 1.5; }
        .detail-info-panel > .detail-info-toggle,
        .detail-info-panel > .detail-info-desktop-title { grid-column: 1; grid-row: 1; margin-bottom: 0; padding-right: 0; }
        @media (pointer: coarse) {
            .detail-weather-button { width: 44px; height: 44px; }
        }
        .detail-status-line { display: inline-flex; margin: 3px 0 5px; }
        .detail-status-line .visit-status-badge { position: static; }
        .detail-color-line { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; color: var(--text-muted); font-size: 12px; font-weight: 700; }
        .detail-color-swatch { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.12); box-shadow: inset 0 0 0 2px rgba(255,255,255,0.3); }
        .detail-color-icons { display: flex; gap: 7px; margin: 7px 0 4px; }
        .detail-color-icons .detail-color-swatch { width: 17px; height: 17px; }
        .detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
        .detail-author-link { width: 100%; min-width: 0; min-height: 38px; max-width: 100%; border: 0; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; padding: 0; display: flex; align-items: center; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
        .detail-author-link:hover strong { text-decoration: underline; }
        .detail-creator-tag {
            display: block;
            width: fit-content;
            max-width: 100%;
            margin-top: 6px;
            padding: 0;
            border: 0;
            background: transparent;
            color: var(--text-muted);
            font: inherit;
            font-size: 12px;
            font-weight: 500;
            line-height: 1.5;
            text-align: left;
            cursor: pointer;
        }
        .detail-author-copy .detail-creator-tag span,
        .detail-author-copy .detail-creator-tag strong { display: inline; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
        .detail-creator-tag strong { color: inherit; font-weight: 500; }
        .detail-creator-tag:hover,
        .detail-creator-tag:focus-visible { color: var(--theme-text, var(--text-main)); }
        .detail-creator-tag:hover strong,
        .detail-creator-tag:focus-visible strong { text-decoration: underline; text-underline-offset: 3px; }
        .detail-creator-tag:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 3px; }
        .detail-note { display: flex; gap: 9px; padding: 13px 15px; background: var(--decor-bg); border-radius: 14px; color: #60646E; font-size: 12.5px; line-height: 1.6; }
        .detail-note > span:last-child { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
        .detail-empty-thumb { display: none; }
        body.theme-rp .detail-panel, body.theme-rp .detail-section, body.theme-rp .detail-action, body.theme-rp .btn-back-detail { border-color: var(--rp-border); }
        body.theme-rp .detail-author-avatar { background: var(--rp-purple); color: #FFF; }
        body.theme-event .detail-panel, body.theme-event .detail-section, body.theme-event .detail-action, body.theme-event .btn-back-detail { border-color: var(--event-border); }
        body.theme-event .detail-author-avatar { background: var(--event-orange); color: #FFF; }
        body.theme-rp #generalFilterSection .drawer-group.span-2 { display: none; }
        #form-rp .rp-color-field { display: none; }

        /* -------------------------
            【「我要上傳」Modal】
           ------------------------- */
        .upload-modal {
            display: none; 
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: 1000;
            background-color: rgba(250, 248, 245, 0.7);
            backdrop-filter: blur(20px); 
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .upload-modal.active {
            display: flex;
            opacity: 1;
        }

        .upload-container {
            width: 100%;
            max-width: 680px;
            height: 85vh;
            background-color: #FFFFFF;
            border-radius: 32px;
            box-shadow: 0 20px 50px rgba(0,0,0,0.06);
            border: 1px solid var(--decor-border);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transform: translateY(20px);
            transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }

        .upload-modal.active .upload-container {
            transform: translateY(0);
        }

        .upload-header {
            padding: 24px 32px 10px 32px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .upload-title {
            font-size: 20px;
            font-weight: 800;
            color: #33363F;
        }

        .btn-close-modal {
            background: none;
            border: none;
            font-size: 28px;
            color: #8E929D;
            cursor: pointer;
            transition: color 0.2s;
        }

        .btn-close-modal:hover { color: #33363F; }

        .upload-tabs {
            display: flex;
            gap: 12px;
            padding: 10px 32px 20px 32px;
            border-bottom: 1px solid var(--decor-border);
        }

        .upload-tab-btn {
            flex: 1;
            background-color: var(--decor-bg);
            border: 1px solid var(--decor-border);
            color: var(--decor-text);
            padding: 12px 16px;
            border-radius: 16px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: color 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s cubic-bezier(0.25, 1, 0.5, 1);
        }

        .upload-tab-btn.tab-decor.active {
            background-color: var(--decor-green);
            border-color: var(--decor-green);
            color: #253129;
        }

        .upload-tab-btn.tab-rp.active {
            background-color: var(--rp-purple);
            border-color: var(--rp-purple);
            color: #FFFFFF;
        }

        .upload-tab-btn.tab-event.active {
            background-color: var(--event-orange);
            border-color: var(--event-orange);
            color: #FFFFFF;
        }

        .upload-body {
            flex: 1;
            padding: 24px 32px;
            overflow-y: auto;
        }

        .upload-form-panel {
            display: none;
            opacity: 0;
            transform: translateY(8px);
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        .upload-form-panel.active {
            display: block;
            opacity: 1;
            transform: translateY(0);
        }

        .form-grid-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
            margin-bottom: 16px;
        }

        .form-item {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 16px;
        }
        .datetime-fields { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 8px; }

        .form-item label,
        .form-item .field-group-label {
            font-size: 13px;
            font-weight: 700;
            color: var(--decor-text);
        }

        .form-input, .form-select, .form-textarea {
            padding: 12px 16px;
            border: 1px solid var(--decor-border);
            border-radius: 12px;
            background-color: var(--decor-bg);
            color: #33363F;
            font-size: 13.5px;
            outline: none;
            transition: border-color 0.2s;
        }
        .form-textarea { resize: none; }

        .form-input:focus, .form-select:focus, .form-textarea:focus {
            border-color: var(--decor-pink);
        }
        .form-item.field-invalid .form-input,
        .form-item.field-invalid .form-select,
        .form-item.field-invalid .form-textarea,
        .form-item.field-invalid .file-upload-box,
        .form-item.field-invalid .color-selector,
        .form-item.field-invalid .choice-card span {
            border-color: #C95D5D;
            box-shadow: 0 0 0 2px rgba(201, 93, 93, 0.08);
        }
        .form-error { color: #A84444; font-size: 11.5px; font-weight: 700; line-height: 1.5; }
        .choice-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
        .choice-card { position: relative; }
        .choice-card input { position: absolute; opacity: 0; pointer-events: none; }
        .choice-card span {
            min-height: 46px; padding: 11px 14px; border: 1px solid var(--decor-border); border-radius: 12px;
            background: var(--decor-bg); display: flex; align-items: center; justify-content: center; gap: 7px;
            font-size: 13px; font-weight: 750; cursor: pointer;
        }
        .choice-card input:checked + span { border-color: var(--event-orange); background: rgba(79,111,145,0.12); color: #3F5D7D; }
        .choice-card input:focus-visible + span { outline: 3px solid var(--focus-ring-soft); outline-offset: 2px; }
        .field-help { color: var(--text-muted); font-size: 11.5px; line-height: 1.55; }
        .character-counter { display: block; align-self: flex-end; margin-top: 4px; color: var(--text-muted); font-size: 10.5px; line-height: 1.35; text-align: right; }
        .character-counter.is-warning { color: #9A671E; font-weight: 700; }
        .character-counter.is-limit { color: #A85252; font-weight: 800; }
        .character-counter[hidden] { display: none; }
        .description-line-counter { display: block; margin-top: 4px; color: var(--text-muted); font-size: 10.5px; line-height: 1.35; text-align: right; }
        .description-line-counter.is-limit { color: #A85252; font-weight: 800; }
        .description-line-counter[hidden] { display: none; }
        .file-upload-box {
            width: 100%; min-width: 0; max-width: 100%; min-height: 68px; padding: 14px 18px; border: 1px dashed var(--decor-border); border-radius: 14px;
            background: var(--decor-bg); display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center;
            gap: 8px; overflow: hidden; box-sizing: border-box; text-align: center; font-size: 13px; font-weight: 700; cursor: pointer;
        }
        .file-upload-box:hover { border-color: var(--decor-pink); }
        .file-upload-box input { position: absolute; opacity: 0; pointer-events: none; }
        .file-upload-count { color: var(--text-muted); font-size: 11.5px; font-weight: 500; }
        .file-upload-box .upload-preview-grid { flex-basis: 100%; }
        .studio-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
        .studio-category-badge {
            display: inline-flex;
            width: fit-content;
            align-items: center;
            gap: 5px;
            margin-bottom: 6px;
            padding: 4px 8px;
            border: 1px solid;
            border-radius: 999px;
            font-size: 10.5px;
            font-weight: 800;
            line-height: 1.2;
        }
        .studio-category-badge .lucide-icon { width: 13px; height: 13px; }
        .studio-category-badge.is-decor { background: #EEF4EF; border-color: #CBD9CE; color: #587260; }
        .studio-category-badge.is-rp { background: #EEE4F0; border-color: #B89CBC; color: #5D4962; }
        .studio-category-badge.is-event { background: #F2F6FA; border-color: #D4DFE9; color: #3F5D7D; }
        .studio-action {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            border: 1px solid var(--decor-border);
            background: #FFF;
            color: inherit;
            border-radius: 999px;
            padding: 7px 11px;
            font: inherit;
            font-size: 11.5px;
            font-weight: 750;
            cursor: pointer;
            box-shadow: 0 1px 2px rgba(0,0,0,0.02);
            transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
        }
        .studio-action .lucide-icon { width: 14px; height: 14px; }
        .studio-action:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 14px rgba(45,48,54,0.12);
        }
        .studio-action:active { transform: translateY(0); box-shadow: 0 2px 5px rgba(45,48,54,0.08); }
        .studio-action:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
        .studio-action.danger { color: #A85252; }
        .management-view { max-width: 1040px; margin: 0 auto; padding: 30px 24px 80px; }
        .management-toolbar { margin-bottom: 20px; }
        .management-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
        .management-layout > *, .management-panel, .management-fields, .management-fields .form-item { min-width: 0; max-width: 100%; box-sizing: border-box; }
        .management-panel { background: rgba(255,255,255,0.82); border: 1px solid var(--decor-border); border-radius: 22px; padding: 24px; }
        .management-fields .upload-preview-grid { width: 100%; max-width: 100%; overflow-x: auto; overflow-y: hidden; }
        .management-panel h1 { font-size: 28px; margin-bottom: 6px; }
        .management-panel h2 { font-size: 17px; margin-bottom: 14px; }
        .management-subtitle { color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }
        .management-preview { display: flex; align-items: center; gap: 14px; padding: 12px; margin-bottom: 20px; border-radius: 14px; background: var(--decor-bg); }
        .management-preview img { width: 92px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
        .management-preview strong, .management-preview span { display: block; }
        .management-preview span { margin-top: 4px; color: var(--text-muted); font-size: 11.5px; }
        .management-save { border: 0; border-radius: 999px; padding: 11px 18px; background: var(--decor-pink); color: #303238; font: inherit; font-weight: 800; cursor: pointer; }
        .danger-panel { border-color: #E8CACA; }
        .danger-panel p { color: var(--text-muted); font-size: 12.5px; line-height: 1.7; margin-bottom: 14px; }
        .management-delete { border: 1px solid #D89797; border-radius: 999px; padding: 9px 14px; background: #FFF7F7; color: #A33F3F; font: inherit; font-weight: 800; cursor: pointer; }

        .tag-editor {
            display: flex;
            align-items: center;
            gap: 8px;
            min-height: 48px;
            padding: 7px 8px 7px 12px;
            border: 1px solid var(--decor-border);
            border-radius: 12px;
            background: var(--decor-bg);
        }
        .tag-editor:focus-within { border-color: var(--decor-pink); }
        .tag-editor-input {
            flex: 1;
            min-width: 80px;
            padding: 6px 2px;
            border: 0;
            outline: 0;
            background: transparent;
            color: #33363F;
            font: inherit;
            font-size: 13.5px;
        }
        .btn-add-tag {
            flex: 0 0 auto;
            border: 0;
            border-radius: 9px;
            padding: 8px 12px;
            background: var(--decor-pink);
            color: #33363F;
            font-weight: 800;
            cursor: pointer;
        }
        .btn-add-tag:disabled { opacity: 0.45; cursor: not-allowed; }
        .tag-chip-list { display: flex; flex-wrap: wrap; gap: 7px; min-height: 26px; }
        .selected-tag-summary { display: grid; gap: 6px; margin-top: 10px; }
        .selected-tag-summary[hidden] { display: none; }
        .selected-tag-label { color: var(--text-muted); font-size: 11.5px; font-weight: 800; }
        .preset-tag-list { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 10px; }
        .preset-tag-button {
            border: 1px solid var(--decor-border);
            border-radius: 999px;
            padding: 6px 11px;
            background: #FFFFFF;
            color: #555962;
            font: inherit;
            font-size: 12px;
            font-weight: 700;
            cursor: pointer;
            transition: background-color .16s ease, border-color .16s ease, opacity .16s ease;
        }
        .custom-tag-field[data-form-id="form-decor"] .preset-tag-button.selected { background: var(--decor-green-soft); border-color: var(--decor-green); color: var(--decor-green-dark); }
        .custom-tag-field[data-form-id="form-rp"] .preset-tag-button.selected { background: #EEE4F0; border-color: #B89CBC; color: #5D4962; }
        .preset-tag-button:disabled:not(.selected) { opacity: .4; cursor: not-allowed; }
        .tag-chip {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 5px 7px 5px 10px;
            border-radius: 999px;
            background: #F3E7E4;
            color: #5D4744;
            font-size: 12px;
            font-weight: 700;
        }
        .tag-chip-remove {
            width: 20px;
            height: 20px;
            display: inline-grid;
            place-items: center;
            padding: 0;
            border: 0;
            border-radius: 50%;
            background: transparent;
            color: inherit;
            cursor: pointer;
            font: inherit;
            font-size: 15px;
            line-height: 1;
            transition: background-color .16s ease, transform .16s ease;
        }
        .tag-chip-remove:hover { background: rgba(255,255,255,0.72); transform: scale(1.06); }
        .tag-editor-meta { display: flex; justify-content: space-between; gap: 12px; min-height: 18px; }
        .tag-help, .tag-count { color: var(--text-muted); font-size: 11.5px; }
        .tag-error { color: #A64F4F; font-size: 11.5px; font-weight: 700; }
        .visit-status-help { color: var(--text-muted); font-size: 11.5px; line-height: 1.5; }

        .form-disclaimer {
            background-color: #FFF9F3;
            border: 1px solid #FFE7D1;
            padding: 12px 16px;
            border-radius: 12px;
            font-size: 12px;
            line-height: 1.5;
            color: #C2702E;
            margin-bottom: 16px;
            font-weight: 600;
        }

        .upload-footer {
            padding: 20px 32px;
            border-top: 1px solid var(--decor-border);
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            background-color: #FFFFFF;
        }

        .btn-cancel {
            background-color: var(--decor-bg);
            border: 1px solid var(--decor-border);
            padding: 12px 24px;
            border-radius: 20px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            color: var(--decor-text);
        }

        .btn-submit-upload {
            background-color: var(--decor-pink);
            border: none;
            color: #303238;
            padding: 12px 32px;
            border-radius: 20px;
            font-weight: 700;
            font-size: 14px;
            cursor: pointer;
            box-shadow: 0 4px 10px rgba(232,197,192,0.2);
            transition: transform 0.1s, opacity 0.2s;
        }

        /* -------------------------------------------------------------
           【新加入：極具現代感的第三方登入彈窗 Modal】
           ------------------------------------------------------------- */
        .login-modal {
            display: none;
            position: fixed;
            top: 0; left: 0; width: 100vw; height: 100vh;
            z-index: 2000;
            background-color: rgba(250, 248, 245, 0.5);
            backdrop-filter: blur(16px);
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .login-modal.active { display: flex; opacity: 1; }

        #profileModal {
            --decor-bg: var(--surface-page);
            --decor-border: var(--border-default);
            --accent: var(--decor-pink);
            background-color: rgba(246, 243, 239, 0.88);
        }

        .login-container {
            width: 100%; max-width: 400px;
            background: #FFFFFF;
            border-radius: 28px;
            padding: 32px;
            box-shadow: 0 24px 60px rgba(0,0,0,0.08);
            border: 1px solid var(--decor-border);
            text-align: center;
            transform: translateY(15px);
            transition: transform 0.3s ease;
        }
        .login-modal.active .login-container { transform: translateY(0); }
        .login-modal-close-wrapper { display: flex; justify-content: flex-end; }
        .login-modal-close-btn { font-size: 22px; line-height: 1; }

        .login-logo { font-size: 32px; margin-bottom: 8px; }
        .login-heading { font-size: 22px; font-weight: 800; color: #33363F; margin-bottom: 6px; }
        .login-subheading { font-size: 13px; color: #6F7279; margin-bottom: 24px; font-weight: 500; }

        .social-login-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .social-btn {
            width: 100%;
            padding: 12px 16px;
            border-radius: 14px;
            border: 1px solid var(--decor-border);
            background-color: var(--decor-bg);
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
        }
         social-btn:hover { background-color: #FFFFFF; transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
        .social-btn.btn-discord { color: #5865F2; border-color: rgba(88, 101, 242, 0.15); background-color: rgba(88, 101, 242, 0.04); }
        .social-btn.btn-discord:hover { background-color: #5865F2; color: #FFFFFF; }
        .social-btn.btn-google { color: #EA4335; border-color: rgba(234, 67, 53, 0.15); background-color: rgba(234, 67, 53, 0.04); }
        .social-btn.btn-google:hover { background-color: #EA4335; color: #FFFFFF; }
        .social-btn.btn-facebook { color: #1877F2; border-color: rgba(24, 119, 242, 0.15); background-color: rgba(24, 119, 242, 0.04); }
        .social-btn.btn-facebook:hover { background-color: #1877F2; color: #FFFFFF; }
        .social-btn.btn-x { color: #14171A; border-color: rgba(20, 23, 26, 0.15); background-color: rgba(20, 23, 26, 0.04); }
        .social-btn.btn-x:hover { background-color: #14171A; color: #FFFFFF; }

        .reminder-container {
            max-width: 520px;
            padding: 28px;
            text-align: left;
        }

        .reminder-container .login-heading,
        .reminder-container .login-subheading {
            text-align: left;
        }

        .reminder-container .login-subheading {
            margin-bottom: 18px;
        }

        .reminder-target {
            margin: -4px 0 18px;
            padding: 10px 12px;
            overflow: hidden;
            border: 1px solid var(--theme-border);
            border-radius: 9px;
            background: var(--surface-page);
            font-size: 12px;
            font-weight: 750;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .reminder-options {
            display: grid;
            gap: 8px;
            margin-bottom: 14px;
            min-width: 0;
            border: 0;
        }

        .reminder-option {
            position: relative;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            padding: 12px 14px;
            border: 1px solid var(--theme-border);
            border-radius: 10px;
            background: #FFFFFF;
            font-size: 13px;
            font-weight: 700;
            line-height: 1.5;
            cursor: pointer;
            transition: border-color .18s ease, background-color .18s ease;
        }

        .reminder-option:hover {
            border-color: var(--accent);
        }

        .reminder-option:has(input:checked) {
            border-color: var(--accent);
            background: color-mix(in srgb, var(--accent) 9%, #FFFFFF);
        }

        .reminder-option input {
            flex: 0 0 auto;
            margin-top: 3px;
            accent-color: var(--accent);
        }

        .reminder-detail-group {
            margin: 2px 0 14px;
        }

        .reminder-detail-group label {
            display: block;
            margin-bottom: 7px;
            font-size: 12.5px;
            font-weight: 750;
        }

        .reminder-privacy-note {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            margin: 14px 0 20px;
            padding: 10px 12px;
            border-radius: 9px;
            background: var(--surface-page);
            color: var(--text-secondary);
            font-size: 11.5px;
            line-height: 1.55;
        }

        .reminder-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
        }

        .detail-action:disabled {
            opacity: .58;
            cursor: default;
        }

        /* -------------------------------------------------------------
            【三大板塊主題專屬 class 控制切換】
           ------------------------------------------------------------- */
         
        /* 1. 房屋裝潢（暖米白 & 鼠尾草綠） */
        body.theme-decor {
            --theme-page-bg: var(--page-decor-bg);
            --theme-card: var(--decor-card);
            --theme-text: var(--decor-text);
            --decor-bg: #F4F7F3;
            --decor-border: var(--decor-green-border);
            --theme-border: var(--decor-green-border);
            --accent: var(--decor-green);
            background-color: var(--theme-page-bg) !important;
            color: var(--theme-text) !important;
        }
        body.theme-decor .navbar { background-color: rgba(255, 255, 255, 0.9); border-color: rgba(0,0,0,0.03); }
        body.theme-decor .nav-item.active { background-color: var(--decor-green); color: var(--decor-text); }
        body.theme-decor .btn-login { background-color: var(--decor-green-dark); color: #FFFFFF; }
        body.theme-decor .logo-icon { background-color: var(--decor-green); color: #253129; }
        body.theme-decor .btn-toggle-filters, body.theme-decor .filter-pill { background-color: var(--decor-card); border-color: var(--decor-border); }
        body.theme-decor .advanced-filter-drawer { background-color: var(--decor-card); border-color: var(--decor-border); }
        body.theme-decor .drawer-input, body.theme-decor .drawer-select { background-color: var(--decor-bg); border-color: var(--decor-border); }
        body.theme-decor .pin-card { background-color: var(--decor-card); border: 1px solid var(--decor-border); }
        body.theme-decor .author-avatar { background-color: var(--decor-green); color: #253129; }
        body.theme-decor .pin-likes { color: var(--decor-green-dark); }

        /* 2. RP店面（粉霧薰衣草紫 & 馬卡龍紫） */
        body.theme-rp {
            --theme-page-bg: var(--page-rp-bg);
            --theme-card: var(--rp-card);
            --theme-text: var(--rp-text);
            --theme-border: var(--rp-border);
            --accent: var(--rp-purple);
            background-color: var(--theme-page-bg) !important;
            color: var(--theme-text) !important;
        }
        body.theme-rp .navbar { background-color: rgba(255, 255, 255, 0.9); border-color: var(--rp-border); }
        body.theme-rp .nav-item.active { background-color: var(--rp-purple); color: #FFFFFF; }
        body.theme-rp .btn-login, body.theme-rp .logo-icon { background-color: var(--rp-purple); color: #FFFFFF; }
        body.theme-rp .btn-toggle-filters, body.theme-rp .filter-pill { background-color: var(--rp-card); border-color: var(--rp-border); }
        body.theme-rp .advanced-filter-drawer { background-color: var(--rp-card); border-color: var(--rp-border); }
        body.theme-rp .drawer-input, body.theme-rp .drawer-select { background-color: var(--rp-bg); border-color: var(--rp-border); }
        body.theme-rp .pin-card { background-color: var(--rp-card); border: 1px solid var(--rp-border); }
        body.theme-rp .author-avatar { background-color: var(--rp-purple); color: #FFFFFF; }
        body.theme-rp .pin-likes { color: var(--rp-purple); }

        /* 3. 活動舉辦（粉霧燕麥蜜橘 & 活力復古橘） */
        body.theme-event {
            --theme-page-bg: var(--page-event-bg);
            --theme-card: var(--event-card);
            --theme-text: var(--event-text);
            --theme-border: var(--event-border);
            --accent: var(--event-orange);
            background-color: var(--theme-page-bg) !important;
            color: var(--theme-text) !important;
        }
        body.theme-event .navbar { background-color: rgba(255, 255, 255, 0.9); border-color: var(--event-border); }
        body.theme-event .nav-item.active { background-color: var(--event-orange); color: #FFFFFF; }
        body.theme-event .btn-login, body.theme-event .logo-icon { background-color: var(--event-orange); color: #FFFFFF; }
        body.theme-event .btn-toggle-filters, body.theme-event .filter-pill { background-color: var(--event-card); border-color: var(--event-border); }
        body.theme-event .advanced-filter-drawer { background-color: var(--event-card); border-color: var(--event-border); }
        body.theme-event .drawer-input, body.theme-event .drawer-select { background-color: var(--event-bg); border-color: var(--event-border); }
        body.theme-event .pin-card { background-color: var(--event-card); border: 1px solid var(--event-border); }
        body.theme-event .author-avatar { background-color: var(--event-orange); color: #FFFFFF; }
        body.theme-event .pin-likes { color: var(--event-orange); }

        /* 配合主題動態改變日曆遮罩的漸變顏色 */
        body.theme-decor .calendar-mask-container::before { background: linear-gradient(to right, var(--decor-bg) 0%, rgba(250, 248, 245, 0) 100%); }
        body.theme-decor .calendar-mask-container::after { background: linear-gradient(to left, var(--decor-bg) 0%, rgba(250, 248, 245, 0) 100%); }

        body.theme-rp .calendar-mask-container::before { background: linear-gradient(to right, var(--rp-bg) 0%, rgba(245, 240, 246, 0) 100%); }
        body.theme-rp .calendar-mask-container::after { background: linear-gradient(to left, var(--rp-bg) 0%, rgba(245, 240, 246, 0) 100%); }

        body.theme-event .calendar-mask-container::before { background: linear-gradient(to right, var(--event-bg) 0%, rgba(249, 243, 238, 0) 100%); }
        body.theme-event .calendar-mask-container::after { background: linear-gradient(to left, var(--event-bg) 0%, rgba(249, 243, 238, 0) 100%); }

        /* -------------------------------------------------------------
           【優化 3 & 4：新增響應式媒體查詢（RWD）與樣式抽離】
           ------------------------------------------------------------- */
        @media (max-width: 992px) {
            .drawer-grid {
                grid-template-columns: repeat(2, 1fr); /* 平板尺寸改為雙欄 */
            }
            .drawer-group.span-2 {
                grid-column: span 2;
            }
        }

        @media (max-width: 768px) {
            .drawer-grid {
                grid-template-columns: 1fr; /* 手機尺寸改為大氣單欄 */
            }
            .drawer-group.span-2 {
                grid-column: span 1;
            }
            .detail-view { padding: 20px 16px 60px; }
            .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
            #detailContent, .detail-layout, .detail-gallery, .detail-primary-panel, .detail-sections, .detail-info-panel, .detail-section { width: 100%; max-width: none; min-width: 0; box-sizing: border-box; }
            .detail-gallery { grid-column: 1; grid-row: 1; }
            .detail-sidebar { grid-column: 1; grid-row: 2; width: 100%; }
            .detail-primary-panel { grid-column: auto; grid-row: auto; }
            .detail-sections { grid-column: 1; grid-row: 3; }
            .detail-info-panel { grid-column: auto; grid-row: auto; position: relative; }
            .detail-info-toggle { display: flex; }
            .detail-info-desktop-title { display: none; }
            .detail-info-collapsible { display: none; margin-top: 14px; }
            .detail-info-panel.is-open .detail-info-collapsible { display: block; }
            .detail-image-stage { max-height: 58svh; border-radius: 18px; }
            .detail-main-image { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; object-fit: contain; border-radius: 0; }
            .detail-thumbnails { gap: 7px; }
            .detail-thumbnail img { width: 82px; }
            .management-layout { grid-template-columns: 1fr; }
            .btn-toggle-filters {
                width: auto;
                height: auto;
                min-height: 44px;
                padding: 8px 14px;
                gap: 6px;
            }
            #filterButtonLabel {
                position: static;
                padding: 0;
                background: transparent;
                color: inherit;
                box-shadow: none;
                opacity: 1;
                visibility: visible;
                transform: none;
                transition: none;
            }
            .btn-toggle-filters:hover #filterButtonLabel,
            .btn-toggle-filters:focus-visible #filterButtonLabel {
                transform: none;
            }
        }

        @media (max-width: 576px) {
            .upload-modal { align-items: flex-end; }
            .upload-container {
                height: 95dvh;
                max-width: none;
            }
            .upload-header { padding: 20px 20px 8px; }
            .upload-tabs { padding: 8px 20px 16px; gap: 8px; }
            .upload-tab-btn { padding: 11px 8px; }
            .upload-body { padding: 20px; }
            .upload-footer { padding-left: 20px; padding-right: 20px; }
            .form-grid-2 { grid-template-columns: 1fr; gap: 0; }
            .nav-item span { display: none; } /* 導覽列只保留 Icon */
            .nav-item { padding: 10px; }
            .btn-login { padding: 9px 14px; }
            .notification-panel {
                position: fixed;
                top: 76px;
                right: 12px;
                left: 12px;
                width: auto;
                max-height: calc(100dvh - 92px);
            }
            .reminder-container {
                width: calc(100% - 24px);
                max-height: calc(100dvh - 24px);
                overflow-y: auto;
                padding: 22px;
                border-radius: 20px;
            }
            .gallery-summary { flex-direction: column; gap: 14px; }
            .gallery-actions { width: 100%; justify-content: space-between; }
            .gallery-count { align-self: auto; }
            .filter-section, .calendar-section { padding-left: 16px; padding-right: 16px; }
            .calendar-section .filter-header-bar { align-items: stretch; flex-direction: column; gap: 12px; }
            .calendar-section .filter-group-container { justify-content: flex-end; }
            .calendar-week-grid { padding-left: 46px; padding-right: 46px; }
            .calendar-day-card { min-width: 72px; }
            .pin-context-row, .pin-address-row { align-items: flex-start; }
            .management-view { padding-left: 16px; padding-right: 16px; }
            .detail-toolbar { align-items: flex-start; }
            .detail-actions { gap: 5px; }
            .detail-action { padding: 9px 11px; }
            .detail-gallery-nav { width: 38px; height: 38px; }
            .detail-thumbnail img { width: 92px; }
            .detail-panel, .detail-section { padding: 18px; }
            .detail-info-grid { grid-template-columns: 1fr; }
        }

        /* =============================================================
           2026 視覺重整：玩家作品圖鑑／安靜編輯式版面
           ============================================================= */
        body {
            background: var(--theme-page-bg) !important;
            color: var(--theme-text) !important;
            line-height: 1.55;
            transition: background-color .25s ease;
        }
        body.theme-decor { background: var(--theme-page-bg) !important; }
        body.theme-rp { background: var(--theme-page-bg) !important; }
        body.theme-event { background: var(--theme-page-bg) !important; }
        body.theme-decor .detail-image-stage,
        body.theme-rp .detail-image-stage,
        body.theme-event .detail-image-stage { background: var(--theme-page-bg); }
        body.theme-decor .detail-main-image,
        body.theme-rp .detail-main-image,
        body.theme-event .detail-main-image { background: transparent; }
        #filterToggleButton[hidden], #sortSelect[hidden] { display: none !important; }

        .navbar,
        body.theme-decor .navbar,
        body.theme-rp .navbar,
        body.theme-event .navbar {
            background: rgba(255,255,255,0.96);
            border-bottom: 1px solid #E5E2DD;
            backdrop-filter: none;
        }
        .brand-logo { gap: 10px; }
        .logo-icon,
        body.theme-decor .logo-icon,
        body.theme-rp .logo-icon,
        body.theme-event .logo-icon {
            width: 30px;
            height: 30px;
            background: #EEE5E1;
            color: #4A4C52;
            box-shadow: none;
        }
        .brand-logo:hover .logo-icon { transform: none; }
        .logo-title { font-size: 17px; font-weight: 800; letter-spacing: 0; }
        .nav-menu { gap: 22px; }
        .nav-item {
            padding: 9px 2px 7px;
            border-radius: 0;
            border-bottom: 2px solid transparent;
            font-size: 15px;
            font-weight: 700;
            gap: 7px;
        }
        .nav-item:hover { background: transparent; color: #1E2025; }
        .nav-item.active,
        body.theme-decor .nav-item.active,
        body.theme-rp .nav-item.active,
        body.theme-event .nav-item.active {
            background: transparent;
            color: #25272C;
            box-shadow: none;
        }
        body.theme-decor .nav-item.active { border-bottom-color: var(--decor-green-dark); }
        body.theme-rp .nav-item.active { border-bottom-color: #7F6586; }
        body.theme-event .nav-item.active { border-bottom-color: #4F6F91; }
        .btn-login {
            border-radius: 8px;
            padding: 9px 16px;
            box-shadow: none;
        }
        .user-avatar { box-shadow: none; }
        .profile-dropdown { border-radius: 10px; box-shadow: 0 12px 30px rgba(32,34,38,0.10); }

        .gallery-summary,
        .filter-section,
        .calendar-section,
        .gallery-container {
            max-width: 1240px;
        }
        .gallery-summary {
            margin: 28px auto 10px;
            padding: 0 24px;
            align-items: flex-end;
        }
        .gallery-heading {
            font-size: clamp(30px, 4vw, 42px);
            line-height: 1.1;
            letter-spacing: -1.2px;
            font-weight: 850;
        }
        .gallery-description { margin-top: 9px; font-size: 13.5px; }
        .gallery-actions { gap: 8px; }
        .gallery-count {
            padding: 8px 4px;
            border: 0;
            border-radius: 0;
            background: transparent;
            font-size: 12px;
        }
        .sort-select,
        .btn-toggle-filters {
            min-height: 38px;
            border-radius: 8px;
            border-color: #DCD8D2;
            background: #FFFFFF;
            box-shadow: none;
        }
        @media (max-width: 768px) {
            .btn-toggle-filters { min-height: 44px; }
        }

        .filter-section { padding: 0 24px; margin-bottom: 12px; }
        .advanced-filter-drawer,
        body.theme-decor .advanced-filter-drawer,
        body.theme-rp .advanced-filter-drawer {
            padding: 20px;
            border: 1px solid #E1DDD7;
            border-radius: 10px;
            background: #FFFFFF;
            box-shadow: none;
        }
        .drawer-input,
        .drawer-select,
        body.theme-decor .drawer-input,
        body.theme-decor .drawer-select,
        body.theme-rp .drawer-input,
        body.theme-rp .drawer-select {
            border-radius: 7px;
            background: #FAF9F7;
        }
        .applied-filter-chip,
        .filter-pill,
        body.theme-decor .filter-pill,
        body.theme-rp .filter-pill,
        body.theme-event .filter-pill {
            border-radius: 6px;
            box-shadow: none;
        }
        .filter-pill.selected {
            background: #33353A !important;
            border-color: #33353A !important;
            color: #FFFFFF !important;
        }
        body.theme-decor .filter-pill.selected {
            background: var(--decor-green-dark) !important;
            border-color: var(--decor-green-dark) !important;
        }

        .gallery-container { padding: 0 24px 80px; }
        .pin-card,
        body.theme-decor .pin-card,
        body.theme-rp .pin-card,
        body.theme-event .pin-card {
            overflow: hidden;
            border: 1px solid #E0DDD8;
            border-radius: 9px;
            background: #FFFFFF;
            box-shadow: none;
        }
        .pin-card:hover {
            transform: translateY(-2px);
            border-color: #C8C3BC;
            box-shadow: 0 8px 18px rgba(36,38,42,0.05);
        }
        .event-updated-badge {
            display: inline-flex;
            width: fit-content;
            margin-bottom: 8px;
            padding: 3px 7px;
            border: 1px solid #D9B99E;
            border-radius: 5px;
            color: #8F542C;
            background: #FFF8F1;
            font-size: 11px;
            font-weight: 800;
        }
        .event-update-notice {
            margin-top: 14px;
            padding: 12px 14px;
            border-left: 3px solid #B87842;
            background: #FFF8F1;
            color: #65452F;
            font-size: 12.5px;
            line-height: 1.6;
        }
        .event-update-notice strong { display: block; margin-bottom: 2px; }
        .management-fields { display: grid; gap: 16px; }
        .management-color-list { display: flex; flex-wrap: wrap; gap: 10px; }
        .management-color-button {
            width: 34px; height: 34px; border: 2px solid transparent; border-radius: 50%; cursor: pointer;
        }
        .management-color-button.selected { border-color: #303238; box-shadow: 0 0 0 2px #fff inset; }
        .management-lock-note { padding: 12px 14px; border-radius: 7px; background: #F4EFEA; color: #72553F; font-size: 12.5px; }
        .rp-standard-grid .pin-image-wrapper { aspect-ratio: 16 / 10; }
        .pin-card:hover .pin-image { transform: scale(1.01); }
        .pin-details { padding: 14px 15px 15px; }
        .pin-title {
            margin-bottom: 9px;
            font-size: 15px;
            line-height: 1.45;
            font-weight: 760;
            max-width: 100%;
            min-height: 2.9em;
            overflow-wrap: anywhere;
            word-break: break-word;
            display: -webkit-box;
            overflow: hidden;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
        }
        .pin-tags { gap: 5px; margin-bottom: 10px; }
        .pin-tag {
            min-height: 21px;
            padding: 2px 7px;
            border-radius: 4px;
            background: transparent !important;
            border-color: #DCD8D2 !important;
            font-size: 10.5px;
            font-weight: 650;
        }
        .visit-status-badge,
        .status-badge,
        .overlay-tag {
            border-radius: 5px;
            box-shadow: none;
            backdrop-filter: none;
            font-weight: 750;
        }
        .visit-status-badge { padding: 4px 7px; }
        .pin-context-row, .pin-address-row { margin-bottom: 11px; }
        .pin-meta { padding-top: 10px; border-top: 1px solid #ECE9E5; }
        .author-avatar { width: 24px; height: 24px; }
        .author-group { min-width: 0; flex: 1 1 auto; overflow: hidden; }
        .author-name { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

        .event-wide-grid { max-width: 1080px; gap: 16px; }
        .event-wide-grid .pin-card { min-height: 220px; }
        .event-wide-grid .pin-image-wrapper { width: 38%; }
        .event-wide-grid .pin-details { width: 62%; padding: 20px 22px; }
        .calendar-section { margin-top: 10px; padding: 0 24px; }
        .calendar-section .filter-group-container { align-items: center; }
        .calendar-section .gallery-count { margin-right: 2px; white-space: nowrap; }
        .calendar-day-card {
            min-width: 72px;
            border-radius: 7px;
            box-shadow: none !important;
        }
        .calendar-nav-btn { border-radius: 7px; box-shadow: none; }

        .detail-view { max-width: 1180px; padding-top: 38px; }
        .detail-main-image { border-radius: 10px; }
        .detail-panel,
        .detail-section,
        body.theme-rp .detail-panel,
        body.theme-rp .detail-section,
        body.theme-event .detail-panel,
        body.theme-event .detail-section {
            border-radius: var(--radius-panel);
            border-color: #E0DDD8;
            box-shadow: none;
            background: var(--surface-card);
        }
        .btn-back-detail,
        .detail-action { border-radius: 7px; background: #FFFFFF; }
        .detail-thumbnail { border-radius: 6px; }
        .detail-info-grid { border-radius: 7px; }
        .detail-note { border-radius: 7px; }

        .upload-container,
        .login-container { border-radius: var(--radius-card); box-shadow: var(--shadow-modal); }
        .login-logo { font-size: 13px; font-weight: 850; letter-spacing: 0.12em; }
        .upload-header { padding-bottom: 12px; }
        .upload-tabs { gap: 20px; }
        .upload-tab-btn {
            border: 0;
            border-bottom: 2px solid transparent;
            border-radius: 0;
            background: transparent !important;
            padding: 10px 4px;
        }
        .upload-tab-btn.active { color: #2F3136 !important; border-bottom-color: currentColor; box-shadow: none; }
        .form-input,
        .form-select,
        .form-textarea,
        .tag-editor,
        .file-upload-box,
        .choice-card span { border-radius: var(--radius-control); }
        .btn-cancel,
        .btn-submit-upload,
        .management-save,
        .management-delete,
        .studio-action { border-radius: 7px; }
        .management-panel { border-radius: 10px; box-shadow: none; }

        .studio-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 16px; }
        .studio-list .pin-card {
            display: grid;
            grid-template-columns: 180px minmax(0, 1fr);
            height: 300px;
            min-height: 300px;
            border: 1px solid #E0DDD8;
            background: #FFFFFF;
        }
        .studio-list .pin-image-wrapper { width: 180px; height: 100%; min-height: 0; aspect-ratio: auto; }
        .studio-list .pin-image { width: 100%; height: 100%; object-fit: cover; }
        .studio-list .pin-details { display: flex; min-width: 0; height: 100%; flex-direction: column; overflow: hidden; }
        .studio-list .pin-meta { margin-top: auto; }
        .studio-list .studio-card-actions { margin-top: 10px; }

        @media (max-width: 992px) {
            .studio-list { grid-template-columns: 1fr; }
        }
        @media (max-width: 768px) {
            .nav-menu { gap: 10px; }
            .filter-section, .calendar-section, .gallery-container { padding-left: 16px; padding-right: 16px; }
            .rp-standard-grid { grid-template-columns: 1fr; gap: 16px; }
            .studio-list .pin-card { grid-template-columns: 1fr; height: auto; min-height: 0; }
            .studio-list .pin-image-wrapper { width: 100%; height: 220px; min-height: 220px; }
            .studio-list .pin-details { height: auto; overflow: visible; }
            .studio-list .pin-meta { margin-top: 12px; }
            .upload-container { border-radius: 14px 14px 0 0; }
        }
html { overflow-y: scroll; }
[hidden] { display: none !important; }
.service-mode-badge { display:inline-flex; align-items:center; margin-left:6px; padding:4px 7px; border-radius:5px; background:#F2E7F4; color:#6D5575; font-size:11px; font-weight:800; }
.drawer-group[hidden] { display: none !important; }
.pin-address-actions { display:flex; align-items:center; gap:5px; }
.calendar-section .filter-header-bar { display:none; }
.calendar-day-card.year-odd { background: #FFF9F0 !important; }
.calendar-day-card.year-even { background: #F4F7FB !important; }
.calendar-day-card.active { background: var(--event-orange) !important; }
.decor-detail-panel { position: relative; }
.decor-detail-panel .detail-color-icons { position: absolute; top: 20px; right: 22px; margin: 0; }
.decor-detail-panel .detail-kicker { padding-right: 72px; }
.event-detail-panel .detail-info-item:nth-child(3),
.event-detail-panel .detail-info-item:nth-child(4) { grid-column: 1 / -1; }
.event-detail-panel .detail-info-item:nth-child(3) strong,
.event-detail-panel .detail-info-item:nth-child(4) strong { white-space: pre-line; overflow-wrap: anywhere; }
.detail-info-link { color: inherit; text-decoration: none; overflow-wrap: anywhere; transition: color .16s ease; }
.detail-info-link:hover { color: var(--accent); }
.detail-info-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 2px; }
.rp-detail-panel .detail-info-item:nth-child(5) { grid-column: 1 / -1; }
.rp-detail-panel .detail-info-item:nth-child(5) strong { white-space: pre-line; }
.detail-info-item strong { font-weight: 500; }
.detail-filter-link { display: block; width: 100%; min-width: 0; max-width: 100%; border: 0; padding: 0; background: transparent; color: inherit; font: inherit; font-weight: 500; text-align: left; cursor: pointer; white-space: normal; overflow-wrap: anywhere; word-break: break-word; text-decoration: none; transition: color .16s ease; }
body.theme-decor .detail-filter-link:hover { color: var(--decor-green-dark); }
body.theme-decor .detail-thumbnail.active { border-color: var(--decor-green); }
body.theme-rp .detail-filter-link:hover { color: #76547F; }
body.theme-event .detail-filter-link:hover { color: #3F5D7D; }
.detail-filter-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 2px; }
.detail-color-button { width: 19px; height: 19px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.detail-color-button:hover { transform: translateY(-1px); }
.detail-color-button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }
html:not(.keyboard-navigation) .nav-item:focus,
html:not(.keyboard-navigation) .nav-item:focus-visible { outline: none; }
html.keyboard-navigation .nav-item:focus,
html.keyboard-navigation .nav-item:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

body.theme-home {
    --theme-page-bg: var(--page-home-bg);
    --theme-card: var(--surface-card);
    --theme-text: var(--text-primary);
    --theme-border: var(--border-default);
    --accent: var(--decor-pink);
    background: var(--theme-page-bg) !important;
    color: var(--theme-text) !important;
}
body.theme-home .navbar { background: rgba(255,255,255,.96); border-color: #E5E2DD; }
body.theme-community {
    --theme-page-bg: var(--page-home-bg);
    --theme-card: var(--surface-card);
    --theme-text: var(--text-primary);
    --theme-border: var(--border-default);
    --decor-bg: var(--surface-page);
    --decor-border: var(--border-default);
    --accent: var(--decor-pink);
    background: var(--theme-page-bg) !important;
    color: var(--theme-text) !important;
}
body.theme-community .navbar {
    background: rgba(255,255,255,.96);
    border-color: #E5E2DD;
}
.discovery-home { max-width: 1240px; margin: 0 auto; padding: 42px 24px 88px; }
.discovery-hero { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(300px,.55fr); gap: 52px; align-items: end; padding: 20px 0 34px; border-bottom: 1px solid #DED9D2; }
.discovery-eyebrow { color: #8A6855; font-size: 12px; font-weight: 850; letter-spacing: .12em; }
.discovery-hero h1 { max-width: 820px; margin-top: 9px; font-size: clamp(30px,3.2vw,40px); line-height: 1.15; letter-spacing: -1.3px; white-space: nowrap; }
.discovery-hero h1 { min-height: 2.3em; }
.discovery-hero p { color: #676A72; font-size: 14px; line-height: 1.8; }
.discovery-quick-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.discovery-quick-link, .discovery-panel-link { border: 1px solid #D9D4CD; border-radius: 7px; background: #FFF; color: #34363B; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.discovery-quick-link { padding: 9px 12px; }
.discovery-quick-link:hover, .discovery-panel-link:hover { border-color: #AAA39B; }
.discovery-stage { margin-top: 30px; }
.discovery-feature { position: relative; min-width: 0; min-height: 430px; overflow: hidden; border: 1px solid #D9D4CD; border-radius: 12px; background: #EAE6E1; cursor: pointer; transition: filter .18s ease; }
.discovery-feature:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.discovery-feature:hover { filter: brightness(.97); transform: none; }
.discovery-feature-image { width: 100%; height: 100%; min-height: 430px; display: block; object-fit: cover; background: #EEEAE5; transition: transform .45s ease; }
.discovery-feature:hover .discovery-feature-image { transform: scale(1.035); }
.discovery-feature::after { content: ""; position: absolute; inset: 35% 0 0; background: linear-gradient(to bottom, transparent, rgba(18,19,22,.82)); pointer-events: none; }
.discovery-feature-copy { position: absolute; z-index: 1; inset: auto 0 0; min-width: 0; padding: 34px; color: #FFF; }
.discovery-feature-status { display: inline-flex; margin-bottom: 12px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.9); color: #4A4039; font-size: 11px; font-weight: 850; }
.discovery-feature h2 { max-width: 720px; font-size: clamp(25px,2.5vw,36px); line-height: 1.22; overflow-wrap: anywhere; text-shadow: 0 1px 18px rgba(0,0,0,.28); }
.discovery-feature-reason { margin-top: 9px; color: rgba(255,255,255,.86); font-size: 13px; line-height: 1.6; }
.discovery-secondary-grid { display: grid; gap: 26px; margin-top: 42px; }
.discovery-panel { min-width: 0; padding-top: 22px; border-top: 1px solid #D8D3CC; }
.discovery-panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.discovery-panel h2 { font-size: 19px; line-height: 1.35; }
.discovery-panel-link { flex: 0 0 auto; padding: 5px 8px; font-size: 11px; font-weight: 750; }
.discovery-card-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.discovery-card-list > .discovery-empty { grid-column: 1 / -1; }
.discovery-card { display: grid; grid-template-columns: 126px minmax(0,1fr); min-height: 104px; overflow: hidden; border: 1px solid #E2DED8; border-radius: 8px; background: #FFF; cursor: pointer; text-align: left; transition: border-color .18s ease, transform .18s ease; }
.discovery-card:hover { border-color: #BFB8B0; transform: translateY(-1px); }
.discovery-card:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.discovery-card img { width: 100%; height: 100%; min-height: 104px; object-fit: cover; transition: transform .4s ease; }
.discovery-card:hover img { transform: scale(1.05); }
.discovery-card-copy { min-width: 0; padding: 12px 13px; }
.discovery-card-meta { display: flex; align-items: center; gap: 7px; color: #6F7279; font-size: 10.5px; font-weight: 750; }
.discovery-category-dot { width: 7px; height: 7px; border-radius: 50%; background: #86A58D; }
.discovery-category-dot.rp { background: #8E7395; }
.discovery-category-dot.event { background: #4F6F91; }
.discovery-card h3 { margin: 5px 0 7px; overflow: hidden; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.discovery-card-reason { color: #6F7279; font-size: 11.5px; line-height: 1.45; }
.discovery-empty { min-height: 104px; display: grid; place-items: center; padding: 18px; border: 1px dashed #D8D2CB; border-radius: 8px; color: #6F7279; font-size: 12px; text-align: center; }

.related-section { margin-top: 34px; padding-top: 28px; border-top: 1px solid #DDD8D1; }
.related-heading-row { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.related-heading-row h2 { font-size: 22px; }
.related-heading-row p { margin-top: 4px; color: #74777E; font-size: 12px; }
.related-filter-list { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 15px; }
.related-filter-chip { border: 1px solid #D9D4CD; border-radius: 999px; padding: 6px 10px; background: rgba(255,255,255,.72); color: #55585F; font: inherit; font-size: 11px; font-weight: 750; cursor: pointer; }
.related-filter-chip:hover { border-color: #AAA39B; color: #303238; }
.related-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.related-card { overflow: hidden; border: 1px solid #DDD9D3; border-radius: 9px; background: #FFF; cursor: pointer; }
.related-card:hover { border-color: #BEB7AF; transform: translateY(-2px); }
.related-card:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.related-card img { width: 100%; aspect-ratio: 16/10; display: block; object-fit: cover; background: #EEEAE5; transition: transform .4s ease; }
.related-card { overflow: hidden; }
.related-card:hover img { transform: scale(1.05); }
.related-card-copy { padding: 12px; }
.related-card-reason { color: #8A6855; font-size: 10.5px; font-weight: 800; }
.related-card h3 { margin-top: 5px; font-size: 13.5px; line-height: 1.4; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.related-empty { padding: 28px; border: 1px dashed #D8D2CB; border-radius: 9px; color: #6F7279; text-align: center; font-size: 12px; }
@media (max-width: 992px) {
    .discovery-hero { grid-template-columns: 1fr; gap: 14px; }
    .discovery-hero h1 { white-space: normal; }
    .discovery-feature { min-height: 340px; }
    .discovery-feature-image { min-height: 340px; aspect-ratio: 16/9; }
    .discovery-card-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 768px) {
    .discovery-home { padding: 28px 16px 64px; }
    .discovery-hero { padding: 10px 0 24px; }
    .discovery-hero h1 { max-width: 430px; font-size: clamp(30px,9vw,36px); }
    .discovery-stage { margin-top: 22px; }
    .discovery-feature { min-height: 260px; }
    .discovery-feature-image { min-height: 260px; }
    .discovery-feature-copy { padding: 24px 20px; }
    .discovery-secondary-grid { margin-top: 32px; }
    .discovery-card-list { display: flex; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
    .discovery-card { grid-template-columns: 106px minmax(0,1fr); flex: 0 0 min(86vw,360px); scroll-snap-align: start; }
}
@media (max-width: 576px) {
    .related-grid { grid-template-columns: 1fr; }
}

/* 介紹欄位：固定可視高度，超出內容在欄位內捲動，不影響整體表單動線。 */
textarea[data-line-limit] {
    max-height: 15.5em;
    overflow-y: auto;
    resize: none;
}
.profile-settings-container { max-width: 520px; text-align: left; }
.profile-settings-container .login-heading, .profile-settings-container .login-subheading { text-align: left; }
.profile-settings-avatar { display: flex; align-items: center; gap: 12px; padding: 14px; margin: 18px 0; border-radius: 12px; background: #F7F4F1; color: var(--text-muted); font-size: 12px; cursor: pointer; }
.profile-settings-avatar .user-avatar { display: grid; width: 46px; height: 46px; }
.profile-settings-avatar:hover { background: #F0ECE7; }
.profile-settings-avatar:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.profile-settings-avatar input { position:absolute; width:1px; height:1px; opacity:0; }
.profile-bio-limit-message {
    margin-top: 6px;
    color: #B24E4E;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
}
.profile-social-links-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.profile-social-link-count {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 750;
}
.profile-social-link-list {
    display: grid;
    gap: 8px;
}
.profile-social-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
    align-items: center;
}
.profile-social-link-row .form-input { min-width: 0; }
.profile-social-link-remove,
.profile-social-link-add {
    min-height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: #FFF;
    color: var(--text-main);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}
.profile-social-link-remove:hover,
.profile-social-link-add:hover { border-color: var(--accent); background: #FAF7F4; }
.profile-social-link-remove:focus-visible,
.profile-social-link-add:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.profile-social-link-remove {
    display: grid;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    place-items: center;
    border-color: transparent;
    background: transparent;
    color: var(--text-muted);
    line-height: 1;
}
.profile-social-link-remove:hover {
    border-color: #E2D8D1;
    background: #F8F4F1;
    color: #A85252;
}
.profile-social-link-remove-icon { width: 17px; height: 17px; }
.profile-social-link-add { width: 100%; margin-top: 8px; }
.profile-social-link-add[hidden] { display: none; }
.profile-social-link-message {
    margin-top: 6px;
    color: #A85252;
    font-size: 11px;
    font-weight: 700;
}
.author-profile-links {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}
.author-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #FFF;
    color: var(--text-main);
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}
.author-profile-link:hover { border-color: var(--accent); background: #FAF7F4; transform: translateY(-1px); }
.author-profile-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.author-profile-link .external-platform-icon { width: 15px; height: 15px; flex: 0 0 auto; }
.author-profile-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-save-button { width: 100%; }
.rp-schedule-list { display: grid; gap: 8px; margin-top: 8px; }
.rp-schedule-row { display: grid; grid-template-columns: 54px 100px minmax(112px,1fr) auto minmax(112px,1fr) 42px; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid #E4DDD6; border-radius: 10px; background: #FAF8F6; }
.rp-schedule-row > strong { font-size: 12px; }
.rp-schedule-row .form-select, .rp-schedule-row .form-input { min-width: 0; padding: 9px 10px; }
.rp-schedule-separator { color: var(--text-muted); font-size: 12px; }
.rp-overnight-note { color: var(--accent); font-size: 11px; font-weight: 700; white-space: nowrap; }
.rp-schedule-row.is-closed,
.rp-schedule-row.is-all-day { grid-template-columns: 54px minmax(160px,240px); }
.rp-schedule-row.is-closed .rp-time-input,
.rp-schedule-row.is-closed .rp-schedule-separator,
.rp-schedule-row.is-closed .rp-overnight-note,
.rp-schedule-row.is-all-day .rp-time-input,
.rp-schedule-row.is-all-day .rp-schedule-separator,
.rp-schedule-row.is-all-day .rp-overnight-note { display: none; }
.like-undo-toast { position: fixed; left: 50%; bottom: 28px; z-index: 1400; display: flex; align-items: center; gap: 18px; max-width: calc(100% - 32px); padding: 12px 14px 12px 18px; border-radius: 12px; background: #33363F; color: #FFF; box-shadow: 0 12px 34px rgba(0,0,0,.24); opacity: 0; transform: translate(-50%, 16px); transition: opacity .18s ease, transform .18s ease; pointer-events: none; }
.like-undo-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.like-undo-toast[hidden] { display: none; }
.like-undo-toast button { border: 0; padding: 6px 8px; background: transparent; color: #F4C5BD; font: inherit; font-weight: 800; cursor: pointer; }
.like-undo-toast button:hover { color: #FFF; text-decoration: underline; }
.like-undo-toast button:focus-visible { outline: 2px solid #FFF; outline-offset: 2px; border-radius: 5px; }
.author-profile-description {
    grid-column: 2;
    width: 100%;
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    box-sizing: border-box;
    color: var(--text-muted);
}
.author-profile-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
.author-profile-text {
    display: block;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.7;
}
.author-profile-summary {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-items: start;
    column-gap: 20px;
    width: min(100%, 860px);
}
.author-profile-avatar {
    grid-column: 1;
    grid-row: 1;
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,.9);
    border-radius: 50%;
    background: var(--accent-green);
    color: #FFF;
    box-shadow: none;
    font-size: 28px;
    font-weight: 850;
    align-self: center;
}
.author-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.author-profile-summary .gallery-heading {
    grid-column: 2;
    align-self: center;
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.1;
}
body.author-profile-page .gallery-summary {
    align-items: center;
    margin-bottom: 30px;
}
body.author-profile-page .gallery-summary > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
}
body.author-profile-page .gallery-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: end;
    gap: 8px 10px;
}
body.author-profile-page .gallery-actions > :not(#studioCategorySelect):not(.gallery-count):not(.author-workspace-actions) {
    display: none;
}
.author-profile-mode-badge {
    grid-column: 2;
    width: fit-content;
    margin-top: 8px;
    padding: 5px 9px;
    border: 1px solid #D8D2CB;
    border-radius: 999px;
    background: #FFF;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}
.author-workspace-actions {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.author-workspace-action {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 11px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: #FFF;
    color: var(--text-main);
    font: inherit;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.author-workspace-action:hover {
    border-color: var(--accent);
    box-shadow: 0 6px 14px rgba(45,48,54,.1);
    transform: translateY(-1px);
}
.author-workspace-action:focus-visible {
    outline: 2px solid var(--focus-ring);
    outline-offset: 2px;
}
.author-workspace-action.primary {
    background: var(--text-main);
    border-color: var(--text-main);
    color: #FFF;
}
body.author-profile-page .author-profile-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 26px 22px;
}
body.author-profile-page .studio-library-card .pin-details {
    display: flex;
    flex: 0 0 240px;
    flex-direction: column;
    height: 240px;
    min-height: 240px;
    overflow: hidden;
}
body.author-profile-page.author-management-page .gallery-container {
    padding-bottom: 28px;
}
body.author-profile-page .gallery-actions .author-workspace-actions {
    order: 1;
    flex: 0 0 100%;
    justify-content: flex-end;
    margin: 0 0 4px;
}
body.author-profile-page .gallery-actions .gallery-count {
    order: 2;
    margin-left: auto;
}
body.author-profile-page.author-management-page .gallery-actions #studioCategorySelect {
    order: 3;
}
body.author-profile-page .studio-library-card {
    display: flex;
    height: auto;
    min-height: 0;
    flex-direction: column;
    cursor: default;
    user-select: text;
}
body.author-profile-page .studio-library-card:hover {
    transform: none;
    border-color: #E0DDD8;
    box-shadow: none;
}
body.author-profile-page .studio-library-card:hover .pin-image {
    transform: none;
}
.studio-card-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #EFECE8;
    color: inherit;
    font: inherit;
    text-align: inherit;
    cursor: pointer;
}
.studio-card-image-link:hover .pin-image,
.studio-card-image-link:focus-visible .pin-image {
    transform: scale(1.01);
}
.studio-card-image-link:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: -3px;
}
.studio-card-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}
.studio-card-status-group {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.studio-card-status-group .service-mode-badge {
    margin: 0;
}
.studio-card-topline .status-badge,
.studio-card-topline .visit-status-badge {
    position: static;
    flex: 0 0 auto;
    box-shadow: none;
}
.studio-card-topline .studio-category-badge {
    margin: 0 0 0 auto;
}
.studio-card-tag-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    margin-bottom: 0;
}
.studio-card-tag-actions .pin-tags {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}
.studio-card-tag-actions .studio-card-actions {
    flex: 0 0 auto;
    margin: 0 0 0 auto;
}
.studio-card-tag-actions .studio-action {
    min-height: 36px;
}
.studio-card-content-group {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}
.studio-card-content-group .pin-title {
    margin-bottom: 0;
}
body.author-profile-page .studio-library-card .author-group {
    align-items: center;
}
body.author-profile-page .studio-library-card .author-avatar {
    margin-top: 0;
}
body.author-profile-page .studio-library-card .pin-meta {
    margin-top: 16px;
    padding-top: 14px;
}
body.author-profile-page .author-profile-card .pin-address-row {
    margin: 2px 0 0;
    color: #FFF;
}
body.author-profile-page .author-profile-card .pin-address-row .pin-info-item {
    min-width: 0;
    color: #FFF;
}
body.author-profile-page .author-profile-card .pin-address-row .pin-info-item span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    line-clamp: 1;
}
body.author-profile-page .studio-library-card .pin-address-row,
body.author-profile-page .studio-library-card .pin-address-row .pin-info-item {
    color: var(--text-main);
}
@media (max-width: 992px) {
    body.author-profile-page .author-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    body.author-profile-page .gallery-summary { margin-bottom: 20px; }
    body.author-profile-page .author-profile-grid { grid-template-columns: 1fr; }
    .author-profile-summary {
        grid-template-columns: 64px minmax(0, 1fr);
        column-gap: 14px;
    }
    .author-profile-avatar {
        width: 64px;
        height: 64px;
        border-width: 2px;
        font-size: 21px;
    }
    .author-profile-summary .gallery-heading { font-size: clamp(28px, 8vw, 36px); }
    .author-profile-description { margin-top: 4px; }
    .author-profile-text { font-size: 13px; line-height: 1.65; }
    .author-profile-links { grid-column: 1 / -1; margin-top: 12px; }
    .author-profile-mode-badge,
    .author-workspace-actions { grid-column: 1 / -1; }
    body.author-profile-page .gallery-actions {
        display: flex;
        justify-content: end;
        width: 100%;
    }
    body.author-profile-page .gallery-actions .author-workspace-actions {
        width: 100%;
        justify-content: flex-start;
    }
    body.author-profile-page .author-profile-grid { row-gap: 18px; }
}
.upload-preview-grid { display:flex; width:100%; min-width:0; max-width:100%; gap:8px; overflow-x:auto; overflow-y:hidden; margin-top:10px; padding:0 0 5px; box-sizing:border-box; overscroll-behavior-inline:contain; }
.upload-preview-item { position:relative; flex:0 0 72px; height:58px; border-radius:6px; overflow:hidden; border:1px solid #DDD6CE; background:#F5F2EE; cursor:pointer; }
.upload-preview-item img { width:100%; height:100%; object-fit:cover; }
.upload-preview-item small { position:absolute; left:3px; bottom:3px; padding:2px 4px; border-radius:3px; background:rgba(35,35,35,.75); color:#fff; font-size:9px; }
.upload-preview-item button { position:absolute; right:3px; top:3px; width:18px; height:18px; border:0; border-radius:50%; background:rgba(35,35,35,.78); color:#fff; font-size:12px; line-height:18px; cursor:pointer; }
.upload-preview-replace { position:absolute; inset:0; display:grid; place-items:center; padding-top:20px; background:rgba(35,35,35,.48); color:#fff; font-size:10px; font-weight:700; opacity:0; transition:opacity .16s ease; pointer-events:none; }
.upload-preview-item:hover .upload-preview-replace, .upload-preview-item:focus-visible .upload-preview-replace { opacity:1; }
.upload-preview-item:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.pin-title { max-width:100%; overflow-wrap:anywhere; word-break:break-word; }
.rp-address-text { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.event-card-meta span:last-child { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.author-group { min-width:0; }
.published-meta { display:block; margin-top:3px; color:var(--text-muted); font-size:10.5px; font-weight:500; }
.detail-published-meta { margin-top:4px; color:var(--text-muted); font-size:10.5px; }
.calendar-nav-btn[hidden] { display:none !important; }
.author-avatar { flex:0 0 auto; }
.author-avatar, .detail-author-avatar { overflow:hidden; }
.author-avatar img, .detail-author-avatar img { width:100%; height:100%; object-fit:cover; }
.author-name { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width: 768px) {
    .rp-schedule-row {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        grid-template-areas:
            "day mode mode"
            "start separator end"
            "note note note";
    }
    .rp-schedule-row.is-closed,
    .rp-schedule-row.is-all-day {
        grid-template-columns: 48px minmax(0, 1fr);
        grid-template-areas: "day mode";
    }
    .rp-schedule-row > strong { grid-area: day; }
    .rp-schedule-row .rp-day-mode { grid-area: mode; }
    .rp-schedule-row .rp-start { grid-area: start; }
    .rp-schedule-separator { display: inline; grid-area: separator; text-align: center; }
    .rp-schedule-row .rp-end { grid-area: end; }
    .rp-overnight-note { grid-area: note; text-align: right; }
    .like-undo-toast { bottom: 18px; gap: 12px; }
}

/* 分類頁：壓縮首屏，並讓房屋、RP、活動各自擁有不同的資訊骨架 */
.gallery-summary { margin-top: 26px; margin-bottom: 8px; }
.gallery-description { margin-top: 6px; }
.filter-section { margin-bottom: 10px; }
.drawer-wrapper.open { margin-bottom: 16px; }
.gallery-container { padding-bottom: 64px; }

.housing-card .pin-image-wrapper { aspect-ratio: 4 / 3; }
.housing-card .pin-details { display: flex; height: 190px; min-height: 190px; flex-direction: column; overflow: hidden; }
.housing-spec-row { display: flex; align-items: center; gap: 10px; margin: -1px 0 9px; color: #6E7178; font-size: 11.5px; font-weight: 750; }
.housing-color-dots { display: inline-flex; align-items: center; gap: 5px; }
.housing-color-dot { width: 13px; height: 13px; border: 1px solid rgba(30,32,36,.18); border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.48); }
.housing-spec-divider { width: 1px; height: 12px; background: #DDD8D2; }
.housing-card .pin-context-row { margin-top: auto; }
.housing-card .pin-meta { margin-top: 0; }

.rp-standard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rp-card { display: grid; grid-template-columns: minmax(210px, 43%) minmax(0, 57%); min-width: 0; height: 320px; min-height: 320px; }
.rp-standard-grid .rp-card .pin-image-wrapper { width: 100%; min-height: 320px; aspect-ratio: auto; overflow: hidden; }
.rp-standard-grid .rp-card .pin-image { width: 100%; height: 100%; object-fit: cover; }
.rp-card .pin-details { display: flex; min-width: 0; max-width: 100%; flex-direction: column; padding: 18px; overflow: hidden; }
.rp-operating-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; }
.rp-operating-row .status-badge { position: static; box-shadow: none; }
.rp-service-text { color: #6F5A75; font-size: 11px; font-weight: 800; }
.rp-card .pin-title { margin-bottom: 5px; font-size: 17px; }
.rp-card .pin-tags { margin-bottom: 12px; }
.rp-hours-primary { margin-top: auto; padding: 12px 0 9px; border-top: 1px solid #E8E2EA; color: #34323A; font-size: 13px; font-weight: 820; }
.rp-location-line, .rp-address-text { color: #74717A; font-size: 11.5px; line-height: 1.5; }
.rp-hover-details, .rp-location-line, .rp-address-text { min-width: 0; max-width: 100%; }
.rp-location-line, .rp-address-text { overflow-wrap: anywhere; word-break: break-word; }
.rp-address-text { margin-top: 3px; }
.rp-card .pin-meta { margin-top: 11px; }
.rp-card .pin-likes { color: #827B85 !important; }

.event-wide-grid { max-width: 1120px; }
.event-wide-grid .event-card { display: grid; grid-template-columns: 94px minmax(250px, 34%) minmax(0, 1fr); min-width: 0; height: 300px; min-height: 300px; }
.event-date-rail { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid #DCE3EA; background: #EEF3F8; color: #34495F; text-align: center; }
.event-date-month { color: #4F6F91; font-size: 11px; font-weight: 850; letter-spacing: .06em; }
.event-date-day { margin: 2px 0; font-size: 34px; line-height: 1; font-weight: 880; }
.event-date-time { color: #777169; font-size: 11px; font-weight: 750; }
.event-wide-grid .event-card .pin-image-wrapper { width: 100%; min-width: 0; height: 100%; }
.event-wide-grid .event-card .pin-details { width: auto; min-width: 0; max-width: 100%; height: 100%; padding: 20px 22px; overflow: hidden; }
.event-card-heading { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 12px; }
.event-card-heading .pin-title { min-width: 0; flex: 1 1 auto; }
.event-card-heading .status-badge { position: static; flex: 0 0 auto; box-shadow: none; }
.event-card .pin-title { margin-bottom: 7px; font-size: 17px; }
.event-intro {
    display: -webkit-box;
    max-width: 100%;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}
.detail-event-intro {
    display: block;
    margin-bottom: 10px;
    overflow: visible;
    font-size: 13px;
    -webkit-line-clamp: initial;
    line-clamp: initial;
}
.event-card-main { flex: 1 1 auto; min-height: 0; overflow: visible; }
.event-card-meta { display: flex; min-width: 0; max-width: 100%; flex-wrap: wrap; gap: 7px 12px; color: #706D68; font-size: 11.5px; line-height: 1.5; }
.event-card-meta span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.event-card-meta strong { color: #343238; }
.event-countdown { width: fit-content; margin-top: 9px; color: #C58A43; font-size: 11.5px; font-weight: 850; }
.event-card .pin-meta { min-width: 0; flex: 0 0 auto; margin-top: auto; padding-top: 12px; }
.event-archive-more {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--text-muted);
    font-size: 12px;
}
.event-archive-more-button {
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--event-border);
    border-radius: 7px;
    background: var(--event-card);
    color: var(--event-text);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.event-archive-more-button:hover { border-color: var(--event-orange); color: var(--event-orange); }

@media (max-width: 992px) {
    .rp-standard-grid { grid-template-columns: 1fr; }
    .event-wide-grid .event-card { grid-template-columns: 82px minmax(210px, 34%) minmax(0, 1fr); }
}
@media (max-width: 768px) {
    .gallery-summary { align-items: flex-start; margin-top: 22px; padding: 0 16px; }
    .event-wide-grid .event-card { display: grid; grid-template-columns: 74px minmax(0, 1fr); height: auto; min-height: 0; }
    .event-date-rail { grid-row: 1 / 3; }
    .event-wide-grid .event-card .pin-image-wrapper { height: 190px; min-height: 0; }
    .event-wide-grid .event-card .pin-details { height: auto; min-height: 0; padding: 16px; }
}
@media (max-width: 576px) {
    .event-wide-grid .event-card { grid-template-columns: 64px minmax(0, 1fr); }
    .event-wide-grid .event-card .pin-image-wrapper { height: 155px; }
    .event-wide-grid .event-card .pin-details { padding: 14px; }
    .event-card-heading { flex-wrap: wrap; gap: 7px; }
    .event-card-meta { gap: 5px 9px; }
    .event-date-day { font-size: 28px; }
}

/* =============================================================
   首頁專用視覺：所有規則僅在 theme-home 生效
   ============================================================= */
body.theme-home .navbar {
    position: absolute;
    inset: 0 0 auto;
    width: 100%;
    background: transparent;
    border: 0;
    backdrop-filter: none;
    box-shadow: none;
    color: #FFF;
    transition: none;
}
body.theme-home .navbar .brand-logo,
body.theme-home .navbar .logo-title,
body.theme-home .navbar .nav-item,
body.theme-home .navbar .nav-item:hover,
body.theme-home .navbar .user-profile-trigger {
    color: #FFF;
    text-shadow: 0 1px 10px rgba(0,0,0,.72);
}
body.theme-home .navbar .logo-icon {
    width: 72px;
    height: 72px;
    background: rgba(24,23,22,.3);
    color: #FFF;
    box-shadow: 0 0 0 1px rgba(255,255,255,.14);
}
body.theme-home .navbar .logo-home { display: block !important; }
body.theme-home .navbar .logo-section { display: none; }
body.theme-home .navbar .logo-title { display: none; }
body.theme-home .navbar .btn-login {
    background: #FFF;
    color: #222120;
}
body.theme-home .profile-dropdown,
body.theme-home .profile-dropdown .dropdown-item,
body.theme-home .notification-panel {
    color: #34363B;
    text-shadow: none;
}
body.theme-home .discovery-home {
    max-width: none;
    padding: 0 0 92px;
}
body.theme-home .discovery-hero {
    position: relative;
    isolation: isolate;
    min-height: clamp(520px, 72vh, 720px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 18px;
    padding: 150px max(24px, calc((100vw - 1184px) / 2)) 70px;
    overflow: hidden;
    border: 0;
    color: #FFF;
    background:
        linear-gradient(to bottom, rgba(24,23,22,.16), rgba(24,23,22,.88)),
        url("./images/home-hero.webp") center / cover no-repeat;
    background-attachment: fixed;
}
body.theme-home .discovery-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, rgba(24,23,22,.58), transparent 72%);
}
body.theme-home .discovery-hero > div { max-width: 900px; }
body.theme-home .discovery-eyebrow { display: none; }
body.theme-home .discovery-hero h1 {
    max-width: 900px;
    min-height: 2.44em;
    margin: 0;
    color: #FFF;
    font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
    font-size: clamp(42px, 5.2vw, 66px);
    font-weight: 750;
    line-height: 1.22;
    letter-spacing: -.02em;
    white-space: pre-line;
}
body.theme-home .discovery-hero p {
    max-width: 680px;
    min-height: 3.6em;
    color: rgba(255,255,255,.8);
    font-size: 14px;
}
body.theme-home .discovery-quick-links { margin-top: 14px; }
body.theme-home .discovery-quick-link {
    padding: 10px 18px;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 7px;
    background: rgba(24,23,22,.24);
    color: #FFF;
    backdrop-filter: blur(6px);
}
body.theme-home .discovery-quick-link:first-child { background: #FFF; color: #222120; }

/* 統一推薦：縮小為置中的 60/40 橫向卡片。 */
body.theme-home .discovery-stage {
    max-width: 968px;
    margin: 56px auto 0;
    padding: 0 24px;
}
body.theme-home .discovery-feature {
    position: relative;
    display: block;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border: 1px solid #DDD7CE;
    border-radius: 16px;
    background: #FFF;
    box-shadow: 0 16px 36px rgba(35,32,28,.08);
}
body.theme-home .discovery-feature::after {
    display: block;
    content: "";
    position: absolute;
    z-index: 0;
    inset: 0;
    background: linear-gradient(90deg, rgba(17,20,24,.9) 0%, rgba(17,20,24,.38) 46%, rgba(17,20,24,.04) 82%);
    pointer-events: none;
}
body.theme-home .discovery-feature-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}
body.theme-home .discovery-feature-copy {
    position: absolute;
    z-index: 1;
    inset: auto auto 0 0;
    display: flex;
    width: 52%;
    min-width: 0;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px 36px;
    background: transparent;
    color: #FFF;
    text-align: left;
    align-items: flex-start;
    pointer-events: none;
}
body.theme-home .discovery-feature-intro {
    margin-bottom: 10px;
    color: #F0C6A6;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
}
body.theme-home .discovery-feature-status {
    width: fit-content;
    margin-bottom: 10px;
    padding: 4px 8px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 5px;
    background: rgba(255,255,255,.92);
    color: #4A4039;
}
body.theme-home .discovery-feature h2 {
    font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
    font-size: clamp(24px, 2.2vw, 32px);
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: 0;
    color: #FFF;
    text-shadow: 0 2px 18px rgba(0,0,0,.3);
}
body.theme-home .discovery-feature-reason {
    margin-top: 10px;
    color: rgba(255,255,255,.84);
    line-height: 1.65;
}

/* 三個分類：固定寬度的緊湊交錯卡；最後的近期作品維持原樣。 */
body.theme-home .discovery-secondary-grid {
    max-width: 1040px;
    margin: 64px auto 0;
    padding: 0 24px;
    gap: 54px;
}
body.theme-home .discovery-panel {
    padding-top: 0;
    border-top: 0;
}
body.theme-home .discovery-panel-header {
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 11px;
    border-bottom: 1px solid #34312E;
}
body.theme-home .discovery-panel h2 {
    font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
    font-size: 23px;
    font-weight: 750;
    letter-spacing: 0;
}
body.theme-home .discovery-hero h1.is-typing::after {
    content: "";
    display: inline-block;
    height: .9em;
    margin-left: .12em;
    border-right: 3px solid currentColor;
    vertical-align: -.08em;
    animation: discovery-cursor-blink .75s step-end infinite;
}
@keyframes discovery-cursor-blink {
    50% { opacity: 0; }
}
body.theme-home .discovery-hero-support {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity .5s ease, transform .5s ease;
}
body.theme-home .discovery-hero-support.is-revealed {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
body.theme-home .discovery-quick-links.is-pending {
    visibility: visible;
}
body.theme-home .discovery-quick-links.is-pending button {
    visibility: hidden;
    opacity: 0;
    transition: opacity 3.5s ease;
}
body.theme-home .discovery-quick-links.is-pending button.is-ready {
    visibility: visible;
    opacity: 1;
}
body.theme-home .discovery-panel:not(:last-child) .discovery-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 42px;
    overflow: visible;
}
body.theme-home .discovery-panel:not(:last-child) .discovery-card {
    position: relative;
    display: block;
    min-height: 380px;
    overflow: visible;
    border: 0;
    background: transparent;
}
body.theme-home .discovery-panel:not(:last-child) .discovery-card-image-link {
    display: block;
    width: 58%;
    min-height: 0;
    aspect-ratio: 4 / 3;
    margin-right: 0;
    margin-left: auto;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 16px 34px rgba(35,32,28,.08);
}
body.theme-home .discovery-panel:not(:last-child) .discovery-card img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    object-fit: cover;
    box-shadow: none;
}
body.theme-home .discovery-panel:not(:last-child) .discovery-card-copy {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 0;
    width: 48%;
    height: 250px;
    max-width: 500px;
    margin: 0;
    padding: 28px;
    transform: translateY(-50%);
    border: 1px solid #E0DAD1;
    border-radius: 13px;
    background: #FFF;
    box-shadow: 0 14px 32px rgba(35,32,28,.07);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}
body.theme-home .discovery-panel:nth-child(even):not(:last-child) .discovery-card-image-link {
    margin-right: auto;
    margin-left: 0;
}
body.theme-home .discovery-panel:nth-child(even):not(:last-child) .discovery-card-copy {
    right: 0;
    left: auto;
}
body.theme-home .discovery-panel:not(:last-child) .discovery-card h3 {
    margin: 7px 0 9px;
    font-family: "Microsoft JhengHei", "PingFang TC", sans-serif;
    font-size: clamp(19px, 1.8vw, 24px);
    font-weight: 750;
    line-height: 1.45;
    letter-spacing: 0;
    min-height: 2.9em;
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
body.theme-home .discovery-panel:not(:last-child) .discovery-card-meta {
    flex: 0 0 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
body.theme-home .discovery-panel:not(:last-child) .discovery-card-reason {
    min-height: 2.9em;
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    word-break: break-word;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
body.theme-home .discovery-card-link {
    width: fit-content;
    margin-top: auto;
    padding: 7px 11px;
    border: 2px solid #34312E;
    border-radius: 6px;
    color: #34312E;
    font-size: 11px;
    font-weight: 850;
}
body.theme-home .discovery-panel-recent .discovery-card-list {
    grid-template-columns: repeat(3,minmax(0,1fr));
    grid-auto-rows: 164px;
}
body.theme-home .discovery-panel-recent .discovery-card {
    height: 164px;
    min-height: 164px;
}
body.theme-home .discovery-panel-recent .discovery-card img {
    height: 164px;
    min-height: 0;
}
body.theme-home .discovery-panel-recent .discovery-card-copy {
    min-height: 0;
    overflow: hidden;
}

@media (max-width: 768px) {
    body.theme-home .navbar { position: absolute; }
    .navbar-inner {
        min-height: 104px;
        grid-template-columns: minmax(0,1fr) auto;
        grid-template-rows: auto auto;
        gap: 8px 12px;
        padding: 10px 16px;
    }
    .navbar .brand-logo { grid-column: 1; grid-row: 1; width: fit-content; min-width: 0; }
    .navbar .logo-icon { display: flex; width: 32px; height: 32px; }
    .navbar .logo-title { display: inline !important; }
    .navbar .logo-section { transform: scale(1.55); }
    body.theme-home .navbar .logo-icon { display: flex; width: 52px; height: 52px; }
    body.theme-home .navbar .logo-home { transform: scale(1.25); }
    body.theme-home .navbar .logo-title { display: none !important; }
    .navbar .auth-area { grid-column: 2; grid-row: 1; }
    .navbar .nav-menu {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        justify-content: space-between;
    }
    .navbar .nav-item { flex: 1 1 0; justify-content: center; }
    body.theme-home .discovery-hero {
        min-height: 650px;
        padding: 150px 20px 64px;
        background-attachment: scroll;
    }
    body.theme-home .discovery-hero h1 { font-size: clamp(38px, 10.5vw, 54px); }
    body.theme-home .discovery-stage { max-width: none; margin-top: 48px; padding: 0 16px; }
    body.theme-home .discovery-feature { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
    body.theme-home .discovery-feature::after { background: linear-gradient(to bottom, rgba(17,20,24,.04) 16%, rgba(17,20,24,.36) 48%, rgba(17,20,24,.92) 100%); }
    body.theme-home .discovery-feature-image { height: 100%; }
    body.theme-home .discovery-feature-copy { inset: 0; width: 100%; justify-content: flex-end; padding: 28px 22px; }
    body.theme-home .discovery-secondary-grid { margin-top: 48px; padding: 0 16px; gap: 44px; }
    body.theme-home .discovery-panel:not(:last-child) .discovery-card {
        display: flex;
        min-height: 0;
        flex: none;
        flex-direction: column;
    }
    body.theme-home .discovery-panel:not(:last-child) .discovery-card-image-link,
    body.theme-home .discovery-panel:nth-child(even):not(:last-child) .discovery-card-image-link {
        width: 100%;
        height: 260px;
        aspect-ratio: auto;
        margin: 0;
    }
    body.theme-home .discovery-panel:not(:last-child) .discovery-card img,
    body.theme-home .discovery-panel:nth-child(even):not(:last-child) .discovery-card img { width: 100%; height: 100%; }
    body.theme-home .discovery-panel:not(:last-child) .discovery-card-copy,
    body.theme-home .discovery-panel:nth-child(even):not(:last-child) .discovery-card-copy {
        position: relative;
        top: auto;
        right: auto;
        left: auto;
        width: calc(100% - 32px);
        height: 260px;
        max-width: none;
        margin: -38px 16px 0;
        padding: 23px;
        transform: none;
    }
    body.theme-home .discovery-panel-recent .discovery-card-list {
        display: flex;
        grid-template-columns: none;
        grid-auto-rows: unset;
    }
    body.theme-home .discovery-panel-recent .discovery-card {
        height: 164px;
        min-height: 164px;
    }
}

@media (max-width: 576px) {
    body.theme-home .discovery-feature-image { height: 100%; }
    body.theme-home .discovery-panel:not(:last-child) .discovery-card-image-link,
    body.theme-home .discovery-panel:nth-child(even):not(:last-child) .discovery-card-image-link { height: 220px; }
}

/* Large desktop layout: give 1920px–2560px screens more presence without
   scaling the entire interface or changing the existing tablet/mobile rules. */
@media (min-width: 1600px) {
    :root {
        --large-screen-content: 1440px;
        --large-screen-reading: 1280px;
    }

    .navbar-inner {
        max-width: 1504px;
        min-height: 92px;
        padding: 22px 32px;
    }
    .logo-icon { width: 34px; height: 34px; }
    .logo-title { font-size: 17px; }
    .nav-menu { gap: 28px; }
    .nav-item { font-size: 14.5px; }
    .btn-login { padding: 10px 18px; font-size: 14.5px; }

    .gallery-summary,
    .filter-section,
    .calendar-section,
    .gallery-container {
        max-width: var(--large-screen-content);
    }
    .gallery-summary {
        margin-top: 36px;
        padding-inline: 32px;
    }
    .gallery-heading { font-size: clamp(42px, 2.6vw, 50px); }
    .gallery-description { font-size: 14.5px; }
    .filter-section,
    .gallery-container { padding-inline: 32px; }
    .rp-standard-grid { gap: 28px 22px; }
    .pin-details { padding: 17px 18px 18px; }
    .pin-title { font-size: 16px; }
    .housing-card .pin-details { height: 205px; min-height: 205px; }
    .rp-card,
    .rp-standard-grid .rp-card .pin-image-wrapper {
        height: 340px;
        min-height: 340px;
    }
    .rp-card .pin-details { padding: 22px; }
    .rp-card .pin-title,
    .event-card .pin-title { font-size: 18px; }
    .event-wide-grid { max-width: var(--large-screen-reading); }
    .event-wide-grid .event-card {
        grid-template-columns: 104px minmax(300px, 35%) minmax(0, 1fr);
        height: 300px;
        min-height: 300px;
    }
    .event-wide-grid .event-card .pin-details { padding: 22px 24px; }

    .detail-view { max-width: 1360px; padding: 42px 32px 96px; }
    .detail-layout { gap: 22px 36px; }
    .management-view { max-width: 1200px; padding: 42px 32px 96px; }
    .author-profile-view { max-width: var(--large-screen-reading); }

    body.theme-home .discovery-hero {
        min-height: clamp(680px, 74vh, 840px);
        padding: 180px max(32px, calc((100vw - var(--large-screen-content)) / 2)) 88px;
    }
    body.theme-home .discovery-hero > div,
    body.theme-home .discovery-hero h1 { max-width: 1040px; }
    body.theme-home .discovery-hero h1 {
        font-size: clamp(58px, 3.8vw, 76px);
        line-height: 1.18;
    }
    body.theme-home .discovery-hero p { max-width: 760px; font-size: 15.5px; }
    body.theme-home .discovery-quick-link { padding: 11px 20px; }

    body.theme-home .discovery-stage {
        max-width: 1180px;
        margin-top: 72px;
        padding-inline: 32px;
    }
    body.theme-home .discovery-feature-copy { padding: 42px 46px; }
    body.theme-home .discovery-feature h2 { font-size: clamp(30px, 2vw, 38px); }
    body.theme-home .discovery-feature-reason { font-size: 14.5px; }

    body.theme-home .discovery-secondary-grid {
        max-width: var(--large-screen-reading);
        margin-top: 78px;
        padding-inline: 32px;
        gap: 64px;
    }
    body.theme-home .discovery-panel h2 { font-size: 25px; }
    body.theme-home .discovery-panel:not(:last-child) .discovery-card { min-height: 430px; }
    body.theme-home .discovery-panel:not(:last-child) .discovery-card-copy {
        max-width: 570px;
        height: 280px;
        padding: 34px;
    }
    body.theme-home .discovery-panel:not(:last-child) .discovery-card h3 {
        font-size: clamp(22px, 1.45vw, 27px);
    }
    body.theme-home .discovery-panel-recent .discovery-card-list { grid-auto-rows: 180px; }
    body.theme-home .discovery-panel-recent .discovery-card,
    body.theme-home .discovery-panel-recent .discovery-card img {
        height: 180px;
        min-height: 180px;
    }
}

/* 裝潢／RP：圖片是作品本體，資訊直接放在圖片上，不再另接白色區塊。 */
body.theme-decor .decor-grid,
body.theme-rp .rp-standard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 22px;
}
body.theme-decor .housing-card,
body.theme-rp .rp-card {
    position: relative;
    display: block;
    height: 430px;
    min-height: 430px;
    overflow: hidden;
    border: 0 !important;
    border-radius: var(--radius-card);
    background: transparent !important;
    box-shadow: none !important;
}
body.theme-decor .housing-card .pin-image-wrapper,
body.theme-rp .rp-card .pin-image-wrapper {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    border-radius: inherit;
}
body.theme-decor .housing-card .pin-image,
body.theme-rp .rp-card .pin-image {
    filter: brightness(.78) saturate(.96);
}
body.theme-decor .housing-card .pin-details,
body.theme-rp .rp-card .pin-details {
    position: absolute;
    right: 16px;
    bottom: 16px;
    left: 16px;
    display: flex;
    min-width: 0;
    max-width: 100%;
    max-height: calc(100% - 32px);
    height: auto;
    min-height: 0;
    padding: 0;
    gap: 5px;
    color: #FFF;
    background: transparent;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
    text-shadow: none;
    overflow: hidden;
}
body.theme-decor .housing-card .pin-title,
body.theme-rp .rp-card .pin-title,
body.theme-decor .housing-card .housing-spec-row,
body.theme-decor .housing-card .housing-location-line,
body.theme-decor .housing-card .housing-address-text,
body.theme-rp .rp-card .rp-service-text,
body.theme-rp .rp-card .rp-hours-primary,
body.theme-rp .rp-card .rp-location-line,
body.theme-rp .rp-card .rp-address-text,
body.theme-decor .housing-card .author-name,
body.theme-rp .rp-card .author-name { color: #FFF; }
body.theme-decor .housing-card .pin-meta,
body.theme-rp .rp-card .pin-meta,
body.theme-rp .rp-card .rp-hours-primary { border-color: rgba(255,255,255,.35); }
body.theme-decor .housing-card .housing-hover-details,
body.theme-decor .housing-card .housing-location-line,
body.theme-decor .housing-card .housing-address-text {
    min-width: 0;
    max-width: 100%;
}
body.theme-decor .housing-card .housing-hover-details {
    display: grid;
    gap: 4px;
}
body.theme-decor .housing-card .housing-location-line,
body.theme-decor .housing-card .housing-address-text {
    overflow: hidden;
    color: rgba(255,255,255,.9);
    font-size: 11.5px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.theme-decor .housing-card .pin-title,
body.theme-rp .rp-card .pin-title { margin: 0; }
body.theme-decor .housing-card .housing-preview-topline {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 25px;
}
body.theme-decor .housing-card .housing-preview-topline .visit-status-badge {
    position: static;
    flex: 0 0 auto;
    box-shadow: none;
}
body.theme-decor .housing-card .housing-preview-topline .housing-color-dots {
    justify-content: flex-start;
    margin-left: 0;
}
body.theme-decor .housing-card .housing-tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 1px;
}
body.theme-decor .housing-card .housing-tag-row .pin-tag { margin: 0; }
body.theme-decor .housing-card .published-meta,
body.theme-rp .rp-card .published-meta { color: rgba(255,255,255,.9); }
body.theme-decor .housing-card .housing-spec-row { margin: 0; }
body.theme-decor .housing-card .pin-context-row { margin: 2px 0 0; }
body.theme-rp .rp-card .rp-operating-row { justify-content: flex-start; margin: 0; }
body.theme-rp .rp-card .rp-operating-row .service-mode-badge {
    position: static;
    margin: 0;
    padding: 5px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.9);
    color: #303238;
    box-shadow: none;
}
body.theme-rp .rp-card .rp-hours-primary { margin-top: 3px; padding: 5px 0 0; }
body.theme-rp .rp-card .pin-tags { margin: 0; }
body.theme-rp .rp-card .rp-location-line,
body.theme-rp .rp-card .rp-address-text { margin: 0; }
body.theme-decor .housing-card .pin-meta,
body.theme-rp .rp-card .pin-meta { margin-top: 5px; padding-top: 7px; }
body.theme-decor .housing-card .housing-spec-divider { background: rgba(255,255,255,.5); }
body.theme-decor .housing-card .pin-tag,
body.theme-rp .rp-card .pin-tag {
    color: #FFF;
    border-color: rgba(255,255,255,.62);
    background: rgba(0,0,0,.16);
}
body.theme-decor .housing-card .pin-likes,
body.theme-rp .rp-card .pin-likes { color: #FFF !important; }
body.theme-decor .housing-card .author-avatar,
body.theme-rp .rp-card .author-avatar { background: rgba(255,255,255,.92) !important; color: #303238 !important; }
body.theme-decor .housing-card:hover,
body.theme-rp .rp-card:hover { transform: scale(1.018); box-shadow: 0 16px 30px rgba(20,22,26,.2) !important; }

@media (max-width: 992px) {
    body.theme-decor .decor-grid,
    body.theme-rp .rp-standard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
    body.theme-decor .decor-grid,
    body.theme-rp .rp-standard-grid { grid-template-columns: 1fr; }
    body.theme-decor .housing-card,
    body.theme-rp .rp-card { height: 370px; min-height: 370px; }
    body.theme-decor .housing-card .pin-details,
    body.theme-rp .rp-card .pin-details {
        right: 12px;
        bottom: 12px;
        left: 12px;
        max-height: calc(100% - 24px);
    }
}

@media (min-width: 1024px) {
    /* 僅放大作品區，不影響頁首、標題與篩選控制。 */
    body.theme-decor .gallery-container,
    body.theme-rp .gallery-container {
        max-width: 1400px;
        padding-right: 20px;
        padding-left: 20px;
    }
}

/* 僅在可懸停的網頁版，將房屋與店面的次要資訊收在互動狀態中。 */
@media (min-width: 769px) and (hover: hover) and (pointer: fine) {
    body.theme-decor .housing-card .housing-hover-details,
    body.theme-rp .rp-card .rp-hover-details {
        display: grid;
        gap: 4px;
        max-height: 0;
        margin-top: 0;
        overflow: hidden;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        transform: translateY(8px);
        transition: max-height .24s ease, margin-top .24s ease, opacity .18s ease, transform .24s ease, visibility 0s linear .24s;
    }
    body.theme-decor .housing-card:hover .housing-hover-details,
    body.theme-decor .housing-card:focus-visible .housing-hover-details,
    body.theme-decor .housing-card:focus-within .housing-hover-details,
    body.theme-rp .rp-card:hover .rp-hover-details,
    body.theme-rp .rp-card:focus-visible .rp-hover-details,
    body.theme-rp .rp-card:focus-within .rp-hover-details {
        max-height: 145px;
        margin-top: 7px;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
        transition-delay: 0s;
    }
}

/* 三類詳情頁共用：縮短右側主要資訊的閱讀節奏。 */
.detail-primary-panel { padding: 18px; }
.detail-primary-panel .detail-kicker { margin-bottom: 6px; }
.detail-primary-panel .detail-title { margin-bottom: 9px; line-height: 1.22; }
.detail-primary-panel .detail-actions { margin-top: 10px; }
.detail-primary-panel .detail-author { margin-top: 11px; padding-top: 11px; }

/* 作品預覽：標題與標籤貼近，減少無意義的垂直留白。 */
body.theme-decor .housing-card .pin-details,
body.theme-rp .rp-card .pin-details { gap: 2px; }
body.theme-decor .housing-card .housing-tag-row,
body.theme-rp .rp-card .pin-tags { margin-top: 0; }

/* 手機首頁：讓封面文字有足夠高度，推薦白卡依內容自動收合。 */
@media (max-width: 576px) {
    body.theme-home .discovery-feature {
        height: auto;
        min-height: 300px;
        aspect-ratio: auto;
    }
    body.theme-home .discovery-feature-copy { padding: 18px; }
    body.theme-home .discovery-feature-intro { display: none; }
    body.theme-home .discovery-feature-status { margin-bottom: 7px; }
    body.theme-home .discovery-feature h2 {
        font-size: clamp(23px, 7.2vw, 29px);
        line-height: 1.18;
    }
    body.theme-home .discovery-feature-reason { margin-top: 6px; font-size: 12px; }
    body.theme-home .discovery-panel:not(:last-child) .discovery-card-copy,
    body.theme-home .discovery-panel:nth-child(even):not(:last-child) .discovery-card-copy {
        width: calc(100% - 24px);
        height: auto;
        min-height: 0;
        margin: -32px 12px 0;
        padding: 18px;
    }
    body.theme-home .discovery-panel:not(:last-child) .discovery-card-copy h3 { margin-top: 5px; }
    body.theme-home .discovery-panel:not(:last-child) .discovery-card-reason { min-height: 0; }
}

/* 首頁推薦引導句獨立固定在圖片左上，與左下內容區分層。 */
body.theme-home .discovery-feature > .discovery-feature-intro {
    position: absolute;
    z-index: 2;
    top: 24px;
    left: 24px;
    display: inline-flex;
    max-width: calc(100% - 48px);
    margin: 0;
    color: #F0C6A6;
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .04em;
    pointer-events: none;
}
@media (max-width: 576px) {
    body.theme-home .discovery-feature > .discovery-feature-intro {
        top: 16px;
        left: 16px;
        display: inline-flex;
        max-width: calc(100% - 32px);
        font-size: 11px;
    }
}

/* 首頁最近更新：次要資訊集中在卡片底部，讓標題區更乾淨。 */
body.theme-home .discovery-panel-recent .discovery-card-copy {
    display: flex;
    flex-direction: column;
    height: 100%;
}
body.theme-home .discovery-panel-recent .discovery-card-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-top: auto;
}
body.theme-home .discovery-panel-recent .discovery-card-reason,
body.theme-home .discovery-panel-recent .discovery-card-link { margin-top: 0; }

/* 首頁區塊標題與快速入口統一成同一套節奏。 */
body.theme-home .discovery-panel-header {
    justify-content: flex-start;
    gap: 10px;
}
body.theme-home .discovery-panel-link { margin-left: 0; }
body.theme-home .discovery-quick-link:first-child {
    background: rgba(24,23,22,.24);
    color: #FFF;
}

/* 預覽卡中的愛心只呈現狀態；收藏操作保留在詳情頁。 */
.like-status {
    cursor: default;
    pointer-events: none;
}
.like-status:hover { background: transparent !important; }
.studio-like-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px;
    border: 0;
    background: transparent;
    color: #C98E82;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    pointer-events: none;
}
.studio-like-status .lucide-icon { width: 15px; height: 15px; }
.studio-like-status.liked { color: #D97979; }
.studio-like-status.liked .lucide-icon { fill: currentColor; }
.studio-like-status:hover { background: transparent; color: inherit; transform: none; }

/* 首頁第一屏：讓導覽與主視覺形成完整入口。 */
body.theme-home .navbar {
    position: absolute;
    inset: 0 0 auto;
    background: linear-gradient(to bottom, rgba(18,18,20,.48), transparent) !important;
    border-bottom-color: transparent !important;
    color: #FFF;
}
body.theme-home .navbar .nav-item { color: #FFF; }
body.theme-home .navbar .nav-item:hover { background: rgba(255,255,255,.14); }
body.theme-home .navbar .nav-item.active { background: rgba(255,255,255,.18); }
body.theme-home .navbar .btn-login { background: #FFF; color: #262426; border-color: #FFF; }
body.theme-home .discovery-hero {
    min-height: clamp(620px, calc(100vh - 12px), 860px);
    padding-top: 180px;
    padding-bottom: 104px;
    border-bottom: 0;
}
body.theme-home .discovery-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: radial-gradient(circle at 78% 30%, rgba(220,170,130,.18), transparent 34%), linear-gradient(to bottom, rgba(8,10,15,.08), rgba(8,10,15,.28));
    pointer-events: none;
}
body.theme-home .discovery-hero h1 { text-shadow: 0 3px 26px rgba(0,0,0,.36); }
body.theme-home .discovery-hero p { color: rgba(255,255,255,.88); }
body.theme-home .discovery-quick-links { gap: 10px; margin-top: 22px; }
body.theme-home .discovery-quick-link { padding: 12px 21px; border-radius: 9px; font-size: 13px; }
body.theme-home .discovery-stage { margin-top: 76px; }

/* 首頁暮色靛紫：保留主視覺，同時銜接三個明亮分類頁。 */
body.theme-home {
    background: #F7F3EF;
}
body.theme-home .navbar {
    background: linear-gradient(to bottom, rgba(32,35,50,.68), rgba(32,35,50,.08), transparent) !important;
}
body.theme-home .navbar .logo-icon {
    width: 42px;
    height: 46px;
}
body.theme-home .navbar .logo-home {
    transform: scale(1.9);
    transform-origin: left center;
}
body.theme-home .navbar .logo-icon {
    background: rgba(32,35,50,.34);
    border-color: rgba(255,255,255,.24);
}
body.theme-home .discovery-hero {
    background:
        linear-gradient(180deg, rgba(32,35,50,.10) 0%, rgba(32,35,50,.22) 48%, rgba(32,35,50,.68) 100%),
        url("./images/home-hero.webp") center / cover no-repeat;
    background-attachment: fixed;
}
body.theme-home .discovery-hero::after {
    background: linear-gradient(90deg, rgba(32,35,50,.48) 0%, rgba(75,61,80,.24) 48%, rgba(32,35,50,.06) 78%);
}
body.theme-home .discovery-hero::before {
    background:
        radial-gradient(circle at 78% 30%, rgba(201,142,130,.22), transparent 34%),
        radial-gradient(circle at 58% 88%, rgba(79,111,145,.18), transparent 40%);
}
body.theme-home .discovery-quick-link {
    border-color: rgba(255,255,255,.34);
    background: rgba(24,23,22,.24);
    color: #FFF;
    box-shadow: none;
}
body.theme-home .discovery-quick-link:first-child {
    border-color: rgba(255,255,255,.34);
    background: rgba(24,23,22,.24);
    color: #FFF;
}
body.theme-home .discovery-quick-link:hover,
body.theme-home .discovery-quick-link:focus-visible {
    border-color: rgba(255,255,255,.92);
    background: rgba(255,255,255,.9);
    color: #262426;
    box-shadow: 0 10px 28px rgba(12,16,27,.24);
    transform: none;
}
body.theme-home .navbar .nav-item:hover {
    background: transparent;
    box-shadow: none;
    filter: brightness(1.12) drop-shadow(0 3px 9px rgba(255,255,255,.34));
    text-shadow: 0 1px 12px rgba(0,0,0,.72);
    transform: none;
}
body.theme-home .navbar .nav-item:focus-visible {
    background: transparent;
    box-shadow: none;
    outline: 2px solid rgba(255,255,255,.9);
    outline-offset: 4px;
    border-radius: 6px;
    transform: none;
}

/* 首頁作品卡只讓圖片、標題與明確按鈕進入詳情，保留文字選取。 */
.discovery-feature,
.discovery-card {
    cursor: default;
    user-select: text;
}
.discovery-feature:hover {
    filter: none;
}
.discovery-feature:hover .discovery-feature-image,
.discovery-card:hover img {
    transform: none;
}
.discovery-card:hover {
    border-color: #E2DED8;
    transform: none;
}
.discovery-feature-image-link,
.discovery-card-image-link,
.discovery-card-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: inherit;
    cursor: pointer;
}
.discovery-feature-image-link {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.discovery-feature-image-link .discovery-feature-image {
    height: 100%;
}
.discovery-card-image-link {
    min-width: 0;
    min-height: 104px;
    overflow: hidden;
}
.discovery-card-image-link img {
    display: block;
}
.discovery-card-link {
    display: block;
}
.discovery-feature:has(.discovery-feature-image-link:hover) .discovery-feature-image,
.discovery-feature:has(.discovery-feature-image-link:focus-visible) .discovery-feature-image,
.discovery-card:has(.discovery-card-image-link:hover) img,
.discovery-card:has(.discovery-card-image-link:focus-visible) img {
    transform: scale(1.035);
}
body.theme-home .discovery-card-link:hover,
body.theme-home .discovery-card-link:focus-visible {
    border-color: #34312E;
    background: #34312E;
    color: #FFF;
    box-shadow: 0 6px 16px rgba(38,35,33,.16);
    transform: none;
}
body.theme-home .discovery-card-link:active {
    background: #222120;
    color: #FFF;
    box-shadow: none;
}
.discovery-feature-action:focus-visible,
.discovery-card-action:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}
body.home-color-transition::after {
    content: "";
    position: fixed;
    z-index: 1900;
    inset: 0;
    background: #202332;
    pointer-events: none;
    animation: home-color-bridge .22s ease-out both;
}
@keyframes home-color-bridge {
    from { opacity: .24; }
    to { opacity: 0; }
}
@media (max-width: 768px) {
    body.theme-home .navbar .logo-icon {
        width: 32px;
        height: 32px;
    }
    body.theme-home .navbar .logo-home { transform: scale(1.8); }
    body.theme-home .discovery-hero { background-attachment: scroll; }
}
@media (min-width: 1600px) {
    body.theme-home .navbar .logo-icon {
        width: 34px;
        height: 34px;
    }
    body.theme-home .navbar .logo-home { transform: scale(2); }
}

/* 上傳表單：三個分類各自使用一致且低彩度的主題色。 */
.upload-tab-btn.tab-decor.active { color: #253129 !important; }
.upload-tab-btn.tab-rp.active { color: #76547F !important; }
.upload-tab-btn.tab-event.active { color: #3F5D7D !important; }

#form-decor .form-input,
#form-decor .form-select,
#form-decor .form-textarea,
#form-decor .tag-editor,
#form-decor .file-upload-box,
#form-decor .choice-card span,
#form-decor .rp-schedule-row {
    background-color: #F4F7F3;
    border-color: var(--decor-green-border);
}
#form-rp .form-input,
#form-rp .form-select,
#form-rp .form-textarea,
#form-rp .tag-editor,
#form-rp .file-upload-box,
#form-rp .choice-card span,
#form-rp .rp-schedule-row {
    background-color: #F7F3F8;
    border-color: #DDD2E0;
}
#form-event .form-input,
#form-event .form-select,
#form-event .form-textarea,
#form-event .tag-editor,
#form-event .file-upload-box,
#form-event .choice-card span {
    background-color: #F3F7FA;
    border-color: #D4DFE9;
}

#form-decor .form-input:hover:not(:focus),
#form-decor .form-select:hover:not(:focus),
#form-decor .form-textarea:hover:not(:focus),
#form-decor .choice-card span:hover { background-color: var(--decor-green-soft); border-color: var(--decor-green); }
#form-rp .form-input:hover:not(:focus),
#form-rp .form-select:hover:not(:focus),
#form-rp .form-textarea:hover:not(:focus),
#form-rp .choice-card span:hover { background-color: #F1EAF3; border-color: #C5B2CA; }
#form-event .form-input:hover:not(:focus),
#form-event .form-select:hover:not(:focus),
#form-event .form-textarea:hover:not(:focus),
#form-event .choice-card span:hover { background-color: #EAF1F7; border-color: #B7C9D9; }

#form-decor .form-input:focus,
#form-decor .form-select:focus,
#form-decor .form-textarea:focus,
#form-decor .tag-editor:focus-within { background-color: #FFF; border-color: var(--decor-green); box-shadow: 0 0 0 3px rgba(134,165,141,.16); }
#form-rp .form-input:focus,
#form-rp .form-select:focus,
#form-rp .form-textarea:focus,
#form-rp .tag-editor:focus-within { background-color: #FFF; border-color: var(--rp-purple); box-shadow: 0 0 0 3px rgba(137,112,143,.12); }
#form-event .form-input:focus,
#form-event .form-select:focus,
#form-event .form-textarea:focus,
#form-event .tag-editor:focus-within { background-color: #FFF; border-color: #4F6F91; box-shadow: 0 0 0 3px rgba(79,111,145,.12); }

#form-decor .choice-card input:checked + span { background: rgba(134,165,141,.18); border-color: var(--decor-green); color: var(--decor-green-dark); }
#form-rp .choice-card input:checked + span { background: rgba(137,112,143,.15); border-color: var(--rp-purple); color: #654E6B; }
#form-event .choice-card input:checked + span { background: rgba(79,111,145,.14); border-color: #4F6F91; color: #3F5D7D; }
#form-decor .choice-card input:focus-visible + span { outline-color: rgba(134,165,141,.45); }
#form-rp .choice-card input:focus-visible + span { outline-color: rgba(137,112,143,.4); }
#form-event .choice-card input:focus-visible + span { outline-color: rgba(79,111,145,.4); }

#form-decor .file-upload-box:hover { background: var(--decor-green-soft); border-color: var(--decor-green); }
#form-rp .file-upload-box:hover { background: #F1EAF3; border-color: var(--rp-purple); }
#form-event .file-upload-box:hover { background: #EAF1F7; border-color: #4F6F91; }
#form-decor .btn-add-tag { background: var(--decor-green); color: #253129; }
#form-rp .btn-add-tag { background: var(--rp-purple); color: #FFF; }
#form-event .btn-add-tag { background: #4F6F91; color: #FFF; }
#form-event .form-disclaimer { background: #F2F6FA; border-color: #D4DFE9; color: #3F5D7D; }

.detail-external-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; }
.detail-external-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 8px 11px;
    border: 1px solid #D9D4CD;
    border-radius: 8px;
    color: #3C475C;
    background: #FAF9F7;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.detail-external-link span { min-width: 0; overflow-wrap: anywhere; }
.detail-external-link.is-warning { border-color: #D9A75F; background: #FFF8EC; color: #735323; }
.external-warning-mark { display: inline-grid; place-items: center; flex: 0 0 17px; width: 17px; height: 17px; border-radius: 50%; background: #B97722; color: #FFF; font-size: 11px; font-weight: 900; }
.detail-copy-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #D9D4CD;
    border-radius: 8px;
    background: #FFF;
    color: #59606C;
    font: inherit;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
}
.detail-copy-link:hover { border-color: #C98D80; color: #33363F; }
.external-platform-icon { width: 16px; height: 16px; flex: 0 0 16px; }
.external-platform-icon.platform-youtube { color: #D94343; }
.external-platform-icon.platform-instagram { color: #B34D8C; }
.external-platform-icon.platform-x { color: #25272C; }
.external-platform-icon.platform-twitch { color: #7650A8; }
.external-platform-icon.platform-discord { color: #5865F2; }
.external-platform-icon.platform-facebook { color: #3568B8; }
.external-platform-icon.platform-tiktok { color: #25272C; }
.external-platform-icon.platform-bluesky { color: #1685E6; }
.external-platform-icon.platform-threads { color: #25272C; }
.detail-external-link:hover { border-color: #C98D80; background: #FFF; transform: translateY(-1px); }
body.dark-mode .detail-external-link { color: #F5F2EF; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.24); }
/* 主要內容不等待首頁逐字動畫，載入後即可閱讀與操作。 */
body.theme-home .discovery-hero-support {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
body.theme-home .discovery-quick-links.is-pending button {
    visibility: visible;
    opacity: 1;
}
body.theme-home .discovery-hero h1 span { display: block; }

/* 標題字體系統：明體負責敘事感，黑體保留在內文、標籤與操作元件。 */
.logo-title,
.gallery-heading,
.detail-title,
.pin-title,
body.theme-home .discovery-hero h1,
body.theme-home .discovery-feature h2,
body.theme-home .discovery-panel h2,
body.theme-home .discovery-card-copy h3 {
    font-family: var(--font-display);
    font-weight: 600;
}
body.theme-home .discovery-hero h1,
.gallery-heading {
    line-height: 1.25;
    letter-spacing: .035em;
}
body.theme-home .discovery-feature h2 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.28;
    letter-spacing: .02em;
}
body.theme-home .discovery-panel h2,
body.theme-home .discovery-card-copy h3,
.detail-title,
.pin-title { letter-spacing: .012em; }

/* 首頁推薦輪播：中央主作品搭配左右可點擊縮圖，保留鍵盤、圓點與觸控。 */
.discovery-carousel {
    position: relative;
    outline: none;
}
.discovery-carousel:focus-visible {
    border-radius: 18px;
    outline: 3px solid var(--focus-ring);
    outline-offset: 5px;
}
.discovery-carousel-track {
    position: relative;
    height: clamp(330px, 40vw, 520px);
    overflow: hidden;
    overflow: clip;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}
.discovery-carousel-track.is-dragging { cursor: grabbing; }
.discovery-carousel-track.is-dragging .discovery-carousel-slide { transition: none !important; }
.discovery-carousel-track img {
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}
.discovery-carousel-slide {
    position: absolute;
    z-index: 0;
    top: 0;
    left: 50%;
    width: 72%;
    height: 100%;
    min-width: 0;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) scale(.6667);
    transform-origin: center;
    backface-visibility: hidden;
    will-change: transform, opacity;
    transition: opacity .28s ease, transform .34s cubic-bezier(.22,.75,.28,1), left .34s cubic-bezier(.22,.75,.28,1), visibility 0s linear .34s;
}
.discovery-carousel-slide.is-active {
    z-index: 3;
    left: 50%;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
    transition-delay: 0s;
}
.discovery-carousel-track:not(.is-dragging) .discovery-carousel-slide.is-active,
.discovery-carousel-track:not(.is-dragging) .discovery-carousel-slide.is-active .discovery-feature-image-link {
    cursor: grab;
}
.discovery-carousel-slide.is-prev,
.discovery-carousel-slide.is-next {
    z-index: 1;
    visibility: visible;
    opacity: .72;
    pointer-events: auto;
    cursor: pointer;
    transition-delay: 0s;
}
.discovery-carousel-slide.is-prev { left: 6%; transform: translateX(-50%) scale(.6667); }
.discovery-carousel-slide.is-next { left: 94%; transform: translateX(-50%) scale(.6667); }
.discovery-carousel-slide.is-prev:hover,
.discovery-carousel-slide.is-next:hover { opacity: .94; transform: translateX(-50%) scale(.6667); }
body.theme-home .discovery-hero {
    background-attachment: scroll;
}
body.theme-home .discovery-carousel-slide .discovery-feature {
    height: 100%;
    aspect-ratio: auto;
    isolation: isolate;
    backface-visibility: hidden;
    clip-path: inset(0 round 16px);
}
body.theme-home .discovery-carousel-slide .discovery-feature > :not(.discovery-feature-image-link) {
    opacity: 1;
    visibility: visible;
    transition: opacity .16s ease .1s, visibility 0s linear 0s;
}
body.theme-home .discovery-carousel-slide .discovery-feature::after {
    opacity: 1;
    transition: opacity .18s ease .08s;
}
body.theme-home .discovery-carousel-slide.is-prev .discovery-feature > :not(.discovery-feature-image-link),
body.theme-home .discovery-carousel-slide.is-next .discovery-feature > :not(.discovery-feature-image-link) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .12s ease, visibility 0s linear .12s;
}
body.theme-home .discovery-carousel-slide.is-prev .discovery-feature::after,
body.theme-home .discovery-carousel-slide.is-next .discovery-feature::after {
    opacity: 0;
    transition-delay: 0s;
}
.discovery-carousel-track.is-dragging .discovery-carousel-slide .discovery-feature > :not(.discovery-feature-image-link) {
    opacity: var(--discovery-content-opacity, 0) !important;
    visibility: visible !important;
    transition: none !important;
}
.discovery-carousel-track.is-dragging .discovery-carousel-slide .discovery-feature::after {
    opacity: var(--discovery-overlay-opacity, 0) !important;
    transition: none !important;
}
body.theme-home .discovery-carousel-slide.is-prev .discovery-feature-image-link,
body.theme-home .discovery-carousel-slide.is-next .discovery-feature-image-link {
    display: block;
    overflow: hidden;
    border-radius: inherit;
}
.discovery-carousel-slide.is-prev .discovery-feature-image,
.discovery-carousel-slide.is-next .discovery-feature-image { filter: saturate(.82) brightness(.82); }
.discovery-carousel-slide.is-prev:hover .discovery-feature-image,
.discovery-carousel-slide.is-next:hover .discovery-feature-image { filter: saturate(1) brightness(.96); }
.discovery-carousel-slide.is-prev:focus-visible,
.discovery-carousel-slide.is-next:focus-visible {
    border-radius: 14px;
    outline: 3px solid var(--focus-ring);
    outline-offset: 4px;
}
.discovery-carousel-control {
    display: none;
}
.discovery-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}
.discovery-carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #C8C2BB;
    cursor: pointer;
    transition: width .18s ease, background-color .18s ease;
}
.discovery-carousel-dot[aria-current="true"] { width: 22px; border-radius: 999px; background: #4B4655; }
.discovery-carousel-dot:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
@media (min-width: 769px) {
    body.theme-home .discovery-stage { max-width: 1240px; }
}
@media (max-width: 768px) {
    .discovery-carousel-track { height: clamp(300px, 82vw, 430px); }
    .discovery-carousel-slide { width: 86%; }
    .discovery-carousel-slide.is-prev,
    .discovery-carousel-slide.is-next { opacity: .58; }
    .discovery-carousel-slide.is-prev { left: 1%; }
    .discovery-carousel-slide.is-next { left: 99%; }
}
@media (prefers-reduced-motion: reduce) {
    .discovery-carousel-slide,
    body.theme-home .discovery-carousel-slide .discovery-feature > :not(.discovery-feature-image-link),
    body.theme-home .discovery-carousel-slide .discovery-feature::after,
    .discovery-carousel-dot { transition: none !important; }
}

/* 篩選結果操作與長表單分組。 */
.filter-drawer-actions {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}
.filter-primary-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    width: auto;
    margin-left: auto;
}
.filter-live-result-count {
    flex: 1 1 auto;
    align-self: center;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 800;
}
.btn-filter-reset,
.btn-filter-done {
    min-height: 42px;
    border-radius: 8px;
    padding: 9px 16px;
    font: inherit;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
}
.btn-filter-reset {
    border: 1px solid var(--decor-border);
    background: transparent;
    color: var(--text-muted);
}
.btn-filter-done {
    display: none;
    border: 1px solid #33363F;
    background: #33363F;
    color: #FFF;
}
.form-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 26px 0 16px;
    padding-top: 22px;
    border-top: 1px solid var(--decor-border);
}
.upload-form-panel > .form-section-heading:first-child,
.management-fields > .form-section-heading:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
.form-section-number {
    display: grid;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    background: #33363F;
    color: #FFF;
    font-size: 11px;
    font-weight: 850;
}
.form-section-copy strong,
.form-section-copy small { display: block; }
.form-section-copy strong {
    color: #303238;
    font-size: 14px;
    line-height: 1.45;
}
.form-section-copy small {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 11.5px;
    line-height: 1.55;
}

/* 管理頁維持單一閱讀動線，刪除操作放在一般編輯內容之後。 */
.management-layout { grid-template-columns: minmax(0, 1fr); }
.danger-panel {
    padding: 20px 24px;
    background: rgba(255,255,255,.48);
}
.danger-panel h2 { margin-bottom: 6px; }

/* 無內容時使用完整欄寬並置中，不受卡片網格欄數影響。 */
#galleryGrid.centered-empty-gallery {
    display: grid;
    grid-template-columns: minmax(0, 840px);
    justify-content: center;
    width: 100%;
}
#galleryGrid.centered-empty-gallery .empty-state {
    width: 100%;
    margin: 0;
}

@media (max-width: 576px) {
    body.theme-home .discovery-hero {
        min-height: 600px;
        padding-inline: 20px;
    }
    body.theme-home .discovery-hero h1 {
        min-height: 0;
        font-size: clamp(32px, 9.2vw, 38px);
        line-height: 1.28;
        letter-spacing: -.025em;
        white-space: normal;
    }
    body.theme-home .discovery-hero p { min-height: 0; }

    .image-lightbox { padding: 60px 12px 44px; }
    .image-lightbox-content {
        width: 100%;
        height: min(78dvh, 760px);
    }
    .image-lightbox-image {
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        border-radius: 8px;
    }
    .image-lightbox-close { top: -48px; right: 4px; width: 36px; height: 36px; }
    .image-lightbox-nav { width: 40px; height: 40px; background: rgba(18,20,26,.78); }
    .image-lightbox-nav.prev { left: 8px; }
    .image-lightbox-nav.next { right: 8px; }
    .image-lightbox-count { right: 8px; bottom: -30px; }

    .advanced-filter-drawer { padding: 16px; }
    .drawer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 13px 10px;
    }
    .drawer-grid > .drawer-group:first-child,
    .drawer-group.span-2 { grid-column: 1 / -1; }
    .filter-drawer-actions {
        position: sticky;
        z-index: 2;
        bottom: -16px;
        margin: 18px -16px -16px;
        padding: 12px 16px;
        background: rgba(255,255,255,.96);
        box-shadow: 0 -8px 18px rgba(45,48,54,.05);
    }
    .filter-live-result-count { flex-basis: 100%; text-align: center; }
    .filter-primary-actions { display: grid; grid-template-columns: minmax(0, .7fr) minmax(0, 1.3fr); width: 100%; margin-left: 0; }
    .btn-filter-reset,
    .btn-filter-done { width: 100%; min-height: 44px; }
    .btn-filter-done { display: block; }

    .form-section-heading {
        margin-top: 24px;
        padding-top: 20px;
    }
    .management-panel { padding: 20px; }
    .danger-panel { padding: 18px 20px; }
}

/* 共用操作結果提示：不阻斷使用者後續操作。 */
.app-toast {
    position: fixed;
    z-index: 1450;
    left: 50%;
    bottom: 28px;
    max-width: calc(100% - 32px);
    padding: 12px 18px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 10px;
    background: #33363F;
    color: #FFF;
    box-shadow: 0 12px 34px rgba(0,0,0,.24);
    font-size: 13px;
    font-weight: 800;
    opacity: 0;
    transform: translate(-50%, 14px);
    transition: opacity .18s ease, transform .18s ease;
    pointer-events: none;
}
.app-toast.show { opacity: 1; transform: translate(-50%, 0); }
.app-toast.is-error { background: #8B3F3F; }
.app-toast[hidden] { display: none; }
button.is-busy {
    opacity: .68;
    cursor: wait;
    pointer-events: none;
}

/* 收合篩選後仍保留目前條件。 */
.active-filter-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    margin: 0 0 16px;
    padding: 0 24px;
    box-sizing: border-box;
}
.active-filter-summary[hidden] { display: none; }
.active-filter-summary-label {
    margin-right: 2px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
}
.active-filter-chip-list {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 7px;
}
.active-filter-clear {
    border: 0;
    background: transparent;
    color: var(--text-muted);
    padding: 6px 4px;
    font: inherit;
    font-size: 11.5px;
    font-weight: 800;
    cursor: pointer;
}
.empty-state-action {
    margin-top: 4px;
    border: 1px solid var(--decor-border);
    border-radius: 8px;
    padding: 9px 14px;
    background: #FFF;
    color: #33363F;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}
.empty-state-action:hover { border-color: #AAA39B; background: #FAF8F5; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 卡片標題固定兩行高度，標籤超過上限時顯示剩餘數量。 */
.housing-card .pin-title,
.rp-card .pin-title,
.event-card .pin-title,
.studio-list .pin-title,
.rp-standard-grid > .pin-card:not(.rp-card) .pin-title {
    min-height: 2.9em;
    max-height: 2.9em;
}
.pin-tag-overflow {
    border-style: dashed;
    opacity: .82;
}

@media (min-width: 1400px) {
    .active-filter-summary { padding-inline: 32px; }
}

@media (max-width: 576px) {
    .app-toast { bottom: 18px; }
    .active-filter-summary {
        margin-bottom: 14px;
        padding-inline: 16px;
    }
    .active-filter-clear {
        flex: 0 0 auto;
        min-height: 36px;
    }
}
