/* 嗨出国 用户中心 /me/ —— 用主题的颜色变量（--c-primary / --c-accent / --line …），手机优先 */
.me { display: grid; gap: 16px; padding-top: 16px; padding-bottom: 48px; align-items: start; }
.me-public { max-width: 440px; }
@media (min-width: 900px) { .me:not(.me-public) { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; padding-top: 28px; } }

/* ---------- 菜单 ---------- */
.me-side { min-width: 0; }
.me-who { display: flex; align-items: center; gap: 10px; padding: 4px 2px 12px; }
.me-who b { display: block; font-size: 16px; line-height: 1.3; }
.me-who small { color: var(--muted); font-size: 12px; }
.me-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gap) * -1); padding: 0 var(--gap) 2px; }
.me-nav::-webkit-scrollbar { display: none; }
.me-nav a, .me-nav button { flex: none; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--text-2); white-space: nowrap; }
.me-nav a.on { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.me-nav em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--c-accent); color: var(--c-accent-ink); display: inline-flex; align-items: center; justify-content: center; }
.me-nav form { display: contents; }
.me-nav button { color: var(--muted); }
@media (min-width: 900px) {
  .me-side { position: sticky; top: 84px; }
  .me-nav { flex-direction: column; gap: 2px; overflow: visible; margin: 0; padding: 0; }
  .me-nav a, .me-nav button { height: 42px; border: 0; background: none; border-radius: var(--r-sm); justify-content: space-between; padding: 0 12px; font-size: 15px; width: 100%; }
  .me-nav a:hover { background: var(--line-2); color: var(--c-primary); }
  .me-nav a.on { background: rgba(var(--c-primary-rgb), .1); color: var(--c-primary); font-weight: 600; }
  .me-nav button { margin-top: 8px; border-top: 1px solid var(--line); border-radius: 0; justify-content: flex-start; }
}

/* ---------- 内容通用 ---------- */
.me-main { min-width: 0; }
.me-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.me-head h1 { font-size: 22px; }
.me-head-act { display: flex; gap: 8px; }
@media (min-width: 900px) { .me-head h1 { font-size: 26px; } }
.me-card { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.me-card h2 { font-size: 17px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.me-hint { color: var(--muted); font-size: 13px; margin: 6px 0 12px; }
.me-empty { text-align: center; color: var(--muted); padding: 48px 16px; background: var(--surface); border-radius: var(--r); }
.me-empty a { color: var(--c-primary); }
.me-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.me-gray { background: #f0f1f3; color: #5b6470; } .me-green { background: #e5f6ee; color: #0b7a4b; }
.me-red { background: #fdecea; color: #b42318; } .me-orange { background: #fff3dc; color: #925a00; }
.me-teal { background: rgba(var(--c-primary-rgb), .1); color: var(--c-primary-dark); }
.me-accent { background: rgba(var(--c-accent-rgb), .16); color: var(--c-accent-text); }
.me-danger { color: #b42318 !important; }
.me-notice { padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: 14px; background: rgba(var(--c-primary-rgb), .08); color: var(--c-primary-dark); }
.me-notice-error { background: #fdecea; color: #912018; }
.me-notice-success { background: #e5f6ee; color: #0b6b42; }
.me-banner { padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 14px; font-size: 14px; background: #fff7e8; color: #6b4300; line-height: 1.7; }
.me-banner-red { background: #fdecea; color: #912018; }
.me-banner-teal { background: rgba(var(--c-primary-rgb), .08); color: var(--c-primary-dark); }
.me-reason { margin-top: 8px; font-size: 13px; color: #912018; background: #fdf3f2; padding: 8px 10px; border-radius: 8px; }

/* ---------- 表单 ---------- */
.me-form { display: grid; gap: 14px; }
.me-form label, .me-write-side label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.me-form label small, .me-write-side small, .me-thumb small { font-weight: 400; color: var(--muted); }
.me input[type=text], .me input[type=email], .me input[type=password], .me select, .me textarea {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; font-size: 15px; font-weight: 400; outline: 0; transition: border-color .15s, box-shadow .15s; }
.me textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.me input:focus, .me select:focus, .me textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb), .12); }
.me input:disabled { background: var(--line-2); color: var(--muted); }
.me input[type=file] { font-size: 13px; font-weight: 400; }
.me .me-check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.me-form .btn { justify-self: start; }
.me-block { width: 100%; justify-self: stretch !important; height: 46px; }
.me-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 登录 / 注册 ---------- */
.me-auth { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 28px 20px; margin-top: 12px; }
.me-auth h1 { font-size: 22px; }
.me-sub { color: var(--muted); font-size: 14px; margin: 6px 0 20px; }
.me-alt { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-2); }
.me-alt a, .me-auth .me-hint a { color: var(--c-primary); font-weight: 600; }
.me-auth .me-hint { text-align: center; margin-bottom: 0; }
.me-role { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.me-role label { position: relative; display: block; cursor: pointer; }
.me-role input { position: absolute; opacity: 0; }
.me-role span { display: grid; gap: 2px; padding: 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); font-weight: 400; }
.me-role b { font-size: 15px; color: var(--text); }
.me-role small { font-size: 12px; color: var(--muted); }
.me-role input:checked + span { border-color: var(--c-primary); background: rgba(var(--c-primary-rgb), .06); }
.me-role input:focus-visible + span { box-shadow: 0 0 0 3px rgba(var(--c-primary-rgb), .2); }

/* ---------- 概览 ---------- */
.me-todo { padding: 4px 0; }
.me-todo a { display: flex; align-items: center; gap: 10px; padding: 12px 18px; font-size: 14px; border-bottom: 1px solid var(--line-2); }
.me-todo a:last-child { border-bottom: 0; }
.me-todo span { flex: 1; }
.me-todo b { color: var(--muted); font-size: 18px; }
.me-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: #9aa0a8; }
.me-dot.me-red { background: #d92d20; } .me-dot.me-orange { background: var(--c-accent); } .me-dot.me-teal { background: var(--c-primary); }
.me-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 640px) { .me-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } .me-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.me-stats-title { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 4px 0 8px; }
.me-stats .me-stat:is(a):hover { box-shadow: var(--shadow-lg); }
.me-stat { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 2px; }
.me-stat b { font-size: 26px; line-height: 1.1; color: var(--c-primary); }
.me-stat span { font-size: 13px; color: var(--muted); }
.me-cta { display: grid; gap: 12px; align-items: center; background: linear-gradient(135deg, rgba(var(--c-primary-rgb), .1), rgba(var(--c-primary-rgb), .03)); box-shadow: none; }
.me-cta p { color: var(--text-2); font-size: 14px; margin-top: 4px; }
@media (min-width: 640px) { .me-cta { grid-template-columns: 1fr auto; } }

/* ---------- tab + 列表 ---------- */
.me-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.me-tabs::-webkit-scrollbar { display: none; }
.me-tabs a { flex: none; padding: 10px 12px; font-size: 14px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.me-tabs a.on { color: var(--c-primary); border-color: var(--c-primary); font-weight: 600; }
.me-tabs small { color: var(--muted); font-weight: 400; margin-left: 2px; }
.me-list { display: grid; gap: 10px; }
.me-item { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 10px; }
@media (min-width: 720px) { .me-item { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.me-item h3 { font-size: 16px; line-height: 1.45; }
.me-item h3 a:hover { color: var(--c-primary); }
.me-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.me-meta a { color: var(--text); font-weight: 600; }
.me-item-act { display: flex; flex-wrap: wrap; gap: 6px; }
.me-item-act form { display: contents; }
.me-cm-text { margin-top: 8px; font-size: 15px; white-space: normal; word-break: break-word; }
.me-cm-reply { margin-top: 10px; padding: 8px 12px; border-left: 3px solid var(--c-primary); background: var(--line-2); border-radius: 0 8px 8px 0; font-size: 14px; }
.me-cm-reply p { margin-top: 4px; }
.me-reply { margin-top: 10px; }
.me-reply summary { cursor: pointer; color: var(--c-primary); font-size: 14px; font-weight: 600; width: fit-content; }
.me-reply form { display: grid; gap: 8px; margin-top: 8px; }
.me-reply .btn { justify-self: end; }
.me-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.me-table th, .me-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.me-table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.me-table small { color: var(--muted); }
@media (max-width: 560px) { .me-table th:nth-child(2), .me-table td:nth-child(2) { display: none; } }
.me-cert { border-left: 4px solid var(--line); }
.me-cert.on { border-left-color: var(--c-accent); }
.me-cert b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.me-cert p { margin-top: 6px; color: var(--text-2); font-size: 14px; }
.me-imgs { display: grid; gap: 14px; }
@media (min-width: 640px) { .me-imgs { grid-template-columns: auto 1fr; } }
.me-avatar-prev { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.me-cover-prev { width: 100%; max-width: 360px; aspect-ratio: 3 / 1; object-fit: cover; border-radius: var(--r-sm); }

/* ---------- 私信 ---------- */
.me-chat { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; display: grid; min-height: 60vh; }
@media (min-width: 760px) { .me-chat { grid-template-columns: 280px minmax(0, 1fr); } }
.me-threads { border-right: 1px solid var(--line-2); overflow-y: auto; max-height: 72vh; }
.me-threads a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-2); }
.me-threads a.on { background: rgba(var(--c-primary-rgb), .07); }
.me-th-body { flex: 1; min-width: 0; display: grid; }
.me-th-body b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-th-body small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-th-side { display: grid; justify-items: end; gap: 2px; }
.me-th-side small { color: var(--muted); font-size: 11px; }
.me-th-side em { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; background: var(--c-accent); color: var(--c-accent-ink); display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; }
.me-conv { display: flex; flex-direction: column; min-width: 0; }
.me-conv .me-empty { margin: auto; box-shadow: none; }
.me-conv-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.me-inline { display: inline; margin-left: auto; }
.me-conv-link { margin-left: auto; font-size: 13px; color: var(--c-primary); }
.me-back { font-size: 26px; line-height: 1; color: var(--muted); padding-right: 4px; }
.me-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; max-height: 56vh; display: grid; gap: 10px; align-content: start; }
.me-msg { display: flex; }
.me-msg > div { max-width: 78%; padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--line-2); font-size: 15px; word-break: break-word; }
.me-msg.mine { justify-content: flex-end; }
.me-msg.mine > div { background: var(--c-primary); color: #fff; border-radius: 14px 14px 4px 14px; }
.me-msg small { display: block; font-size: 11px; opacity: .65; margin-top: 3px; }
.me-send { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-2); align-items: flex-end; }
.me-send textarea { min-height: 44px; height: 44px; flex: 1; }
.me-conv > .me-hint { padding: 0 16px; }
@media (max-width: 759px) {
  .me-chat.has-conv .me-threads { display: none; }
  .me-chat:not(.has-conv) .me-conv { display: none; }
  .me-threads { max-height: none; border-right: 0; }
}
@media (min-width: 760px) { .me-back { display: none; } }

/* ---------- 写文章 ---------- */
.me-write { display: grid; gap: 14px; }
@media (min-width: 1100px) { .me-write { grid-template-columns: minmax(0, 1fr) 280px; align-items: start; } .me-title { grid-column: 1 / -1; } }
.me .me-title { height: 56px; font-size: 22px; font-weight: 700; border: 0; box-shadow: var(--shadow); border-radius: var(--r); padding: 0 18px; }
.me-editor { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.me-toolbar { position: sticky; top: 56px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px 8px; border-bottom: 1px solid var(--line-2); background: rgba(255,255,255,.97); border-radius: var(--r) var(--r) 0 0; }
@media (min-width: 960px) { .me-toolbar { top: 64px; } }
.me-toolbar button { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 8px; font-size: 14px; color: var(--text-2); }
.me-toolbar button:hover { background: var(--line-2); color: var(--c-primary); }
.me-toolbar i { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.me-content { min-height: 50vh; padding: 18px; outline: 0; font-size: 16px; line-height: 1.85; word-break: break-word; }
.me-content:empty::before { content: attr(data-placeholder); color: var(--muted); }
.me-content > * + * { margin-top: .9em; }
.me-content h2 { font-size: 21px; margin-top: 1.4em; }
.me-content h3 { font-size: 18px; margin-top: 1.2em; }
.me-content blockquote { margin-left: 0; margin-right: 0; padding: 4px 14px; border-left: 3px solid var(--c-primary); color: var(--text-2); background: var(--line-2); border-radius: 0 8px 8px 0; }
.me-content ul, .me-content ol { padding-left: 1.4em; }
.me-content img { border-radius: 8px; margin: 0 auto; }
.me-content a { color: var(--c-primary); text-decoration: underline; }
.me-content [data-uploading] { color: var(--muted); font-size: 14px; }
.me-content table { border-collapse: collapse; width: 100%; } .me-content td, .me-content th { border: 1px solid var(--line); padding: 6px 8px; }
.me-write-side { background: var(--surface); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; display: grid; gap: 14px; }
@media (min-width: 1100px) { .me-write-side { position: sticky; top: 84px; } }
.me-thumb { display: grid; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.me-thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r-sm); }
.me-write-side .me-hint { margin: 0; }
.me-write-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 1099px) {
  .me-write-btns { position: sticky; bottom: 0; background: var(--surface); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); margin: 0 -16px -16px; padding-left: 16px; padding-right: 16px; border-top: 1px solid var(--line-2); border-radius: 0 0 var(--r) var(--r); }
}

.me .me-kind { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.me .me-kind > span { font-weight: 600; }
.me .me-kind small { color: #888; font-weight: 400; }

/* 我的收藏 */
.me-filter { margin: 0 0 12px; display: flex; gap: 8px; align-items: center; font-size: 14px; }
.me-filter label { display: flex; gap: 8px; align-items: center; }
.me-filter select { height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: var(--surface); }
.me-off h3 { color: var(--muted); }
