:root {
  --bg: #f2f4ef;
  --surface: #ffffff;
  --ink: #171918;
  --muted: #68706b;
  --line: #d8ddd7;
  --accent: #df493b;
  --accent-dark: #b9362c;
  --green: #237c69;
  --green-soft: #e4f1ec;
  font-family: Inter, "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; letter-spacing: 0; }
body { margin: 0; min-width: 320px; background: var(--bg); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(20px, calc((100vw - 1180px) / 2)); background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 750; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; background: var(--ink); border-radius: 6px; }
.brand-mark span { width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 10px solid #fff; margin-left: 2px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.admin-link { color: var(--muted); font-size: 12px; text-decoration: none; }
.admin-link:hover { color: var(--ink); }
.status-badge { padding: 6px 9px; border-radius: 4px; font-size: 12px; color: var(--green); background: var(--green-soft); }
.status-badge.muted { color: var(--muted); background: #edf0ed; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 6px; background: #fff; display: grid; place-items: center; }
.account-dot { width: 15px; height: 15px; border: 2px solid var(--ink); border-radius: 50%; position: relative; }
.account-dot::after { content: ""; width: 19px; height: 8px; border: 2px solid var(--ink); border-bottom: 0; border-radius: 12px 12px 0 0; position: absolute; left: -4px; top: 14px; }
main { min-height: calc(100vh - 64px); }
.workspace { padding: 54px max(20px, calc((100vw - 980px) / 2)) 46px; background: var(--surface); border-bottom: 1px solid var(--line); }
.workspace-heading, .section-heading, .admin-auth { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 11px; font-weight: 800; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 30px; line-height: 1.2; }
h2 { margin-bottom: 0; font-size: 20px; }
.support-copy { margin-bottom: 3px; color: var(--muted); font-size: 13px; }
.parse-bar { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 25px; }
.parse-bar input, .invite-row input, .key-row input, .admin-form input { min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #f9faf7; outline: none; }
.parse-bar input:focus, input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(35,124,105,.11); }
.parse-bar button, .invite-row button, .key-row button, .admin-form button { height: 48px; padding: 0 22px; border: 0; border-radius: 6px; color: #fff; background: var(--ink); font-weight: 700; }
.parse-bar button:hover, .admin-form button:hover { background: #303431; }
.parse-bar button:disabled { background: #929793; cursor: wait; }
.inline-status { min-height: 20px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.inline-status.error { color: var(--accent-dark); }
.results-band { padding: 36px max(20px, calc((100vw - 1180px) / 2)) 80px; }
.section-heading { margin-bottom: 18px; }
.section-heading > span { color: var(--muted); font-size: 12px; }
.empty-state { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); border-top: 1px solid var(--line); }
.empty-play { width: 46px; height: 46px; display: grid; place-items: center; color: #fff; background: var(--green); border-radius: 50%; padding-left: 3px; margin-bottom: 5px; }
.empty-state strong { color: var(--ink); font-size: 17px; }
.empty-state span { font-size: 13px; }
.waterfall { columns: 3 280px; column-gap: 14px; }
.media-card { display: inline-block; width: 100%; margin: 0 0 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); break-inside: avoid; }
.media-card img, .media-card video { display: block; width: 100%; max-height: 520px; object-fit: cover; background: #111; }
.media-card audio { display: block; width: calc(100% - 20px); margin: 20px 10px 6px; }
.media-body { padding: 12px; }
.media-title { margin: 0; font-size: 14px; line-height: 1.45; }
.media-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.media-meta a { color: var(--accent); text-decoration: none; font-weight: 700; }
.account-dialog { width: min(440px, calc(100vw - 28px)); padding: 28px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: #fff; }
.account-dialog::backdrop { background: rgba(16,18,17,.52); }
.dialog-close { position: absolute; right: 12px; top: 10px; width: 34px; height: 34px; border: 0; background: transparent; font-size: 25px; color: var(--muted); }
.dialog-copy { margin: 14px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.huawei-login { height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 6px; color: #fff; background: #c7000b; text-decoration: none; font-weight: 700; }
.huawei-symbol { width: 23px; height: 23px; display: grid; place-items: center; border-radius: 50%; color: #c7000b; background: #fff; font-size: 13px; }
.membership-row { display: flex; justify-content: space-between; margin: 18px 0; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 13px; }
.membership-row strong { color: var(--green); }
.invite-block label { display: block; margin-bottom: 7px; font-size: 12px; color: var(--muted); }
.invite-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.invite-row input { height: 42px; }
.invite-row button { height: 42px; padding: 0 16px; background: var(--green); }
.invite-block p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.text-button { margin-top: 22px; padding: 0; border: 0; color: var(--muted); background: transparent; }
.admin-label { color: var(--muted); font-size: 13px; }
.admin-main { max-width: 1180px; margin: 0 auto; padding: 46px 20px 80px; }
.admin-auth { padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.key-row { display: flex; gap: 8px; }
.key-row input { width: 260px; height: 42px; }
.key-row button { height: 42px; }
.admin-section { padding: 32px 0; border-bottom: 1px solid var(--line); }
.admin-form { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)) auto; gap: 10px; margin: 20px 0; align-items: end; }
.admin-form label { color: var(--muted); font-size: 11px; }
.admin-form input { display: block; width: 100%; height: 42px; margin-top: 6px; }
.admin-form button { height: 42px; }
.channel-form { margin-top: 18px; }
.channel-form label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.channel-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.channel-row input { height: 44px; min-width: 0; padding: 0 13px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.channel-row button { height: 44px; padding: 0 16px; border: 0; border-radius: 6px; color: #fff; background: var(--green); font-weight: 700; }
.channel-form p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.config-ok { color: var(--green) !important; }
.code-output { padding: 14px; overflow: auto; border: 1px solid #b7d9cd; border-radius: 6px; color: var(--green); background: var(--green-soft); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 11px; background: #f8faf7; }
td button { border: 1px solid var(--line); border-radius: 4px; padding: 6px 9px; background: #fff; }
.history-title { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.history-link { display: block; max-width: 360px; overflow: hidden; color: var(--green); text-overflow: ellipsis; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
@media (max-width: 720px) {
  .topbar { padding: 0 14px; }
  .status-badge { display: none; }
  .workspace { padding: 34px 16px 30px; }
  .workspace-heading, .admin-auth { align-items: flex-start; flex-direction: column; }
  .support-copy { margin: 10px 0 0; }
  .parse-bar { grid-template-columns: 1fr; }
  .results-band { padding: 28px 12px 60px; }
  .waterfall { columns: 2 140px; column-gap: 9px; }
  .media-card { margin-bottom: 9px; }
  .admin-form { grid-template-columns: 1fr 1fr; }
  .channel-row { grid-template-columns: 1fr; }
  .key-row { width: 100%; }
  .key-row input { width: 100%; }
}

