/* Motop Forum 樣式（色票變數由外掛在頁面內輸出；想改外觀請用 Code Snippets 或自訂 CSS 覆蓋）*/
/* ===== 基礎 ===== */
.motop-wrap,.motop-profile,.motop-form,.motop-list,.motop-boards,.motop-bell,.motop-notify-page{font-family:var(--mx-font);color:var(--mx-text);font-size:16px;line-height:1.65}
.motop-wrap *,.motop-profile *,.motop-form *,.motop-list *,.motop-boards *,.motop-bell *{box-sizing:border-box}
:where(.motop-wrap,.motop-profile,.motop-list,.motop-boards,.motop-form,.motop-bell) a{color:inherit;text-decoration:none}
:where(.motop-wrap,.motop-profile,.motop-list,.motop-boards,.motop-form) a:hover{color:var(--mx-accent)}
.motop-form,.motop-wrap,.motop-profile,.motop-bell{color-scheme:var(--mx-scheme)}

/* ===== 卡片外殼 ===== */
.motop-wrap,.motop-submit-form,.motop-auth-form,.motop-intro,.motop-profile-form,.motop-board-group,.motop-card{background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:var(--mx-radius);box-shadow:var(--mx-shadow)}
.motop-wrap{padding:28px;margin:24px 0}
.motop-submit-form{padding:28px;max-width:780px;margin:24px auto}
.motop-auth-form{padding:34px;max-width:440px;margin:40px auto}

/* ===== 徽章 / 提示 ===== */
.motop-badge{display:inline-block;background:linear-gradient(135deg,var(--mx-accent),var(--mx-accent2));color:#fff;font-size:11px;font-weight:700;letter-spacing:.08em;padding:1px 10px;border-radius:999px;margin-right:8px;vertical-align:middle;line-height:1.7}
.motop-badge-lock{background:var(--mx-muted)}
.motop-notice{background:var(--mx-inset);border-radius:12px;padding:14px 18px;color:var(--mx-muted)}
.motop-notice a{color:var(--mx-accent);font-weight:600}

/* ===== 文章卡片列表 ===== */
.motop-list{display:grid;gap:14px}
.motop-card{position:relative;display:flex;gap:18px;justify-content:space-between;align-items:flex-start;padding:20px 22px;margin:0;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.motop-card:hover{transform:translateY(-2px);border-color:var(--mx-line2);box-shadow:var(--mx-shadow-lg)}
.motop-card-main{min-width:0;flex:1}
.motop-card-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;font-size:13px;color:var(--mx-muted)}
.motop-card-meta a{color:var(--mx-soft);font-weight:600}
.motop-board-tag{background:var(--mx-accent-soft);color:var(--mx-accent);border-radius:999px;padding:1px 11px;font-size:12px;font-weight:700}
.motop-card-title{margin:8px 0 4px;font-size:19px;font-weight:700;line-height:1.45}
.motop-card-title a{color:var(--mx-text)}
.motop-card-excerpt{margin:6px 0 12px;color:var(--mx-muted);font-size:15px;line-height:1.7;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.motop-card-stats{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--mx-muted)}
.motop-card-thumb{width:108px;height:108px;object-fit:cover;border-radius:14px;flex-shrink:0;background:var(--mx-inset)}

/* ===== 看板列表（多層） ===== */
.motop-boards{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px}
.motop-board-group{padding:20px 22px}
.motop-board-group h3{margin:0 0 10px;padding-bottom:12px;font-size:17px;font-weight:800;border-bottom:1px solid var(--mx-line)}
.motop-board-group h3 a{color:var(--mx-text)}
.motop-board-tree{list-style:none;margin:0;padding:0}
.motop-board-tree li{padding:4px 0;font-size:15px;color:var(--mx-muted)}
.motop-board-tree li>a{color:var(--mx-soft)}
.motop-board-tree li>small{font-size:12px}
.motop-board-tree .motop-board-tree{margin:4px 0 4px 8px;padding-left:14px;border-left:2px solid var(--mx-line)}

/* ===== 單篇文章 ===== */
.motop-post-head{margin-bottom:18px}
.motop-crumb{font-size:13px;color:var(--mx-muted)}
.motop-crumb a{color:var(--mx-soft);font-weight:600}
.motop-author{display:flex;align-items:center;gap:12px;margin-top:12px}
.motop-author a{font-weight:700;color:var(--mx-text)}
.motop-avatar{width:44px;height:44px;border-radius:50%;object-fit:cover;background:var(--mx-inset);flex-shrink:0}
.motop-time{font-size:13px;color:var(--mx-muted)}
.motop-post-content{font-size:17px;line-height:1.95;color:var(--mx-soft);word-break:break-word}
.motop-post-content p{margin:0 0 1.2em}
.motop-post-content a{color:var(--mx-accent);text-decoration:underline;text-underline-offset:3px}
.motop-post-content h2,.motop-post-content h3{color:var(--mx-text);font-weight:800;margin:1.8em 0 .6em;padding-left:14px;border-left:4px solid var(--mx-accent);line-height:1.4}
.motop-post-content blockquote,.motop-editor-area blockquote{margin:1.2em 0;padding:10px 18px;border-left:3px solid var(--mx-accent);background:var(--mx-inset);border-radius:0 12px 12px 0;color:var(--mx-muted)}
.motop-post-content ul,.motop-post-content ol{padding-left:1.4em;margin:0 0 1.2em}
.motop-post-content li::marker{color:var(--mx-accent)}
.motop-post-content img,.motop-post-image{max-width:100%;height:auto;border-radius:14px;margin:.6em 0}

.motop-actions{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin:26px 0;padding:16px 0;border-top:1px solid var(--mx-line);border-bottom:1px solid var(--mx-line)}
.motop-like-btn{display:inline-flex;align-items:center;gap:8px;background:var(--mx-inset);border:1px solid transparent;color:var(--mx-soft);border-radius:999px;padding:8px 20px;font:inherit;font-size:15px;font-weight:700;cursor:pointer;transition:background .2s ease,color .2s ease,transform .15s ease}
.motop-like-btn:hover{background:var(--mx-line)}
.motop-like-btn:active{transform:scale(.96)}
.motop-like-btn .motop-heart{color:var(--mx-muted);transition:color .2s ease}
.motop-like-btn.is-liked{background:rgba(244,63,94,.12);color:var(--mx-like)}
.motop-like-btn.is-liked .motop-heart{color:var(--mx-like);animation:mx-pop .38s ease}
.motop-like-sm{padding:3px 14px;font-size:13px}
@keyframes mx-pop{0%{transform:scale(.6)}60%{transform:scale(1.4)}100%{transform:scale(1)}}

.motop-mod{position:relative;display:inline-block}
.motop-mod summary{cursor:pointer;list-style:none;color:var(--mx-muted);font-size:13px;padding:5px 14px;border:1px dashed var(--mx-line2);border-radius:999px}
.motop-mod summary::-webkit-details-marker{display:none}
.motop-mod summary:hover{color:var(--mx-accent);border-color:var(--mx-accent)}
.motop-mod[open]{z-index:10}
.motop-mod-menu{position:absolute;left:0;top:calc(100% + 8px);min-width:170px;padding:6px;background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:14px;box-shadow:var(--mx-shadow-lg)}
.motop-mod-btn{display:block;width:100%;text-align:left;background:none;border:0;border-radius:8px;padding:8px 14px;color:var(--mx-text);font:inherit;font-size:14px;cursor:pointer}
.motop-mod-btn:hover{background:var(--mx-inset)}
.motop-mod-btn.motop-danger{color:var(--mx-danger)}

/* ===== 留言 ===== */
.motop-comments h3{display:flex;align-items:center;gap:10px;margin:0 0 6px;font-size:19px;font-weight:800;color:var(--mx-text)}
.motop-comments h3::before{content:"";width:4px;height:20px;border-radius:2px;background:linear-gradient(var(--mx-accent),var(--mx-accent2))}
.motop-comment-count{font-size:13px;color:var(--mx-muted);background:var(--mx-inset);border-radius:999px;padding:0 10px;font-weight:600}
.motop-comment-list{display:flex;flex-direction:column;gap:14px;margin:16px 0 18px}
.motop-comment{display:flex;align-items:flex-start;gap:10px;border-radius:14px}
.motop-comment:target .motop-bubble{box-shadow:0 0 0 2px var(--mx-accent)}
.motop-comment .motop-avatar,.motop-composer .motop-avatar{width:36px;height:36px}
.motop-avatar-link{display:block;flex-shrink:0;line-height:0}
.motop-comment-main{flex:1;min-width:0}
.motop-bubble-row{display:flex;align-items:center;gap:4px}
.motop-bubble{position:relative;max-width:100%;min-width:0;background:var(--mx-inset);border-radius:18px;padding:8px 14px 9px}
.motop-comment-name{display:inline-block;font-size:13px;font-weight:700;color:var(--mx-text);line-height:1.4}
.motop-comment-text{margin-top:1px;font-size:15px;color:var(--mx-text);line-height:1.6;word-break:break-word}
.motop-quote{margin:4px 0 6px;padding:6px 10px;background:color-mix(in srgb,var(--mx-surface) 55%,transparent);border-left:3px solid var(--mx-accent);border-radius:8px;font-size:13px;line-height:1.5;color:var(--mx-muted)}
.motop-quote strong{color:var(--mx-soft)}
.motop-mention{color:var(--mx-accent);font-weight:700}
.motop-comment-meta{display:flex;align-items:center;gap:14px;padding:3px 0 0 14px;font-size:12px;color:var(--mx-muted)}
.motop-comment-meta .motop-time{font-size:12px}
.motop-reply-btn{background:none;border:0;padding:0;font:inherit;font-size:12px;font-weight:700;color:var(--mx-muted);cursor:pointer}
.motop-reply-btn:hover{color:var(--mx-accent);text-decoration:underline}
.motop-floor{font-size:11px;font-weight:700;color:var(--mx-muted);background:none;padding:0;letter-spacing:.04em}
.motop-cmenu{position:relative;flex-shrink:0}
.motop-cmenu summary{list-style:none;cursor:pointer;width:30px;height:30px;display:flex;align-items:center;justify-content:center;border-radius:50%;color:var(--mx-muted);font-size:18px;line-height:1;opacity:0;transition:opacity .15s ease,background .15s ease}
.motop-cmenu summary::-webkit-details-marker{display:none}
.motop-comment:hover .motop-cmenu summary,.motop-cmenu[open] summary,.motop-cmenu summary:focus-visible{opacity:1}
.motop-cmenu summary:hover{background:var(--mx-inset)}
@media (hover:none){.motop-cmenu summary{opacity:1}}
.motop-cmenu-list{position:absolute;right:0;top:34px;z-index:20;min-width:130px;background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:12px;padding:5px;box-shadow:var(--mx-shadow-lg)}
.motop-comment-form{margin-top:6px;max-width:none;gap:8px}
.motop-composer{display:flex;align-items:flex-start;gap:10px}
.motop-composer .motop-avatar{margin-top:2px}
.motop-composer-box{position:relative;flex:1;min-width:0}
.motop-form .motop-composer-box textarea{display:block;box-sizing:border-box;width:100%;height:40px;min-height:40px!important;max-height:200px;resize:none;overflow:hidden;border-radius:20px;padding:9px 48px 9px 16px;margin:0;line-height:22px;font-size:15px}
.motop-form .motop-composer-box button.motop-send{position:absolute;right:5px;top:5px;bottom:auto;width:30px!important;height:30px!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important;display:flex;align-items:center;justify-content:center;border:0!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;color:var(--mx-accent)!important;cursor:pointer;transition:background .15s ease,opacity .15s ease}
.motop-form .motop-composer-box button.motop-send:hover{background:var(--mx-accent-soft)!important}
.motop-form .motop-composer-box button.motop-send[disabled]{opacity:.4;cursor:wait}
.motop-send svg{display:block;width:20px;height:20px}
.motop-reply-banner{display:flex;justify-content:space-between;align-items:center;margin-left:46px;background:var(--mx-inset);border-left:3px solid var(--mx-accent);border-radius:10px;padding:6px 12px;font-size:13px;color:var(--mx-soft)}
.motop-reply-banner[hidden]{display:none}
.motop-reply-cancel{background:none;border:0;color:var(--mx-muted);cursor:pointer}
.motop-comment-form .motop-msg{margin-left:46px;min-height:0}

/* ===== 編輯文章 ===== */
.motop-edit-form{max-width:none;margin:0 0 24px}
.motop-edit-form[hidden],.motop-post-content[hidden]{display:none}
.motop-edit-title{margin:0;font-size:19px;font-weight:800;color:var(--mx-text)}
.motop-form-row{display:flex;gap:10px;flex-wrap:wrap}
.motop-edited{margin-left:2px}
.motop-card-edit{margin-left:auto;font-size:13px;font-weight:600;color:var(--mx-muted)}
.motop-card-edit:hover{color:var(--mx-accent)}

/* ===== 表單 ===== */
.motop-form{display:flex;flex-direction:column;gap:18px;max-width:720px}
.motop-field{display:flex;flex-direction:column;gap:6px}
.motop-form label{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:700;color:var(--mx-soft)}
.motop-label{font-size:14px;font-weight:700;color:var(--mx-soft)}
.motop-board-picker{gap:10px}
.motop-board-selects{display:flex;flex-wrap:wrap;gap:8px}
.motop-board-selects select{flex:1 1 190px;min-width:0}
.motop-board-results{max-height:280px;overflow:auto;background:var(--mx-surface);border:1px solid var(--mx-line2);border-radius:12px;padding:6px;box-shadow:var(--mx-shadow)}
.motop-board-results[hidden]{display:none}
.motop-board-results button{display:block;width:100%;text-align:left;background:none;border:0;border-radius:8px;padding:9px 12px;color:var(--mx-text);font:inherit;font-size:14px;cursor:pointer}
.motop-board-results button:hover{background:var(--mx-inset)}
.motop-board-empty{padding:10px 12px;color:var(--mx-muted);font-size:14px}
.motop-board-chosen{font-size:14px;color:var(--mx-muted)}
.motop-board-chosen.is-ok{color:var(--mx-ok);font-weight:700}
.motop-form input[type=text],.motop-form input[type=password],.motop-form input[type=email],.motop-form select,.motop-form textarea{width:100%;background:var(--mx-inset);border:1px solid transparent;border-radius:12px;color:var(--mx-text);padding:12px 14px;font:inherit;font-weight:400;box-shadow:none;transition:border-color .2s ease,box-shadow .2s ease,background .2s ease}
.motop-form input[type=text]:focus,.motop-form input[type=password]:focus,.motop-form input[type=email]:focus,.motop-form select:focus,.motop-form textarea:focus{outline:0;background:var(--mx-surface);border-color:var(--mx-accent);box-shadow:0 0 0 4px var(--mx-accent-soft)}
.motop-form ::placeholder{color:var(--mx-muted);opacity:.7}
.motop-form input[type=file]{width:100%;padding:12px;background:var(--mx-inset);border:1px dashed var(--mx-line2);border-radius:12px;color:var(--mx-muted);font-size:14px;font-weight:400}
.motop-form input[type=file]::file-selector-button{margin-right:12px;padding:7px 16px;background:var(--mx-surface);color:var(--mx-text);border:1px solid var(--mx-line2);border-radius:999px;cursor:pointer}
.motop-form .motop-check{flex-direction:row;align-items:center;gap:8px;font-weight:400;color:var(--mx-muted)}
.motop-form input[type=checkbox]{accent-color:var(--mx-accent);width:16px;height:16px}
.motop-form .motop-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important}
.motop-image-preview{max-width:260px;border-radius:14px}
.motop-image-preview[hidden]{display:none}
.motop-msg{min-height:1.2em;color:var(--mx-danger);font-size:14px}
.motop-msg.is-ok{color:var(--mx-ok)}

.motop-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;align-self:flex-start;background:linear-gradient(135deg,var(--mx-accent),var(--mx-accent2));color:#fff;border:0;border-radius:12px;padding:11px 28px;font:inherit;font-size:15px;font-weight:700;letter-spacing:.04em;cursor:pointer;box-shadow:0 8px 22px var(--mx-accent-glow);transition:transform .15s ease,box-shadow .2s ease,filter .2s ease}
.motop-btn:hover{transform:translateY(-1px);filter:brightness(1.07)}
.motop-btn:active{transform:scale(.98)}
.motop-btn[disabled]{opacity:.55;transform:none;box-shadow:none;cursor:wait}
a.motop-btn{color:#fff}
.motop-btn-sm{padding:8px 18px;font-size:14px;box-shadow:none}
.motop-btn.motop-btn-ghost{background:var(--mx-inset);color:var(--mx-text);box-shadow:none}
a.motop-btn.motop-btn-ghost{color:var(--mx-text)}
.motop-btn.motop-btn-ghost:hover{background:var(--mx-line)}

.motop-auth-form h2{margin:0 0 2px;font-size:28px;font-weight:800;color:var(--mx-text)}
.motop-auth-form p{margin:0;color:var(--mx-muted);font-size:14px}
.motop-auth-form .motop-btn{align-self:stretch}
.motop-auth-links{display:flex;gap:14px;flex-wrap:wrap;font-size:14px}
.motop-auth-links a{color:var(--mx-muted)}

/* ===== 富文本編輯器 ===== */
.motop-editor{background:var(--mx-inset);border:1px solid transparent;border-radius:14px;overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease}
.motop-editor:focus-within{border-color:var(--mx-accent);box-shadow:0 0 0 4px var(--mx-accent-soft)}
.motop-toolbar{display:flex;flex-wrap:wrap;gap:2px;padding:8px;background:var(--mx-surface2);border-bottom:1px solid var(--mx-line)}
.motop-toolbar button{min-width:36px;height:34px;border:0;border-radius:8px;background:transparent;color:var(--mx-soft);font:inherit;font-size:14px;cursor:pointer;transition:background .15s ease,color .15s ease}
.motop-toolbar button:hover{background:var(--mx-accent-soft);color:var(--mx-accent)}
.motop-tb-sep{width:1px;margin:5px 6px;background:var(--mx-line2)}
.motop-editor-area{min-height:280px;max-height:65vh;overflow:auto;padding:16px 18px;outline:0;color:var(--mx-text);font-size:16px;line-height:1.85;font-weight:400;scrollbar-width:thin}
.motop-editor-area:empty::before{content:attr(data-placeholder);color:var(--mx-muted);opacity:.7;pointer-events:none}
.motop-editor-area img{max-width:100%;height:auto;border-radius:12px}
.motop-editor-area a{color:var(--mx-accent)}
.motop-editor.is-uploading{opacity:.55;pointer-events:none}

/* ===== 個人主頁（臉書版型） ===== */
.motop-profile{max-width:1000px;margin:0 auto;padding:0 16px 40px}
.motop-profile-top{background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:0 0 var(--mx-radius) var(--mx-radius);box-shadow:var(--mx-shadow);overflow:hidden}
.motop-cover{position:relative;height:clamp(180px,32vw,340px);background:var(--mx-cover);background-size:cover;background-position:center;background-repeat:no-repeat}
.motop-cam{position:absolute;display:inline-flex;align-items:center;justify-content:center;gap:6px;background:rgba(255,255,255,.94);color:#111827;border:0;border-radius:10px;padding:8px 14px;font:inherit;font-size:14px;font-weight:700;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.2);transition:transform .15s ease}
.motop-cam:hover{transform:translateY(-1px)}
.motop-cover .motop-cam{right:18px;bottom:18px}
.motop-profile-bar{position:relative;display:flex;align-items:flex-end;gap:22px;padding:0 28px 20px;margin-top:-68px}
.motop-avatar-wrap{position:relative;flex-shrink:0}
.motop-avatar-lg{display:block;width:148px;height:148px;border-radius:50%;object-fit:cover;background:var(--mx-inset);border:5px solid var(--mx-surface)}
.motop-avatar-wrap .motop-cam{width:38px;height:38px;padding:0;border-radius:50%;right:4px;bottom:10px;background:var(--mx-inset);color:var(--mx-text);box-shadow:0 2px 8px rgba(0,0,0,.25)}
.motop-profile-info{flex:1;min-width:0;padding-bottom:6px}
.motop-profile-info h1{margin:0;font-size:30px;line-height:1.25;font-weight:800;color:var(--mx-text)}
.motop-profile-sub{margin-top:4px;color:var(--mx-muted);font-size:15px}
.motop-profile-actions{padding-bottom:8px}
.motop-tabs{display:flex;gap:4px;padding:0 20px;border-top:1px solid var(--mx-line);overflow-x:auto;scrollbar-width:none}
.motop-tabs a{white-space:nowrap;padding:14px 18px;margin-bottom:-1px;color:var(--mx-muted);font-weight:700;border-bottom:3px solid transparent;transition:color .15s ease,background .15s ease}
.motop-tabs a:hover{color:var(--mx-text);background:var(--mx-inset)}
.motop-tabs a.is-active{color:var(--mx-accent);border-bottom-color:var(--mx-accent);background:transparent}
.motop-profile-grid{display:grid;grid-template-columns:340px minmax(0,1fr);gap:16px;margin-top:16px;align-items:start}
.motop-intro{position:sticky;top:16px;padding:20px 22px}
.motop-intro h3{margin:0 0 10px;font-size:19px;font-weight:800}
.motop-bio{margin:0 0 14px;color:var(--mx-soft);font-size:15px;line-height:1.8;word-break:break-word}
.motop-stat-list{list-style:none;margin:0;padding:0}
.motop-stat-list li{display:flex;justify-content:space-between;padding:10px 0;border-top:1px solid var(--mx-line);font-size:15px;color:var(--mx-muted)}
.motop-stat-list b{color:var(--mx-text);font-weight:800}
.motop-profile-form{padding:24px;max-width:none}
.motop-pager{margin-top:20px;text-align:center}
.motop-pager .page-numbers{display:inline-block;min-width:38px;padding:6px 12px;margin:0 3px;border-radius:10px;background:var(--mx-surface);border:1px solid var(--mx-line);color:var(--mx-soft)}
.motop-pager a.page-numbers:hover{border-color:var(--mx-accent);color:var(--mx-accent)}
.motop-pager .page-numbers.current{background:linear-gradient(135deg,var(--mx-accent),var(--mx-accent2));border-color:transparent;color:#fff}

/* ===== 通知鈴鐺 ===== */
.motop-bell{position:relative;display:inline-block}
.motop-bell-float{position:fixed;right:18px;bottom:18px;z-index:9999}
.motop-bell-btn{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border-radius:50%;border:1px solid var(--mx-line);background:var(--mx-surface);color:var(--mx-muted);cursor:pointer;box-shadow:var(--mx-shadow);transition:transform .15s ease,color .15s ease}
.motop-bell-btn:hover{transform:translateY(-1px);color:var(--mx-text)}
.motop-bell-badge{position:absolute;top:-5px;right:-5px;display:flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:var(--mx-like);box-shadow:0 0 0 2px var(--mx-surface);color:#fff;font-size:11px;font-weight:700;line-height:1;font-variant-numeric:tabular-nums}
.motop-bell-badge[hidden]{display:none}
.motop-bell-panel{position:absolute;right:0;bottom:54px;width:min(350px,calc(100vw - 36px));max-height:440px;overflow:auto;background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:18px;box-shadow:var(--mx-shadow-lg);font-size:14px;scrollbar-width:thin}
.motop-bell-panel[hidden]{display:none}
.motop-bell-inline{position:static;width:auto;max-height:none;max-width:720px;margin:24px auto;box-shadow:var(--mx-shadow)}
.motop-n-head{display:flex;justify-content:space-between;align-items:center;padding:14px 16px;border-bottom:1px solid var(--mx-line);font-weight:800}
.motop-n-head button{background:none;border:0;color:var(--mx-accent);font:inherit;font-weight:700;cursor:pointer}
.motop-n-item{display:flex;gap:12px;padding:14px 16px;border-bottom:1px solid var(--mx-line);line-height:1.55;cursor:pointer;transition:background .15s ease}
.motop-n-item:hover{background:var(--mx-inset)}
.motop-n-item.is-unread{background:var(--mx-accent-soft)}
.motop-n-item img{width:36px;height:36px;border-radius:50%;flex-shrink:0}
.motop-n-time{color:var(--mx-muted);font-size:12px}

/* ===== 稱號 ===== */
.motop-title{display:inline-block;margin-left:6px;padding:0 9px;border-radius:999px;font-size:11px;font-weight:700;line-height:1.7;letter-spacing:.03em;white-space:nowrap;vertical-align:middle;color:var(--t,var(--mx-accent));background:color-mix(in srgb,var(--t,var(--mx-accent)) 14%,transparent)}
.motop-profile-info h1 .motop-title{font-size:13px;vertical-align:middle;margin-left:10px}

/* ===== 左側看板欄（桌機）／額外選單（手機） ===== */
:root{--mx-side-w:264px;--mx-side-top:0px}
body.admin-bar{--mx-side-top:32px}
.motop-side{position:fixed;z-index:100000;left:0;top:var(--mx-side-top);bottom:0;width:var(--mx-side-w);display:flex;flex-direction:column;gap:10px;padding:16px 12px 24px;background:var(--mx-surface);border-right:1px solid var(--mx-line);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;font-family:var(--mx-font);font-size:15px;line-height:1.5;color:var(--mx-text);color-scheme:var(--mx-scheme);box-sizing:border-box}
.motop-side *{box-sizing:border-box}
.motop-side a{text-decoration:none}
.motop-side-head{display:none;align-items:center;justify-content:space-between;font-size:17px}
.motop-side-close{background:var(--mx-inset);border:0;width:34px;height:34px;border-radius:50%;color:var(--mx-text);font-size:15px;cursor:pointer}
.motop-side-title{font-size:12px;font-weight:800;letter-spacing:.12em;color:var(--mx-muted);padding:4px 8px 0}
.motop-side .motop-side-search{display:block;width:100%;height:auto;background:var(--mx-inset);border:1px solid transparent!important;border-radius:999px;color:var(--mx-text);padding:8px 14px;margin:0;font:inherit;font-size:14px;box-shadow:none!important;outline:0!important;-webkit-appearance:none;appearance:none}
.motop-side .motop-side-search:focus{background:var(--mx-surface);border-color:var(--mx-accent)!important;box-shadow:0 0 0 3px var(--mx-accent-soft)!important}
.motop-side .motop-side-search::placeholder{color:var(--mx-muted);opacity:.8}
.motop-side-tree{display:flex;flex-direction:column;gap:1px}
.motop-side-link{display:block;padding:7px 10px;border-radius:10px;color:var(--mx-soft);font-size:14.5px}
.motop-side-link:hover{background:var(--mx-inset);color:var(--mx-text)}
.motop-side-link.is-current{background:var(--mx-accent-soft);color:var(--mx-accent);font-weight:700}
.motop-side-all{color:var(--mx-muted);font-size:13.5px}
.motop-side-home{font-weight:700;color:var(--mx-text)}
.motop-node>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;list-style:none;cursor:pointer;padding:7px 10px;border-radius:10px;font-weight:700;color:var(--mx-text);font-size:14.5px;user-select:none}
.motop-node>summary::-webkit-details-marker{display:none}
.motop-node>summary::after{content:"";width:7px;height:7px;border-right:2px solid var(--mx-muted);border-bottom:2px solid var(--mx-muted);transform:rotate(-45deg);transition:transform .18s ease;flex-shrink:0;margin-right:3px}
.motop-node[open]>summary::after{transform:rotate(45deg)}
.motop-node>summary:hover{background:var(--mx-inset)}
.motop-node-kids{margin:1px 0 4px 12px;padding-left:8px;border-left:1px solid var(--mx-line)}
.motop-node .motop-node>summary{font-weight:600;color:var(--mx-soft)}
.motop-side-empty{margin:8px 10px;color:var(--mx-muted);font-size:14px}
.motop-side-empty[hidden],.motop-side [hidden]{display:none!important}
.motop-side-account{display:none}
.motop-side-me{display:flex;align-items:center;gap:10px;padding:8px;border-radius:12px;background:var(--mx-inset);color:var(--mx-text);font-weight:700}
.motop-side-me small{display:block;font-weight:400;font-size:12px;color:var(--mx-muted)}
.motop-side-me .motop-avatar{width:40px;height:40px}
.motop-side-acts{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.motop-side-acts .motop-btn{align-self:auto;flex:1 1 auto}
.motop-side-toggle,.motop-side-backdrop{display:none}
@media (min-width:1025px){
  body.motop-has-side{padding-left:var(--mx-side-w)}
}
@media (max-width:1024px){
  .motop-side{top:0;width:min(86vw,330px);transform:translateX(-105%);visibility:hidden;transition:transform .26s ease,visibility 0s linear .26s;box-shadow:var(--mx-shadow-lg);border-right:0}
  .motop-side.is-open{transform:none;visibility:visible;transition:transform .26s ease}
  .motop-side-head,.motop-side-account{display:flex}
  .motop-side-account{flex-direction:column;padding-bottom:10px;border-bottom:1px solid var(--mx-line)}
  .motop-side-toggle{display:flex;position:fixed;z-index:99990;left:14px;bottom:18px;width:48px;height:48px;align-items:center;justify-content:center;border:0;border-radius:50%;background:linear-gradient(135deg,var(--mx-accent),var(--mx-accent2));color:#fff;cursor:pointer;box-shadow:0 8px 22px var(--mx-accent-glow)}
  .motop-side-backdrop{position:fixed;z-index:99999;inset:0;background:rgba(0,0,0,.5)}
  .motop-side-backdrop:not([hidden]){display:block}
  .motop-side-backdrop[hidden]{display:none}
  body.motop-side-open{overflow:hidden}
}

/* 已有左側 / 手機選單的看板欄，頁面裡 [motop_boards] 的那一大塊看板清單就不再重複顯示 */
body.motop-has-side .motop-boards{display:none!important}

/* ===== 頭像 / 封面裁切視窗 ===== */
.motop-crop{position:fixed;inset:0;z-index:100010;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(0,0,0,.62);font-family:var(--mx-font)}
.motop-crop-panel{width:max-content;max-width:100%;background:var(--mx-surface);color:var(--mx-text);border:1px solid var(--mx-line);border-radius:18px;padding:20px;box-shadow:var(--mx-shadow-lg);display:flex;flex-direction:column;gap:14px;align-items:center}
.motop-crop-title{font-size:17px;font-weight:800}
.motop-crop-view{position:relative;overflow:hidden;background:#000;border-radius:12px;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.motop-crop-view:active{cursor:grabbing}
.motop-crop-view img{position:absolute;max-width:none!important;max-height:none!important;margin:0!important;border-radius:0!important;pointer-events:none;user-select:none;-webkit-user-drag:none}
.motop-crop-view.is-round::after{content:"";position:absolute;inset:0;border-radius:50%;box-shadow:0 0 0 999px rgba(0,0,0,.55);outline:2px solid rgba(255,255,255,.85);outline-offset:-2px;pointer-events:none}
.motop-crop-zoom{width:100%;accent-color:var(--mx-accent)}
.motop-crop-hint{font-size:12.5px;color:var(--mx-muted)}
.motop-crop-actions{display:flex;gap:10px;align-self:stretch;justify-content:flex-end}

/* ===== 手機版 ===== */
@media (max-width:760px){
  .motop-profile-grid{grid-template-columns:1fr}
  .motop-intro{position:static}
}
@media (max-width:640px){
  .motop-wrap{padding:20px 16px;margin:16px 0}
  .motop-submit-form{padding:22px 16px}
  .motop-auth-form{padding:26px 20px;margin:20px auto}
  .motop-profile{padding:0 0 28px}
  .motop-profile-top{border-radius:0 0 var(--mx-radius) var(--mx-radius)}
  .motop-profile-grid{padding:0 12px}
  .motop-profile-bar{flex-direction:column;align-items:center;text-align:center;padding:0 16px 18px;margin-top:-60px;gap:10px}
  .motop-avatar-lg{width:120px;height:120px}
  .motop-profile-info h1{font-size:24px}
  .motop-tabs{padding:0 8px}
  .motop-tabs a{padding:12px 14px}
  .motop-card{padding:16px;gap:12px}
  .motop-card-thumb{width:78px;height:78px}
  .motop-card-title{font-size:17px}
  .motop-post-content{font-size:16px}
}
@media (prefers-reduced-motion:reduce){
  .motop-card,.motop-btn,.motop-like-btn,.motop-bell-btn,.motop-cam{transition:none}
  .motop-like-btn.is-liked .motop-heart{animation:none}
}

/* ===== 1.6.0：標籤 / 地區 / 優質 / 置頂 ===== */
.motop-tags{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0 0}
.motop-tag{display:inline-block;padding:3px 12px;border-radius:999px;background:var(--mx-accent-soft);color:var(--mx-accent);font-size:13px;font-weight:700;text-decoration:none}
.motop-tag:hover{background:var(--mx-accent);color:#fff}
:where(.motop-wrap) a.motop-tag:hover{color:#fff}
.motop-region{display:inline-block;margin-left:6px;padding:0 9px;border-radius:999px;background:var(--mx-inset);color:var(--mx-soft);font-size:12px;font-weight:600;line-height:1.8;vertical-align:middle;white-space:nowrap}
.motop-badge-quality{background:linear-gradient(135deg,#f5b301,#ff8a00)}
.motop-hint{margin:0;color:var(--mx-muted);font-size:13.5px;line-height:1.6}
.motop-hint a{color:var(--mx-accent);font-weight:600}
.motop-pin-label{color:var(--mx-accent);font-weight:700}
.motop-comment.is-pinned .motop-bubble{background:var(--mx-accent-soft);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--mx-accent) 35%,transparent)}
.motop-board-tag+.motop-badge-quality,.motop-card-title .motop-badge-quality{margin-left:0}

/* 發文：標籤選擇器 */
.motop-tagpicker{gap:10px}
.motop-tagpicker-presets,.motop-tagpicker-picked{display:flex;flex-wrap:wrap;gap:8px}
.motop-form button.motop-tagchip{background:var(--mx-inset);border:1px solid transparent;border-radius:999px;color:var(--mx-soft);font:inherit;font-size:14px;font-weight:600;padding:5px 14px;cursor:pointer;transition:background .15s ease,color .15s ease}
.motop-form button.motop-tagchip:hover{background:var(--mx-line)}
.motop-form button.motop-tagchip.is-on{background:var(--mx-accent-soft);color:var(--mx-accent);border-color:color-mix(in srgb,var(--mx-accent) 45%,transparent)}
.motop-tagpicker-custom{display:flex;gap:8px;align-items:center}
.motop-tagpicker-custom .motop-tag-input{flex:1;min-width:0}
.motop-tagpicker-custom .motop-btn{align-self:auto}
.motop-region-field{gap:10px}

/* ===== 彈窗（檢舉 / 離站提醒） ===== */
.motop-modal{position:fixed;inset:0;z-index:100020;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(0,0,0,.6);font-family:var(--mx-font)}
.motop-modal-panel{width:min(460px,100%);max-height:90vh;overflow:auto;background:var(--mx-surface);color:var(--mx-text);border:1px solid var(--mx-line);border-radius:18px;padding:22px;box-shadow:var(--mx-shadow-lg);display:flex;flex-direction:column;gap:12px;color-scheme:var(--mx-scheme);line-height:1.6}
.motop-modal-panel h3{margin:0;font-size:19px;font-weight:800;color:var(--mx-text)}
.motop-modal-panel p{margin:0}
.motop-modal-panel form{display:flex;flex-direction:column;gap:10px}
.motop-modal-panel textarea{width:100%;background:var(--mx-inset);border:1px solid transparent;border-radius:12px;color:var(--mx-text);padding:10px 12px;font:inherit;resize:vertical}
.motop-modal-panel textarea:focus{outline:0;border-color:var(--mx-accent);box-shadow:0 0 0 3px var(--mx-accent-soft)}
.motop-radio{display:flex;align-items:center;gap:8px;padding:6px 2px;cursor:pointer;color:var(--mx-soft)}
.motop-radio input{accent-color:var(--mx-accent);width:16px;height:16px}
.motop-modal-acts{display:flex;gap:10px;justify-content:flex-end;margin-top:4px}
.motop-modal-acts .motop-btn{align-self:auto}
.motop-ext-url{word-break:break-all;background:var(--mx-inset);border-radius:12px;padding:10px 14px;font-family:var(--mx-mono);font-size:13.5px;color:var(--mx-text)}

/* ===== 內建頁面（私訊 / 檢舉處理 / 約騎） ===== */
.motop-page{max-width:1000px;margin:32px auto;padding:0 16px;font-family:var(--mx-font);color:var(--mx-text);font-size:16px;line-height:1.65}
.motop-page *{box-sizing:border-box}
.motop-page-title{margin:0 0 18px;font-size:28px;font-weight:800;color:var(--mx-text)}
.motop-page a{text-decoration:none}

/* 約騎 */
.motop-ride-top{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.motop-page .motop-tabs.motop-tabs-inline,.motop-tabs.motop-tabs-inline{display:inline-flex;max-width:100%;gap:2px;padding:4px;border:0;border-radius:999px;background:var(--mx-inset);overflow:visible}
.motop-tabs.motop-tabs-inline a{margin:0;padding:7px 18px;border:0;border-radius:999px;background:transparent;color:var(--mx-muted);box-shadow:none!important}
.motop-tabs.motop-tabs-inline a:hover{background:transparent;color:var(--mx-text)}
.motop-tabs.motop-tabs-inline a.is-active{background:var(--mx-surface);color:var(--mx-accent);box-shadow:0 1px 3px rgba(0,0,0,.18)!important}
.motop-page .motop-btn,.motop-side .motop-btn{color:#fff}
.motop-page .motop-btn-ghost{color:var(--mx-text)}
.motop-ride-meta{list-style:none;margin:8px 0 12px;padding:0;display:flex;flex-wrap:wrap;gap:6px 18px;color:var(--mx-soft);font-size:14.5px}
.motop-ride-card.is-past{opacity:.72}
.motop-ride-info{margin:0 0 22px;padding:16px 18px;border-radius:14px;background:var(--mx-accent-soft);border:1px solid color-mix(in srgb,var(--mx-accent) 30%,transparent)}
.motop-ride-info.is-past{background:var(--mx-inset);border-color:var(--mx-line)}
.motop-ride-head{font-weight:800;margin-bottom:10px;display:flex;align-items:center;gap:8px}
.motop-ride-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px 20px;margin:0}
.motop-ride-grid dt{font-size:12.5px;color:var(--mx-muted);font-weight:700;letter-spacing:.04em}
.motop-ride-grid dd{margin:2px 0 0;font-weight:700;color:var(--mx-text)}
.motop-ride-note{margin-top:12px;padding-top:12px;border-top:1px dashed var(--mx-line2);color:var(--mx-soft);font-size:15px}
.motop-ride-note strong{display:block;margin-bottom:2px;color:var(--mx-text)}
.motop-ride-form{max-width:640px;background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:var(--mx-radius);padding:26px;box-shadow:var(--mx-shadow)}
.motop-form input[type=datetime-local]{width:100%;background:var(--mx-inset);border:1px solid transparent;border-radius:12px;color:var(--mx-text);padding:12px 14px;font:inherit;font-weight:400;color-scheme:var(--mx-scheme)}

/* 檢舉處理 */
.motop-queue{display:flex;flex-direction:column;gap:14px}
.motop-rp{background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:var(--mx-radius);padding:18px 20px;box-shadow:var(--mx-shadow);display:flex;flex-direction:column;gap:10px}
.motop-rp-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
.motop-rp-detail{margin:0;color:var(--mx-soft);font-size:14.5px}
.motop-rp-snap{margin:0;padding:10px 14px;border-left:3px solid var(--mx-line2);background:var(--mx-inset);border-radius:0 12px 12px 0;color:var(--mx-soft);word-break:break-word}
.motop-rp-img{max-width:240px;max-height:200px;border-radius:12px;object-fit:cover}
.motop-rp-acts{display:flex;flex-wrap:wrap;gap:8px}
.motop-rp-acts .motop-btn{align-self:auto}

/* 個人頁：他人操作 / 封鎖名單 */
.motop-profile-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.motop-profile-actions .motop-btn{align-self:auto}
.motop-cmenu-btn summary{opacity:1;width:auto;height:34px;padding:0 14px;border:1px solid var(--mx-line2);border-radius:999px;font-size:16px}
.motop-cmenu-btn .motop-cmenu-list{top:auto;bottom:42px}
.motop-blocked-list{display:flex;flex-direction:column;gap:10px}
.motop-blocked-row{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:14px;padding:10px 14px}
.motop-blocked-row a{display:flex;align-items:center;gap:10px;font-weight:700;color:var(--mx-text)}
.motop-blocked-row .motop-avatar{width:40px;height:40px}
.motop-dm-badge{display:inline-block;min-width:18px;height:18px;line-height:18px;padding:0 5px;border-radius:9px;background:var(--mx-like);color:#fff;font-size:11px;font-weight:800;text-align:center;vertical-align:middle}
.motop-dm-badge[hidden]{display:none}

/* ===== 私訊 ===== */
.motop-dm{display:grid;grid-template-columns:300px 1fr;height:min(72vh,660px);min-height:420px;background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:var(--mx-radius);box-shadow:var(--mx-shadow);overflow:hidden}
.motop-dm-list{overflow-y:auto;border-right:1px solid var(--mx-line);padding:8px;display:flex;flex-direction:column;gap:2px}
.motop-dm-item{display:flex;align-items:center;gap:10px;width:100%;text-align:left;background:none;border:0;border-radius:12px;padding:10px;cursor:pointer;color:var(--mx-text);font:inherit}
.motop-dm-item:hover,.motop-dm-item.is-active{background:var(--mx-inset)}
.motop-dm-item .motop-avatar{width:44px;height:44px}
.motop-dm-item-main{flex:1;min-width:0;display:flex;flex-direction:column}
.motop-dm-item-main b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.motop-dm-item-main small{color:var(--mx-muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.motop-dm-item-side{display:flex;flex-direction:column;align-items:flex-end;gap:4px;color:var(--mx-muted);font-size:12px}
.motop-dm-unread{font-style:normal;min-width:20px;height:20px;line-height:20px;padding:0 6px;border-radius:10px;background:var(--mx-accent);color:#fff;font-size:12px;font-weight:800;text-align:center}
.motop-dm-thread{display:flex;flex-direction:column;min-width:0;min-height:0}
.motop-dm-thread[hidden],.motop-dm-empty[hidden],.motop-dm-form[hidden]{display:none}
.motop-dm-empty{display:flex;align-items:center;justify-content:center;padding:24px;text-align:center}
.motop-dm-head{display:flex;align-items:center;gap:10px;padding:12px 16px;border-bottom:1px solid var(--mx-line)}
.motop-dm-back{display:none;background:none;border:0;font-size:28px;line-height:1;color:var(--mx-text);cursor:pointer;padding:0 8px 4px 0}
.motop-dm-peer{display:flex;align-items:center;gap:10px;font-weight:800;color:var(--mx-text)}
.motop-dm-peer .motop-avatar{width:36px;height:36px}
.motop-dm-msgs{flex:1;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:10px;background:var(--mx-surface2)}
.motop-msg-row{display:flex;flex-direction:column;align-items:flex-start;gap:2px;max-width:78%}
.motop-msg-row.is-mine{align-self:flex-end;align-items:flex-end}
.motop-msg-body{padding:9px 14px;border-radius:18px;background:var(--mx-surface);border:1px solid var(--mx-line);color:var(--mx-text);line-height:1.55;word-break:break-word}
.motop-msg-row.is-mine .motop-msg-body{background:var(--mx-accent);border-color:transparent;color:#fff}
.motop-msg-row.is-mine .motop-msg-body a{color:#fff;text-decoration:underline}
.motop-msg-time{font-size:11.5px;color:var(--mx-muted);padding:0 6px}
.motop-dm-form{position:relative;padding:10px 14px;border-top:1px solid var(--mx-line)}
.motop-dm-form textarea{display:block;width:100%;box-sizing:border-box;resize:none;overflow:hidden;height:40px;min-height:40px;max-height:160px;border-radius:20px;border:1px solid transparent;background:var(--mx-inset);color:var(--mx-text);padding:9px 48px 9px 16px;font:inherit;font-size:15px;line-height:22px;margin:0}
.motop-dm-form textarea:focus{outline:0;background:var(--mx-surface);border-color:var(--mx-accent);box-shadow:0 0 0 3px var(--mx-accent-soft)}
.motop-dm-form button.motop-send{position:absolute;right:19px;top:15px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;padding:0;margin:0;border:0;border-radius:50%;background:transparent;color:var(--mx-accent);cursor:pointer}
.motop-dm-form button.motop-send:hover{background:var(--mx-accent-soft)}
.motop-dm-msg{padding:0 16px 10px;min-height:0}
@media (max-width:760px){
  .motop-dm{grid-template-columns:1fr;height:calc(100vh - 170px);min-height:380px}
  .motop-dm .motop-dm-thread,.motop-dm .motop-dm-empty{display:none}
  .motop-dm.is-thread .motop-dm-list{display:none}
  .motop-dm.is-thread .motop-dm-thread:not([hidden]){display:flex}
  .motop-dm-list{border-right:0}
  .motop-dm-back{display:block}
  .motop-dm-empty{display:none!important}
  .motop-msg-row{max-width:88%}
  .motop-ride-form{padding:20px 16px}
}
/* 分段切換（揪騎：即將出發 / 已結束） */
.motop-ride-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.motop-seg{display:inline-flex;max-width:100%;gap:2px;padding:4px;border-radius:999px;background:var(--mx-inset);overflow:hidden}
.motop-seg a{display:block;margin:0;padding:7px 18px;border:0;border-radius:999px;background:transparent;color:var(--mx-muted);font-weight:700;font-size:14px;line-height:1.4;white-space:nowrap;box-shadow:none;text-decoration:none;transition:background .15s ease,color .15s ease}
.motop-seg a:hover{color:var(--mx-text)}
.motop-seg a.is-active{background:var(--mx-surface);color:var(--mx-accent);box-shadow:0 1px 3px rgba(0,0,0,.2)}

/* 站內搜尋 */
.motop-search-form{position:relative;display:flex;align-items:center;margin:0 0 12px}
.motop-search-form input[type=search]{width:100%;height:40px;padding:0 44px 0 16px;border:1px solid var(--mx-line);border-radius:999px;background:var(--mx-inset);color:var(--mx-text);font:inherit;font-size:14px;outline:0;box-shadow:none;-webkit-appearance:none;appearance:none}
.motop-search-form input[type=search]:focus{border-color:var(--mx-accent);background:var(--mx-surface)}
.motop-search-form button{position:absolute!important;right:5px!important;top:50%!important;transform:translateY(-50%);width:32px!important;height:32px!important;min-height:0!important;display:flex!important;align-items:center;justify-content:center;padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;color:var(--mx-muted)!important;line-height:1;cursor:pointer}
.motop-search-form button svg{display:block;width:18px;height:18px;flex:none}
.motop-search-form button:hover{color:var(--mx-accent)}
.motop-search-form.is-large input[type=search]{height:48px;font-size:16px}
.motop-search-page{max-width:860px;margin:0 auto}
.motop-search-h{font-size:18px;margin:24px 0 12px}
.motop-user-results{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.motop-user-card{display:flex;align-items:center;gap:12px;padding:12px 14px;background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:14px;color:var(--mx-text)!important;text-decoration:none!important;transition:background .15s ease}
.motop-user-card:hover{background:var(--mx-inset)}
.motop-user-card .motop-avatar{width:44px;height:44px;border-radius:50%;object-fit:cover}
.motop-user-name{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.motop-pager{display:flex;align-items:center;justify-content:center;gap:14px;margin:20px 0}

/* 首頁 [motop_home] */
.motop-home{max-width:860px;margin:0 auto}
.motop-home .motop-list{display:flex;flex-direction:column;gap:12px}
.motop-home-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;margin:4px 0 14px}
.motop-home-tags{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.motop-page-login .motop-auth-form h2,.motop-page-register .motop-auth-form h2,.motop-page-lost .motop-auth-form h2,.motop-page-reset .motop-auth-form h2{display:none}
.motop-page-login .motop-auth-form,.motop-page-register .motop-auth-form,.motop-page-lost .motop-auth-form,.motop-page-reset .motop-auth-form{max-width:440px;margin:0 auto}
@media (max-width:600px){.motop-card{padding:16px}.motop-card-title{font-size:17px}}

/* 私訊：圖片與嵌入 */
.motop-dm-form textarea{padding-left:46px!important}
.motop-dm-attach{position:absolute;left:20px;bottom:15px;width:30px;height:30px;display:flex;align-items:center;justify-content:center;padding:0!important;margin:0!important;border:0!important;border-radius:50%!important;background:transparent!important;box-shadow:none!important;color:var(--mx-muted)!important;cursor:pointer}
.motop-dm-attach:hover{color:var(--mx-accent)!important;background:var(--mx-accent-soft)!important}
.motop-dm-preview{position:relative;display:inline-block;margin:0 0 8px}
.motop-dm-preview[hidden]{display:none}
.motop-dm-preview img{display:block;max-height:96px;max-width:160px;border-radius:12px;border:1px solid var(--mx-line)}
.motop-dm-preview-x{position:absolute;top:-8px;right:-8px;width:22px;height:22px;padding:0!important;border:0!important;border-radius:50%!important;background:var(--mx-text)!important;color:var(--mx-surface)!important;font-size:11px;line-height:22px;cursor:pointer}
.motop-dm-img{display:block;max-width:min(260px,100%);max-height:320px;border-radius:12px;margin-top:4px}
.motop-msg-body .motop-embed{margin-top:6px;width:min(320px,70vw)}
.motop-embed{position:relative;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:#000}
.motop-embed.is-tall{aspect-ratio:9/16;max-height:480px}
.motop-embed iframe,.motop-embed video{position:absolute;inset:0;width:100%;height:100%;border:0}

/* 看板頁：頂部發文列 + 浮動發文面板 */
.motop-board-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 16px;padding:12px 16px;background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:var(--mx-radius);box-shadow:var(--mx-shadow)}
.motop-board-bar-name{font-weight:800;font-size:17px;color:var(--mx-text)}
.motop-newpost-fab{position:fixed;right:18px;bottom:72px;z-index:9998;height:44px;padding:0 18px;border:0;border-radius:999px;background:var(--mx-accent);color:#fff;font:inherit;font-weight:700;font-size:15px;cursor:pointer;box-shadow:var(--mx-shadow-lg);transition:transform .15s ease}
.motop-newpost-fab:hover{transform:translateY(-2px)}
body.motop-np-open .motop-newpost-fab{display:none}
.motop-newpost-panel{position:fixed;right:18px;bottom:72px;z-index:10000;width:min(560px,calc(100vw - 24px));max-height:calc(100vh - 100px);display:flex;flex-direction:column;background:var(--mx-surface);color:var(--mx-text);border:1px solid var(--mx-line);border-radius:18px;box-shadow:var(--mx-shadow-lg);overflow:hidden}
.motop-newpost-panel[hidden]{display:none}
.motop-newpost-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid var(--mx-line);font-size:15px}
.motop-newpost-close{width:30px;height:30px;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:var(--mx-muted)!important;font-size:15px;cursor:pointer}
.motop-newpost-close:hover{background:var(--mx-inset)!important}
.motop-newpost-form{flex:1;overflow-y:auto;padding:14px 16px 18px;border:0!important;box-shadow:none!important;border-radius:0!important;background:transparent!important}
@media (max-width:600px){.motop-newpost-panel{right:12px;left:12px;bottom:12px;width:auto;max-height:calc(100vh - 24px)}.motop-newpost-fab{bottom:72px}}

/* 看板頂部列：橫跨主題格線整列、不被拉高 */
.motop-board-bar{grid-column:1/-1!important;align-self:start!important;width:100%;box-sizing:border-box;height:auto!important;min-height:0!important;margin:0 0 4px!important;padding:12px 18px!important;background:transparent!important;border:0!important;border-bottom:1px solid var(--mx-line)!important;border-radius:0!important;box-shadow:none!important}
.motop-board-bar-name{font-size:20px!important;font-weight:800;letter-spacing:.2px}

/* 新通知提示 */
.motop-toast{position:fixed;right:18px;bottom:140px;z-index:10001;display:flex;align-items:center;gap:12px;max-width:min(340px,calc(100vw - 36px));padding:12px 14px 12px 18px;background:var(--mx-surface);color:var(--mx-text);border:1px solid var(--mx-line);border-left:4px solid var(--mx-accent);border-radius:14px;box-shadow:var(--mx-shadow-lg);font-size:14px;font-weight:600;animation:mx-toast-in .25s ease}
.motop-toast a{color:var(--mx-text)!important;text-decoration:none!important}
.motop-toast button{flex:none;width:24px;height:24px;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:var(--mx-muted)!important;font-size:12px;cursor:pointer}
.motop-toast.is-out{opacity:0;transform:translateY(6px);transition:opacity .25s ease,transform .25s ease}
@keyframes mx-toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.motop-dm-tip{margin:0;padding:0 16px 10px;font-size:12px;color:var(--mx-muted);line-height:1.5}

/* 私訊輸入列：按鈕貼齊底部、與單行輸入框垂直置中（輸入框 40px，下內距 10px） */
.motop-dm-form button.motop-send,.motop-dm-form .motop-dm-attach{position:absolute!important;top:auto!important;bottom:15px!important;width:30px!important;height:30px!important;margin:0!important;padding:0!important;display:flex!important;align-items:center;justify-content:center;line-height:1}
.motop-dm-form button.motop-send{right:19px!important}
.motop-dm-form button.motop-send svg{display:block;margin:0;transform:translateX(1px)}

.motop-install{padding:12px 16px}
.motop-install[hidden],.motop-install .motop-hint[hidden]{display:none}
.motop-install .motop-btn{width:100%}

/* 安裝成 App（standalone）時的安全區域：上方狀態列、下方 Home 橫條 */
html.motop-standalone .motop-bell-float{bottom:calc(18px + env(safe-area-inset-bottom,0px))}
html.motop-standalone .motop-newpost-fab{bottom:calc(72px + env(safe-area-inset-bottom,0px))}
html.motop-standalone .motop-newpost-panel{bottom:calc(72px + env(safe-area-inset-bottom,0px))}
html.motop-standalone .motop-toast{bottom:calc(140px + env(safe-area-inset-bottom,0px))}
@media (max-width:1024px){
  html.motop-standalone .motop-side-toggle{bottom:calc(18px + env(safe-area-inset-bottom,0px))}
  html.motop-standalone .motop-side{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
}
@media (max-width:600px){html.motop-standalone .motop-newpost-panel{bottom:calc(12px + env(safe-area-inset-bottom,0px))}}

/* 追蹤看板 */
.motop-board-bar-acts{display:inline-flex;align-items:center;gap:8px}
.motop-follow-btn.is-on{color:var(--mx-accent)!important;border-color:var(--mx-accent)!important;background:var(--mx-accent-soft)!important}
.motop-side-sub{margin:14px 12px 4px;font-size:12px;font-weight:700;color:var(--mx-muted);letter-spacing:.5px}

/* App 模式：主題（Blocksy）的手機側拉選單、固定頁首也要避開狀態列與底部橫條 */
html.motop-standalone #offcanvas .ct-panel-inner,
html.motop-standalone .ct-drawer-canvas .ct-panel-inner{padding-top:env(safe-area-inset-top,0px)!important;padding-bottom:env(safe-area-inset-bottom,0px)!important;box-sizing:border-box}
html.motop-standalone #offcanvas .ct-toggle-close,
html.motop-standalone .ct-drawer-canvas .ct-toggle-close{top:calc(env(safe-area-inset-top,0px) + 14px)!important}
html.motop-standalone #offcanvas .ct-panel-content{padding-top:calc(env(safe-area-inset-top,0px) + 44px)!important}
html.motop-standalone #header{padding-top:env(safe-area-inset-top,0px)}

/* 即時路況（限時動態） */
.motop-stories{margin:0 0 14px}
.motop-st-row{display:flex;gap:14px;overflow-x:auto;padding:4px 2px 10px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.motop-st-row::-webkit-scrollbar{display:none}
.motop-st-item{flex:none;display:flex;flex-direction:column;align-items:center;gap:6px;width:68px;padding:0!important;margin:0!important;border:0!important;background:transparent!important;color:var(--mx-soft)!important;font:inherit;cursor:pointer;box-shadow:none!important}
.motop-st-ring{position:relative;display:block;width:62px;height:62px;padding:3px;border-radius:50%;background:linear-gradient(135deg,var(--mx-accent),var(--mx-accent2,#8b5cf6))}
.motop-st-ring img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover;border:2px solid var(--mx-surface);background:var(--mx-inset)}
.motop-st-ring.is-seen{background:var(--mx-line2)}
.motop-st-ring.is-add{background:var(--mx-inset);border:1px dashed var(--mx-line2)}
.motop-st-ring.is-add img[hidden]{display:none}
.motop-st-ring.is-add i{position:absolute;right:-2px;bottom:-2px;width:22px;height:22px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--mx-accent);color:#fff;font-style:normal;font-size:14px;line-height:1;border:2px solid var(--mx-surface)}
.motop-st-name{max-width:68px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px}
body.motop-st-lock{overflow:hidden}
.motop-sv{position:fixed;inset:0;z-index:100001;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.92)}
.motop-sv-card{position:relative;display:flex;flex-direction:column;width:min(420px,100vw);height:min(100vh,860px);height:min(100dvh,860px);background:#000;color:#fff;overflow:hidden;border-radius:0}
@media (min-width:600px){.motop-sv-card{border-radius:16px}}
.motop-sv-bars{position:absolute;top:calc(8px + env(safe-area-inset-top,0px));left:10px;right:10px;z-index:3;display:flex;gap:4px}
.motop-sv-bar{flex:1;height:3px;border-radius:3px;background:rgba(255,255,255,.3);overflow:hidden}
.motop-sv-bar i{display:block;width:0;height:100%;background:#fff}
.motop-sv-bar i.is-done{width:100%}
.motop-sv-head{position:absolute;top:calc(20px + env(safe-area-inset-top,0px));left:12px;right:12px;z-index:3;display:flex;align-items:center;gap:10px;text-shadow:0 1px 4px rgba(0,0,0,.6)}
.motop-sv-head a{display:flex;align-items:center;gap:8px;color:#fff!important;text-decoration:none!important}
.motop-sv-head img{width:34px;height:34px;border-radius:50%;object-fit:cover}
.motop-sv-head small{opacity:.8}
.motop-sv-x{margin-left:auto;width:32px;height:32px;padding:0!important;border:0!important;border-radius:50%!important;background:rgba(0,0,0,.35)!important;color:#fff!important;cursor:pointer}
.motop-sv-media{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center}
.motop-sv-media>img{width:100%;height:100%;object-fit:contain}
.motop-sv-hit{position:absolute;top:70px;bottom:0;width:35%;z-index:2}
.motop-sv-hit.is-prev{left:0}.motop-sv-hit.is-next{right:0;width:65%}
.motop-sv-info{position:absolute;left:0;right:0;bottom:calc(64px + env(safe-area-inset-bottom,0px));z-index:3;padding:40px 16px 8px;background:linear-gradient(transparent,rgba(0,0,0,.7));pointer-events:none}
.motop-sv-place{display:inline-block;padding:3px 12px;border-radius:999px;background:var(--mx-accent);font-weight:700;font-size:13px}
.motop-sv-kind{display:inline-block;margin-left:6px;padding:3px 10px;border-radius:999px;background:rgba(255,255,255,.2);font-size:12px}
.motop-sv-info p{margin:8px 0 0;font-size:15px;line-height:1.5}
.motop-sv-foot{position:absolute;left:0;right:0;bottom:0;z-index:4;display:flex;gap:8px;padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px));background:#000}
.motop-sv-foot input{flex:1;height:40px;padding:0 16px;border:1px solid rgba(255,255,255,.35)!important;border-radius:999px;background:transparent!important;color:#fff!important;font:inherit;font-size:14px;outline:0}
.motop-sv-foot button{flex:none;height:40px;padding:0 18px!important;border:0!important;border-radius:999px!important;background:var(--mx-accent)!important;color:#fff!important;font:inherit;font-weight:700;cursor:pointer}
.motop-sv-del{background:rgba(255,255,255,.14)!important}
.motop-sc{position:fixed;inset:0;z-index:100002;display:flex;align-items:center;justify-content:center;padding:16px;background:rgba(0,0,0,.6)}
.motop-sc-box{width:min(440px,100%);max-height:92vh;overflow:auto;display:flex;flex-direction:column;gap:12px;padding:18px;background:var(--mx-surface);color:var(--mx-text);border:1px solid var(--mx-line);border-radius:18px;box-shadow:var(--mx-shadow-lg)}
.motop-sc-head{display:flex;align-items:center;justify-content:space-between}
.motop-sc-x{width:30px;height:30px;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:var(--mx-muted)!important;cursor:pointer}
.motop-sc-pick{display:block;cursor:pointer}
.motop-sc-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:140px;border:1px dashed var(--mx-line2);border-radius:14px;background:var(--mx-inset);color:var(--mx-soft);text-align:center;padding:12px}
.motop-sc-drop[hidden]{display:none}
.motop-sc-drop small{color:var(--mx-muted)}
.motop-sc-prev{display:block;width:100%;max-height:300px;object-fit:contain;border-radius:14px;background:#000}
.motop-sc-prev[hidden]{display:none}
.motop-sc-box label{display:flex;flex-direction:column;gap:6px;font-size:14px;color:var(--mx-soft)}
.motop-sc-box input[type=text]{height:42px;padding:0 14px;border:1px solid var(--mx-line);border-radius:12px;background:var(--mx-inset);color:var(--mx-text);font:inherit;outline:0}
.motop-sc-kinds{display:flex;flex-wrap:wrap;gap:6px}
.motop-sc-chip{height:30px;padding:0 12px!important;border:1px solid var(--mx-line)!important;border-radius:999px!important;background:transparent!important;color:var(--mx-soft)!important;font:inherit;font-size:13px;cursor:pointer}
.motop-sc-chip.is-on{background:var(--mx-accent-soft)!important;color:var(--mx-accent)!important;border-color:var(--mx-accent)!important}

/* 圖片燈箱 */
.motop-post-content img,img.motop-post-image,.motop-dm-img{cursor:zoom-in}
.motop-lb{position:fixed;inset:0;z-index:100003;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.93);touch-action:none;overflow:hidden;user-select:none;-webkit-user-select:none}
.motop-lb>img{max-width:100vw;max-height:100vh;max-height:100dvh;object-fit:contain;transform-origin:center center;will-change:transform;cursor:grab}
.motop-lb-bar{position:absolute;top:calc(12px + env(safe-area-inset-top,0px));right:12px;z-index:2;display:flex;align-items:center;gap:6px;padding:6px 8px;border-radius:999px;background:rgba(20,22,28,.78);color:#fff;backdrop-filter:blur(6px)}
.motop-lb-bar button,.motop-lb-bar a{min-width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;padding:0 10px!important;margin:0!important;border:0!important;border-radius:999px!important;background:transparent!important;color:#fff!important;font:inherit;font-size:15px;line-height:1;text-decoration:none!important;cursor:pointer;box-shadow:none!important}
.motop-lb-bar button:hover,.motop-lb-bar a:hover{background:rgba(255,255,255,.16)!important}
.motop-lb-zoom{min-width:44px;text-align:center;font-size:13px;opacity:.85}

.motop-stories{grid-column:1/-1;min-width:0}
.post-edit-link,.ct-edit-link{display:none!important}

/* 側邊欄分頁切換 */
.motop-side-tabs{display:flex;width:100%;margin:10px 0 8px}
.motop-side-tabs a{flex:1;text-align:center;padding:7px 10px!important}
.motop-side-pane[hidden]{display:none}

/* 文章列表（主題格線）：卡片依自己的內容高度，不再被同一列最高的卡片拉長 */
.entries,.ct-container .entries,[data-archive] .entries,[data-archive].entries{align-items:start!important}
.entries>article,.entries .entry-card{align-self:start!important;height:auto!important}

/* 社群版型：單欄動態流 + 右側邊欄 */
.motop-feed{display:flex;align-items:flex-start;gap:24px}
.motop-feed-main{flex:1;min-width:0}
.motop-feed-main .entries{grid-template-columns:1fr!important}
.motop-rail{display:none}
.motop-feed .motop-rail{flex:none;width:300px;position:sticky;top:90px;display:flex;flex-direction:column;gap:14px}
.motop-rail-card{padding:16px 18px;background:var(--mx-surface);color:var(--mx-text);border:1px solid var(--mx-line);border-radius:var(--mx-radius,16px);box-shadow:var(--mx-shadow)}
.motop-rail-card h3{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:0 0 10px;font-size:16px;color:inherit}
.motop-rail-card h3 small{font-size:11px;font-weight:500;color:var(--mx-muted)}
.motop-rail-stats{display:flex;gap:18px;margin:0 0 12px;font-size:13px;color:var(--mx-muted)}
.motop-rail-stats b{display:block;font-size:20px;color:var(--mx-text)}
.motop-rail-mod{display:flex;align-items:center;gap:10px;margin:0 0 12px;color:var(--mx-text)!important;text-decoration:none!important;font-weight:700;font-size:14px}
.motop-rail-mod img{width:36px;height:36px;border-radius:50%;object-fit:cover}
.motop-rail-mod small{display:block;font-size:11px;font-weight:500;color:var(--mx-muted)}
.motop-rail-acts{display:flex;gap:8px}
.motop-rail-acts .motop-btn{flex:1}
.motop-rail-hot,.motop-rail-lead{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.motop-rail-hot li{display:flex;flex-direction:column;gap:2px}
.motop-rail-hot a{color:var(--mx-text)!important;text-decoration:none!important;font-size:14px;font-weight:600;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.motop-rail-hot a:hover,.motop-rail-lead a:hover{color:var(--mx-accent)!important}
.motop-rail-hot small{font-size:12px;color:var(--mx-muted)}
.motop-rail-lead li{display:flex;align-items:center;gap:10px}
.motop-rail-rank{flex:none;width:18px;text-align:center;font-weight:800;color:var(--mx-muted);font-size:13px}
.motop-rail-lead li:nth-child(-n+3) .motop-rail-rank{color:var(--mx-accent)}
.motop-rail-lead a{flex:1;min-width:0;display:flex;align-items:center;gap:8px;color:var(--mx-text)!important;text-decoration:none!important;font-size:14px;font-weight:600}
.motop-rail-lead a span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.motop-rail-lead img{width:28px;height:28px;border-radius:50%;object-fit:cover;flex:none}
.motop-rail-lead em{font-style:normal;font-size:12px;color:var(--mx-muted)}
@media (max-width:1100px){
  .motop-feed{flex-direction:column;gap:14px}
  .motop-feed .motop-rail{width:100%;position:static;order:-1}
  .motop-rail .motop-rail-card:not(.is-info){display:none}
}

/* 私訊頁（手機 / 平板）：像 App 一樣鎖定畫面，只有訊息區自己捲動，輸入框釘在最下面 */
@media (max-width:1024px){
  body.motop-page-messages{overflow:hidden;overscroll-behavior:none}
  body.motop-page-messages .motop-page-title{display:none}
  body.motop-page-messages .motop-page{padding:0!important;margin:0!important;max-width:none!important}
  body.motop-page-messages .motop-dm{position:fixed;left:0;right:0;top:var(--mx-dm-top,80px);height:var(--mx-dm-h,calc(100dvh - var(--mx-dm-top,80px)));min-height:0;max-height:none;margin:0;border-radius:0;border-left:0;border-right:0;border-bottom:0;box-shadow:none;z-index:50}
  body.motop-page-messages .motop-bell-float,body.motop-page-messages .motop-side-toggle,body.motop-page-messages .motop-newpost-fab,body.motop-page-messages .motop-toast{display:none!important}
  body.motop-page-messages .motop-dm-tip{display:none}
  body.motop-page-messages .motop-dm-list,body.motop-page-messages .motop-dm-msgs{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  body.motop-page-messages .motop-dm-form{flex:none}
  html.motop-standalone body.motop-page-messages .motop-dm-form{padding-bottom:calc(10px + env(safe-area-inset-bottom,0px))}
  html.motop-standalone body.motop-page-messages .motop-dm-form button.motop-send,html.motop-standalone body.motop-page-messages .motop-dm-attach{bottom:calc(15px + env(safe-area-inset-bottom,0px))!important}
}

/* 留言按讚 */
.motop-clike{display:inline-flex;align-items:center;gap:3px;background:none;border:0;padding:0 2px;margin:0;font-size:12px;line-height:1;color:var(--mx-muted);cursor:pointer;box-shadow:none}
.motop-clike:hover{color:var(--mx-like)}
.motop-clike.is-liked{color:var(--mx-like)}
.motop-clike.is-busy{opacity:.5;pointer-events:none}
.motop-clike-n:empty{display:none}

.motop-clike svg path{fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}
.motop-clike.is-liked svg path{fill:currentColor}
/* 私訊：釘選 / 刪除 */
.motop-dm-row{position:relative;display:flex;align-items:center}
.motop-dm-row .motop-dm-item{flex:1;min-width:0;padding-right:34px}
.motop-dm-row.is-pinned .motop-dm-item{background:var(--mx-inset)}
.motop-dm-pin{margin-right:4px;vertical-align:-1px;color:var(--mx-muted)}
.motop-dm-more{position:absolute;right:6px;bottom:6px;width:26px;height:22px;border:0;border-radius:8px;background:none;color:var(--mx-muted);font-size:16px;line-height:1;cursor:pointer;padding:0}
.motop-dm-more:hover{background:var(--mx-line)}
.motop-dm-menu{display:none;position:absolute;right:6px;top:calc(100% - 4px);z-index:20;min-width:130px;background:var(--mx-card,#1c212b);border:1px solid var(--mx-line);border-radius:12px;padding:4px;box-shadow:0 8px 24px rgba(0,0,0,.35)}
.motop-dm-row.is-open .motop-dm-menu{display:block}
.motop-dm-menu button{display:block;width:100%;text-align:left;background:none;border:0;border-radius:8px;padding:9px 12px;font:inherit;font-size:14px;color:var(--mx-text);cursor:pointer}
.motop-dm-menu button:hover{background:var(--mx-inset)}
.motop-dm-menu button.is-danger{color:#e5484d}

/* 電腦版：頁首凍結；手機版：頁首隨頁面捲走，改顯示「回到頂部」 */
@media (min-width:1000px){
  html body header#header{position:sticky;top:0;z-index:60}
  html body.admin-bar header#header{top:32px}
  .motop-feed .motop-rail,.motop-intro{top:90px}
}
.motop-totop{position:fixed;left:50%;bottom:calc(18px + env(safe-area-inset-bottom,0px));transform:translate(-50%,16px);z-index:80;display:none;align-items:center;gap:6px;padding:9px 16px;border:1px solid var(--mx-line);border-radius:999px;background:var(--mx-card,#1c212b);color:var(--mx-text);font:inherit;font-size:14px;box-shadow:0 6px 20px rgba(0,0,0,.3);cursor:pointer;opacity:0;transition:opacity .2s,transform .2s}
.motop-totop.is-on{opacity:1;transform:translate(-50%,0)}
@media (max-width:999px){.motop-totop{display:inline-flex}}
body.motop-page-messages .motop-totop{display:none}

/* 文章卡片整張可點 */
article.entry-card,.entries>article{cursor:pointer}
article.entry-card a,.entries>article a{cursor:pointer}

/* 會員中心／列表：一律單欄，不橫向溢出；底部留空避免被浮動按鈕蓋住 */
.motop-list{grid-template-columns:minmax(0,1fr)}
.motop-profile,.motop-profile-grid>*{min-width:0;max-width:100%}
.motop-card-main{overflow-wrap:anywhere}
@media (max-width:999px){
  .motop-profile-grid{grid-template-columns:minmax(0,1fr)}
  .motop-profile{overflow-x:clip}
  body{padding-bottom:calc(84px + env(safe-area-inset-bottom,0px))}
  .motop-pager{margin-bottom:12px}
}

.motop-share-btn{display:inline-flex;align-items:center;gap:5px;background:none;border:0;padding:3px 6px;margin:0;font:inherit;font-size:13px;color:var(--mx-muted);cursor:pointer;box-shadow:none;border-radius:8px}
.motop-share-btn:hover{color:var(--mx-accent);background:var(--mx-inset)}

/* 分頁：不擠壓、可換行 */
.motop-pager{flex-wrap:wrap;gap:8px 6px}
.motop-pager .page-numbers{flex:none;white-space:nowrap;min-width:38px;margin:0;padding:7px 12px;text-align:center;line-height:1.3}
.motop-pager .page-numbers.dots{background:none;border-color:transparent;min-width:0;padding:7px 2px}
/* 下拉重新整理 */
html{overscroll-behavior-y:contain}
.motop-ptr{position:fixed;left:50%;top:calc(8px + env(safe-area-inset-top,0px));z-index:100000;width:38px;height:38px;margin-left:-19px;border-radius:50%;background:var(--mx-card,#1c212b);border:1px solid var(--mx-line);box-shadow:0 4px 14px rgba(0,0,0,.35);display:flex;align-items:center;justify-content:center;color:var(--mx-accent);opacity:0;pointer-events:none;transform:translateY(-60px)}
.motop-ptr svg{width:20px;height:20px}
.motop-ptr.is-spin{transition:transform .2s;transform:translateY(24px)!important;opacity:1!important}
.motop-ptr.is-spin svg{animation:mx-ptr .8s linear infinite}
@keyframes mx-ptr{to{transform:rotate(360deg)}}

/* 積分 / 邀請 */
.motop-pts b{color:var(--mx-accent)}
.motop-ref-box{margin-top:14px;padding-top:14px;border-top:1px solid var(--mx-line);display:flex;flex-direction:column;gap:8px;font-size:14px}
.motop-ref-row{display:flex;align-items:center;gap:8px;justify-content:space-between}
.motop-ref-row span{color:var(--mx-muted);flex:none}
.motop-ref-row input{flex:1;min-width:0;padding:6px 10px;border-radius:10px;border:1px solid var(--mx-line);background:var(--mx-inset);color:var(--mx-text);font:inherit;font-size:13px}
.motop-ref-box .motop-share-btn{justify-content:center;background:var(--mx-inset);padding:8px 12px;color:var(--mx-text)}
.motop-pts-board{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.motop-pts-board li{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:12px;background:var(--mx-inset)}
.motop-pts-board a{font-weight:700;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.motop-pts-rank{width:22px;text-align:center;color:var(--mx-muted);font-weight:700}
.motop-pts-lv{font-size:12px;color:var(--mx-muted)}

.motop-title-info{display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:5px;padding:0;border:1px solid var(--mx-line2,var(--mx-line));border-radius:50%;background:none;color:var(--mx-muted);font:inherit;font-size:10px;font-weight:700;line-height:1;cursor:pointer;vertical-align:middle;box-shadow:none}
.motop-title-info:hover{color:var(--mx-accent);border-color:var(--mx-accent)}
.motop-modal-panel h4{margin:6px 0 0;font-size:14px;color:var(--mx-soft)}
.motop-modal-panel ul{margin:0;padding-left:18px;font-size:14px;color:var(--mx-muted)}
/* 卡片底部按鈕列不換行 */
.motop-card-stats{flex-wrap:wrap;gap:6px 10px}
.motop-card-stats .motop-like-btn,.motop-card-comments,.motop-share-btn,.motop-card-edit{white-space:nowrap;flex:none}
.motop-card-stats .motop-like-btn .motop-like-label{white-space:nowrap}
.motop-title-info{flex:none;box-sizing:border-box;min-width:16px;max-width:16px;min-height:16px;max-height:16px;aspect-ratio:1/1;padding:0!important;line-height:1}

@media (max-width:999px){
  html.mx-kb body.motop-page-messages .motop-dm{z-index:100001;border-top:0}
  html.mx-kb body.motop-page-messages{position:fixed;left:0;right:0;width:100%}
  html.mx-kb.motop-standalone body.motop-page-messages .motop-dm-form{padding-bottom:10px}
  html.mx-kb.motop-standalone body.motop-page-messages .motop-dm-form button.motop-send,html.mx-kb.motop-standalone body.motop-page-messages .motop-dm-attach{bottom:15px!important}
}

/* 旅遊版 */
.motop-gallery{display:grid;gap:6px;margin-top:12px;grid-template-columns:repeat(3,minmax(0,1fr))}
.motop-gallery img{width:100%;height:auto;aspect-ratio:4/3;object-fit:cover;border-radius:12px;cursor:zoom-in;display:block}
.motop-gallery-1{grid-template-columns:1fr}.motop-gallery-1 img{aspect-ratio:auto;max-height:70vh;object-fit:contain;background:var(--mx-inset)}
.motop-gallery-2{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:600px){.motop-gallery,.motop-gallery-3,.motop-gallery-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
.motop-travel-card{flex-direction:column;align-items:stretch;padding:0;overflow:hidden}
.motop-travel-card .motop-card-main{padding:16px 20px 18px}
.motop-travel-cover{position:relative;display:block;aspect-ratio:16/9;background:var(--mx-inset)}
.motop-travel-cover img{width:100%;height:100%;object-fit:cover;display:block}
.motop-travel-n{position:absolute;right:10px;bottom:10px;padding:2px 10px;border-radius:999px;background:rgba(0,0,0,.6);color:#fff;font-size:12px}
.motop-travel-have,.motop-travel-picks{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:8px}
.motop-travel-keep{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:12px;color:var(--mx-muted)}
.motop-travel-keep img,.motop-travel-pick img{width:84px;height:84px;object-fit:cover;border-radius:10px;display:block}
.motop-travel-pick{position:relative}
.motop-travel-pick button{position:absolute;top:3px;right:3px;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;font-size:12px;line-height:1;cursor:pointer}

/* 個人頁分頁列：只能左右滑，不要上下晃動 */
.motop-tabs{overflow-y:hidden;overscroll-behavior:contain;touch-action:pan-x;-webkit-overflow-scrolling:touch}
.motop-tabs a{flex:none}

.motop-push-grps{display:flex;flex-direction:column;gap:6px;margin-top:6px}

.motop-travel-pick{touch-action:none;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.motop-travel-pick img{-webkit-user-drag:none;pointer-events:none}
.motop-travel-pick.is-drag{opacity:.75;transform:scale(1.06);box-shadow:0 8px 22px rgba(0,0,0,.45);z-index:5;cursor:grabbing}
.motop-travel-pick.is-cover::after{content:"封面";position:absolute;left:4px;bottom:4px;padding:0 8px;border-radius:999px;background:var(--mx-accent);color:#fff;font-size:11px;line-height:18px;pointer-events:none}
.motop-travel-x{position:absolute;top:3px;right:3px;width:22px;height:22px;padding:0;border:0;border-radius:50%;background:rgba(0,0,0,.65);color:#fff;font-size:12px;line-height:1;cursor:pointer}

/* 揪騎報名 */
.motop-signup{margin-top:14px;padding-top:12px;border-top:1px solid var(--mx-line)}
.motop-signup-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.motop-signup-top b{color:var(--mx-accent)}
.motop-signup-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.motop-signup-one{display:inline-flex;align-items:center;gap:6px;padding:3px 10px 3px 3px;border-radius:999px;background:var(--mx-inset);font-size:13px}
.motop-signup-one .motop-avatar{width:24px;height:24px}

/* 設定頁：黑白簡約 */
.motop-page-settings .motop-page-title{margin-bottom:18px}
.mx-set{max-width:640px;margin:0 auto;display:flex;flex-direction:column;gap:26px}
.mx-set-group h2{margin:0 0 8px 6px;font-size:13px;font-weight:600;letter-spacing:.08em;color:var(--mx-muted);text-transform:none}
.mx-set-card{background:var(--mx-surface);border:1px solid var(--mx-line);border-radius:18px;overflow:hidden}
.mx-set-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:15px 18px}
.mx-set-row+.mx-set-row{border-top:1px solid var(--mx-line)}
.mx-set-label{display:flex;flex-direction:column;gap:2px;min-width:0}
.mx-set-label b{font-weight:600;font-size:16px;color:var(--mx-text)}
.mx-set-label small{font-size:12.5px;color:var(--mx-muted);line-height:1.45}
.mx-set-hint{margin:8px 6px 0;font-size:12.5px;color:var(--mx-muted);line-height:1.5}
.mx-set-hint:empty{display:none}
.mx-push-sec .mx-set-card+.mx-set-hint+.mx-set-card{margin-top:12px}
.mx-push-list{transition:opacity .2s}
.mx-push-list.is-off{opacity:.38;pointer-events:none}
/* 滑動開關 */
.mx-switch{position:relative;flex:none;width:51px;height:31px;display:inline-block;cursor:pointer}
.mx-switch input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;z-index:2}
.mx-switch i{position:absolute;inset:0;border-radius:999px;background:var(--mx-line2);transition:background .25s ease}
.mx-switch i::after{content:"";position:absolute;top:2px;left:2px;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(0,0,0,.28);transition:transform .28s cubic-bezier(.3,.9,.3,1)}
.mx-switch input:checked+i{background:var(--mx-text)}
.mx-switch input:checked+i::after{transform:translateX(20px);background:var(--mx-surface)}
.mx-switch input:disabled{cursor:not-allowed}
.mx-switch input:disabled+i{opacity:.45}
.mx-switch input:focus-visible+i{outline:2px solid var(--mx-text);outline-offset:2px}
/* 色系分段 */
.mx-set-seg{display:inline-flex;padding:3px;border-radius:12px;background:var(--mx-inset);flex:none}
.mx-set-seg button{border:0;background:transparent;color:var(--mx-muted);font:inherit;font-size:13.5px;font-weight:600;padding:7px 13px;border-radius:9px;cursor:pointer;box-shadow:none;white-space:nowrap}
.mx-set-seg button.is-on{background:var(--mx-text);color:var(--mx-surface)}
@media (prefers-reduced-motion:reduce){.mx-switch i,.mx-switch i::after{transition:none}}
/* 文章作者列：放不下就換行，日期不斷字 */
.motop-author{flex-wrap:wrap;row-gap:6px;column-gap:10px}
.motop-author .motop-title,.motop-author .motop-title-info{margin-left:0}
.motop-author .motop-time{white-space:nowrap;flex:none}
.motop-author>a{flex:none;max-width:100%}
@media (max-width:600px){.motop-author .motop-time{flex-basis:100%;padding-left:56px;margin-top:-4px}}
/* 私訊送出鈕：固定正圓、不要淡淡的底色 */
.motop-dm-form button.motop-send,.motop-dm-form button.motop-send:hover,.motop-dm-form button.motop-send:focus,.motop-dm-form button.motop-send:active,.motop-dm-form button.motop-send:focus-visible,
.motop-form .motop-composer-box button.motop-send:hover,.motop-form .motop-composer-box button.motop-send:focus,.motop-form .motop-composer-box button.motop-send:active{background:transparent!important;background-color:transparent!important;box-shadow:none!important;outline:0;-webkit-tap-highlight-color:transparent}
.motop-dm-form button.motop-send{box-sizing:border-box;flex:none;width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;max-width:30px!important;max-height:30px!important;aspect-ratio:1/1;border-radius:50%!important;overflow:visible}

/* ===== 私訊頁（手機 / 平板）：整頁 App 化 ===== */
.motop-dm-listhead{display:none}
@media (max-width:1024px){
  html.mx-dm,html.mx-dm body{height:100%;overflow:hidden!important;overscroll-behavior:none;-webkit-text-size-adjust:100%}
  html.mx-dm body.motop-page-messages{position:fixed!important;left:0;top:0;width:100%!important;max-width:100%}
  html.mx-dm body.motop-page-messages .motop-dm{position:fixed!important;left:0!important;right:auto!important;top:0!important;width:100%!important;height:var(--mx-vh,100dvh)!important;min-height:0!important;max-height:none!important;transform:translateY(var(--mx-vo,0px));z-index:100001!important;margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;display:flex!important;flex-direction:column;padding-top:env(safe-area-inset-top,0px);background:var(--mx-surface);box-sizing:border-box}
  html.mx-dm body.motop-page-messages .motop-dm-listhead{display:flex;align-items:center;gap:6px;flex:none;padding:12px 14px;border-bottom:1px solid var(--mx-line);font-size:18px}
  html.mx-dm body.motop-page-messages .motop-dm-listhead a{font-size:30px;line-height:1;color:var(--mx-text);padding:0 10px 4px 0;text-decoration:none}
  html.mx-dm body.motop-page-messages .motop-dm.is-thread .motop-dm-listhead{display:none}
  html.mx-dm body.motop-page-messages .motop-dm-list{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html.mx-dm body.motop-page-messages .motop-dm-thread{flex:1;min-height:0;height:auto}
  html.mx-dm body.motop-page-messages .motop-dm-msgs{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html.mx-dm body.motop-page-messages .motop-dm-form{flex:none}
  html.mx-dm body.motop-page-messages .motop-dm-form textarea{font-size:16px!important}
  html.mx-dm body.motop-page-messages .motop-dm-tip{display:none}
  html.mx-dm .motop-dm *{-webkit-tap-highlight-color:transparent}
}
