/* 个人中心 (/service-center.html). Same palette, fonts and dark theme as 诺村
   (forum.css) so moving between the two feels like one place. */
:root {
  --f-bg: #F7F6F2;
  --f-card: #FFFFFF;
  --f-ink: #15171C;
  --f-sub: #3A3D44;
  --f-soft: #6A6862;
  --f-mute: #9A988F;
  --f-line: #ECEAE3;
  --f-line-2: #E2E0D8;
  --f-inv: #15171C;
  --f-inv-ink: #FFFFFF;
  --f-chip: #EFEEE9;
  --f-amber: #F3B562;
  --f-ride: #C9822B; --f-ride-t: #F8ECDB;
  --f-trade: #1E6B52; --f-trade-t: #E3F1EA;
  --f-rent: #2F5DA8; --f-rent-t: #E5ECF8;
  --f-qa: #6B4BA8; --f-qa-t: #EEE9F8;
  --f-event: #C2412D; --f-event-t: #F9E5E0;
  --f-serif: "Noto Serif SC", "Songti SC", serif;
  --f-sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --f-num: "Archivo", "Noto Sans SC", sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --f-bg: #0E0F12;
  --f-card: #17191E;
  --f-ink: #F2F0EA;
  --f-sub: #C9C6BD;
  --f-soft: #A3A097;
  --f-mute: #77756E;
  --f-line: #25282F;
  --f-line-2: #30333B;
  --f-inv: #F2F0EA;
  --f-inv-ink: #15171C;
  --f-chip: #22252B;
  --f-ride: #E3A04F; --f-ride-t: #3A2A16;
  --f-trade: #4FB38E; --f-trade-t: #15302A;
  --f-rent: #7A9FE0; --f-rent-t: #1A2640;
  --f-qa: #A88BE0; --f-qa-t: #2A2340;
  --f-event: #E5735F; --f-event-t: #3A1F1A;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.me { margin: 0; background: var(--f-bg); color: var(--f-ink); font-family: var(--f-sans); font-size: 15px; line-height: 1.55; }
.me [hidden] { display: none !important; }
.me-shell a { color: inherit; text-decoration: none; }
.me-shell button { font-family: inherit; color: inherit; }
.me :focus-visible { outline: 2px solid var(--f-ride); outline-offset: 2px; }

/* Shared header in dark mode */
:root[data-theme="dark"] .ngnh { --ngnh-ink: #F2F0EA; --ngnh-soft: #A3A097; --ngnh-line: #25282F; background: rgba(14, 15, 18, .9); }
:root[data-theme="dark"] .ngnh-panel { background: #17191E; }
:root[data-theme="dark"] .ngnh-mark { color: #F2F0EA; }
:root[data-theme="dark"] .ngnh-burger { background: #17191E; border-color: #30333B; }

/* Login chip inside the shared header (other pages get this from styles.css) */
.ngnh .site-auth-menu { position: relative; }
.ngnh .site-user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border: 0; border-radius: 999px; background: var(--f-chip); color: var(--f-ink); font: 500 14px var(--f-sans); cursor: pointer; }
.ngnh .site-user-chip span { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ngnh .site-user-chip-avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.ngnh .site-auth-menu-dropdown { position: absolute; top: calc(100% + 8px); right: 0; min-width: 150px; padding: 6px; border: 1px solid var(--f-line); border-radius: 14px; background: var(--f-card); box-shadow: 0 18px 40px rgba(0,0,0,.14); display: grid; gap: 2px; z-index: 40; }
.ngnh .site-auth-menu-item { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--f-ink); font: 14px var(--f-sans); text-align: left; cursor: pointer; }
.ngnh .site-auth-menu-item:hover { background: var(--f-chip); }
.ngnh .site-auth-nav-button { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--f-line-2); font-size: 14px; }

/* Layout */
.me-shell { max-width: 1080px; margin: 0 auto; padding: 24px 24px 48px; display: flex; flex-direction: column; gap: 16px; }
.me-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.me-side { display: flex; flex-direction: column; gap: 16px; }
.me-panel { background: var(--f-card); border: 1px solid var(--f-line); border-radius: 20px; padding: 18px 20px; }
.me-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.me-head h2 { margin: 0; font: 700 19px/1.3 var(--f-serif); display: flex; align-items: center; gap: 8px; }
.me-more { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--f-soft); }

/* Missing-profile strip */
.me-fix { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 14px; background: var(--f-ride-t); color: var(--f-ink); font-size: 14px; }
.me-fix-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--f-ride); flex: none; }
.me-fix b { margin-left: auto; color: var(--f-ride); font-weight: 600; white-space: nowrap; }

/* Hero */
.me-hero { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "av who tools" "av stats stats"; column-gap: 20px; row-gap: 14px; align-items: center; padding: 24px; border-radius: 24px; background: var(--f-card); border: 1px solid var(--f-line); overflow: hidden; }
.me-hero::before { content: ""; position: absolute; inset: 0 0 auto; height: 76px; background: linear-gradient(110deg, var(--f-ride-t), var(--f-qa-t) 55%, var(--f-rent-t)); }
.me-hero > * { position: relative; }
.me-avatar { grid-area: av; align-self: start; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; border: 4px solid var(--f-card); background: var(--f-trade); color: #FFF; font: 500 34px var(--f-sans); margin-top: 6px; }
.me-avatar img { width: 100%; height: 100%; object-fit: cover; }
.me-who { grid-area: who; min-width: 0; padding-top: 34px; }
.me-who h1 { margin: 0 0 6px; font: 700 28px/1.2 var(--f-serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.me-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--f-chip); color: var(--f-soft); font: 500 12px/20px var(--f-num); }
.me-tag--id { cursor: pointer; border: 0; }
.me-tag--member { background: var(--f-amber); color: #1A1206; }
.me-hero-tools { grid-area: tools; align-self: start; display: flex; gap: 8px; }
.me-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 16px; border: 0; border-radius: 999px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.me-btn--line { background: var(--f-card); color: var(--f-ink); box-shadow: inset 0 0 0 1px var(--f-line-2); }
.me-sheet a { text-decoration: none; }
.me-btn--ink { background: var(--f-inv); color: var(--f-inv-ink) !important; }
.me-btn--amber { background: var(--f-amber); color: #1A1206 !important; }
.me-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; border: 0; background: var(--f-card); box-shadow: inset 0 0 0 1px var(--f-line-2); color: var(--f-sub); cursor: pointer; }
.me-stats { grid-area: stats; display: flex; gap: 8px; }
.me-stats a { flex: 1; display: flex; flex-direction: column; padding: 10px 14px; border-radius: 14px; background: var(--f-bg); }
.me-stats b { font: 600 22px/1.2 var(--f-num); }
.me-stats small { color: var(--f-mute); font-size: 12px; }

/* Quick tiles */
.me-quick { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.me-quick a, .me-quick button { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 4px 12px; border: 1px solid var(--f-line); border-radius: 18px; background: var(--f-card); font-size: 13px; color: var(--f-sub); cursor: pointer; transition: transform .15s; }
.me-quick a:hover, .me-quick button:hover { transform: translateY(-2px); }
.me-quick i { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.me-quick svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Segmented control and tabs */
.me-seg { display: flex; padding: 3px; border-radius: 999px; background: var(--f-chip); }
.me-seg button, .me-tabs button { border: 0; background: none; cursor: pointer; font-size: 13px; color: var(--f-soft); }
.me-seg button { padding: 5px 12px; border-radius: 999px; }
.me-seg button[aria-selected="true"] { background: var(--f-card); color: var(--f-ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.me-seg span, .me-tabs span { font-family: var(--f-num); color: var(--f-mute); }
.me-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--f-line); margin-bottom: 4px; }
.me-tabs button { padding: 6px 0 9px; margin-bottom: -1px; border-bottom: 2px solid transparent; }
.me-tabs button[aria-selected="true"] { color: var(--f-ink); font-weight: 600; border-color: var(--f-ink); }

/* Orders */
.me-list { display: flex; flex-direction: column; }
.me-order { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; width: 100%; padding: 12px 6px; border: 0; border-top: 1px solid var(--f-line); background: none; text-align: left; cursor: pointer; border-radius: 0; }
.me-order:first-child { border-top: 0; }
.me-order:hover { background: var(--f-bg); border-radius: 12px; }
.me-order-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.me-order-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.me-order-main { min-width: 0; }
.me-order-main b { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-order-main small { display: block; color: var(--f-mute); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-order-main small em { font-style: normal; font-family: var(--f-num); }
.me-date { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.me-date b { font: 600 15px/1 var(--f-num); }
.me-pill { padding: 2px 9px; border-radius: 999px; font-size: 12px; line-height: 18px; white-space: nowrap; background: var(--f-chip); color: var(--f-soft); }
.me-pill--go { background: var(--f-ride-t); color: var(--f-ride); }
.me-pill--ok { background: var(--f-trade-t); color: var(--f-trade); }
.me-pill--new { background: var(--f-rent-t); color: var(--f-rent); }
.me-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 12px; color: var(--f-mute); font-size: 14px; text-align: center; }
.me-empty-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.me-skel { height: 56px; margin: 6px 0; border-radius: 12px; background: linear-gradient(90deg, var(--f-chip), var(--f-bg), var(--f-chip)); background-size: 200% 100%; animation: me-skel 1.2s infinite linear; }
.me-skel--sm { height: 40px; }
@keyframes me-skel { to { background-position: -200% 0; } }

/* Membership pass */
.me-pass { position: relative; overflow: hidden; padding: 20px; border-radius: 22px; background: #15171C; color: #F2F1EC; display: flex; flex-direction: column; gap: 8px; }
:root[data-theme="dark"] .me-pass { background: #1D2026; box-shadow: inset 0 0 0 1px var(--f-line-2); }
.me-pass::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(243,181,98,.45), transparent 70%); pointer-events: none; }
.me-pass-top { display: flex; justify-content: space-between; align-items: center; }
.me-pass-kicker { font: 600 11px/1 var(--f-num); letter-spacing: .14em; color: #B9B7AF; }
.me-pass-status { padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 12px; }
.me-pass.is-member .me-pass-status { background: var(--f-amber); color: #1A1206; font-weight: 600; }
.me-pass.is-member .me-pass-status.is-muted { background: rgba(255,255,255,.12); color: #CFCCC4; font-weight: 400; }
.me-pass-title { margin: 0; font: 600 30px/1.1 var(--f-num); letter-spacing: -.01em; }
.me-pass-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; font-size: 13px; color: #CFCCC4; }
.me-pass-body p { margin: 0; }
.me-pass-benefit { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.07); }
.me-pass-benefit i { width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center; background: rgba(243,181,98,.18); color: var(--f-amber); font-style: normal; }
.me-pass-benefit svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.me-pass-benefit b { display: block; color: #FFF; font-size: 15px; }
.me-pass-benefit small { display: block; color: #A9A69E; font-size: 12px; }
.me-pass-picks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.me-pass-picks button { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.04); color: #FFF; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
.me-pass-picks button:hover { border-color: var(--f-amber); }
.me-pass-picks button i { color: var(--f-amber); }
.me-pass-picks button small { margin-top: -4px; color: #A9A69E; font-size: 12px; font-weight: 400; }
.me-pass-picks svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.me-pass-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.me-pass .me-btn--line { background: transparent; color: #F2F1EC; box-shadow: inset 0 0 0 1px #4A4D55; }
.me-pass form { display: grid; gap: 8px; }
.me-pass input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #3A3D44; border-radius: 10px; background: rgba(255,255,255,.06); color: #FFF; font: 14px var(--f-num); }
.me-pass input::placeholder { color: #8C8A82; }
.me-pass-msg { margin: 0; font-size: 12px; color: var(--f-amber); position: relative; z-index: 1; }
.me-pass-msg:empty { display: none; }

/* Forum card */
.me-forum-logo { font: 700 19px var(--f-serif); }
.me-bell { display: flex; align-items: center; gap: 8px; margin: -2px 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--f-event-t); color: var(--f-event); font-size: 13px; font-weight: 500; }
.me-bell b { font-family: var(--f-num); }
.me-flist { display: flex; flex-direction: column; }
.me-fitem { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 2px; border-top: 1px solid var(--f-line); }
.me-fitem:first-child { border-top: 0; }
.me-fitem i { width: 8px; height: 8px; border-radius: 50%; }
.me-fitem b { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-fitem small { color: var(--f-mute); font: 12px var(--f-num); white-space: nowrap; }
.me-fempty { padding: 18px 0 6px; color: var(--f-mute); font-size: 13px; text-align: center; }
.me-fempty a { display: inline-block; margin-top: 8px; color: var(--f-ink); font-weight: 600; }

/* Footer */
.me-foot { display: flex; justify-content: center; align-items: center; gap: 10px; padding-top: 8px; color: var(--f-mute); font-size: 13px; }
.me-foot button { border: 0; background: none; color: inherit; font-size: 13px; cursor: pointer; }

/* Detail sheet */
.me-sheet { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; }
.me-sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 11, 14, .45); }
.me-sheet-card { position: relative; width: min(480px, 100%); max-height: 86vh; overflow: auto; padding: 22px; border-radius: 22px; background: var(--f-card); color: var(--f-ink); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.me-sheet-card h2 { margin: 0 0 14px; font: 700 20px var(--f-serif); }
.me-sheet-close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--f-chip); color: var(--f-ink); font-size: 20px; cursor: pointer; }
.me-kv { display: grid; grid-template-columns: 1fr 1fr; grid-auto-flow: dense; gap: 8px; margin: 0; }
.me-kv div { padding: 10px 12px; border-radius: 12px; background: var(--f-bg); min-width: 0; }
.me-kv div.wide { grid-column: 1 / -1; }
.me-kv dt { color: var(--f-mute); font-size: 12px; }
.me-kv dd { margin: 0; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.me-sheet-note { margin: 14px 0 0; color: var(--f-soft); font-size: 13px; }
body.me-lock { overflow: hidden; }

.me-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 90; padding: 10px 18px; border-radius: 999px; background: var(--f-inv); color: var(--f-inv-ink); font-size: 14px; }

/* Phones */
@media (max-width: 860px) {
  .me-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .me-shell { padding: 12px 12px calc(32px + env(safe-area-inset-bottom)); gap: 12px; }
  .me-hero { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "av tools" "who who" "stats stats"; padding: 16px; row-gap: 10px; border-radius: 20px; }
  .me-hero::before { height: 56px; }
  .me-avatar { width: 72px; height: 72px; font-size: 28px; margin-top: 4px; }
  .me-hero-tools { align-self: end; justify-self: end; }
  .me-who { padding-top: 0; }
  .me-who h1 { font-size: 24px; }
  .me-stats { gap: 6px; }
  .me-stats a { padding: 8px 10px; }
  .me-stats b { font-size: 18px; }
  .me-quick { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 10px 4px; border: 1px solid var(--f-line); border-radius: 18px; background: var(--f-card); }
  .me-quick a, .me-quick button { padding: 4px 0; border: 0; background: none; font-size: 12px; gap: 6px; }
  .me-quick i { width: 40px; height: 40px; border-radius: 12px; }
  .me-panel { padding: 14px; border-radius: 18px; }
  .me-order { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; padding: 10px 2px; }
  .me-order-ico { width: 40px; height: 40px; border-radius: 12px; }
  .me-sheet { place-items: end stretch; padding: 0; }
  .me-sheet-card { width: 100%; border-radius: 22px 22px 0 0; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}
@media (max-width: 370px) {
  .me-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 10px; }
}

/* 个人资料 edit form (/profile.html) */
.me-shell--form { max-width: 560px; }
.me-back { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; color: var(--f-soft); font-size: 14px; }
.me-form-card { padding: 24px; }
.me-form-title { margin: 0; font: 700 26px/1.2 var(--f-serif); }
.me-form-sub { margin: 4px 0 18px; color: var(--f-mute); font-size: 14px; }
.me-form { display: flex; flex-direction: column; gap: 14px; }
.me-field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.me-field > span, .me-field legend { padding: 0; font-size: 13px; color: var(--f-soft); }
.me-field em { font-style: normal; color: var(--f-event); }
.me-field input[type="text"], .me-field input[type="tel"], .me-field input[type="email"] { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--f-line-2); border-radius: 12px; background: var(--f-bg); color: var(--f-ink); font: 16px var(--f-sans); }
.me-field input:focus { outline: none; border-color: var(--f-ride); background: var(--f-card); }
.me-field input[readonly] { color: var(--f-mute); background: transparent; border-style: dashed; }
.me-choice-row { display: flex; gap: 8px; }
.me-choice-row label { flex: 1; cursor: pointer; }
.me-choice-row input { position: absolute; opacity: 0; pointer-events: none; }
.me-choice-row span { display: flex; align-items: center; justify-content: center; height: 44px; border: 1px solid var(--f-line-2); border-radius: 12px; font-size: 15px; color: var(--f-sub); }
.me-choice-row input:checked + span { border-color: var(--f-ink); background: var(--f-inv); color: var(--f-inv-ink); font-weight: 600; }
.me-choice-row input:focus-visible + span { outline: 2px solid var(--f-ride); outline-offset: 2px; }
.me-form-msg { margin: 0; font-size: 14px; color: var(--f-soft); }
.me-form-msg:empty { display: none; }
.me-form-msg.is-error { color: var(--f-event); }
.me-form-msg.is-success { color: var(--f-trade); }
.me-form-acts { display: flex; gap: 8px; }
.me-form-acts .me-btn { flex: 1; min-height: 46px; }
@media (max-width: 640px) {
  .me-form-card { padding: 18px 16px; }
}
