
  :root {
    --brand: #0d7f80;
    --brand-deep: #075a5d;
    --brand-soft: #e8f6f4;
    --lime: #d9f36b;
    --ink: #16232b;
    --ink-2: #52636e;
    --ink-3: #8b9ba5;
    --line: #e2eaec;
    --bg: #f3f7f7;
    --card: #ffffff;
    --danger: #c8453d;
    --ok: #1b8a5a;
    --radius: 16px;
    --shadow: 0 10px 34px rgba(12, 63, 66, .07), 0 2px 6px rgba(12, 63, 66, .04);
  }
  * { box-sizing: border-box; }
  html, body { margin: 0; padding: 0; }
  body {
    min-height: 100vh; display: flex; flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
  }
  button, input, select { font: inherit; }
  button { cursor: pointer; }
  a { color: var(--brand); text-decoration: none; }
  a:hover { text-decoration: underline; }

  /* ---------- header ---------- */
  .hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.85) 38%, rgba(255,255,255,.15) 72%, rgba(255,255,255,0) 100%), url("../img/banner.jpg") center center / cover no-repeat, #f7faff;
    color: var(--ink);
    padding: 30px 0 78px;
  }
    .hero::before {
    content: ""; position: absolute; right: -80px; top: -40px; width: 620px; height: 340px;
    background: radial-gradient(ellipse at center, rgba(124,92,245,.18), transparent 68%);
  }
    .hero::after {
    content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
    right: -90px; top: -210px;
    background: radial-gradient(circle, rgba(124,92,245,.16), transparent 68%);
  }
  .wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; position: relative; z-index: 1; }
  .hero-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
  .brand { display: flex; align-items: center; gap: 15px; }
  .brand-icon {
    width: 54px; height: 54px; border-radius: 15px; flex: none;
    background: rgba(255,255,255,.78); border: 1px solid #e3e8f7;
    display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.10);
    overflow: hidden;
  }
  .brand-icon img { width: 100%; height: 100%; display: block; object-fit: cover; }
  h1 { margin: 0; font-size: 23px; letter-spacing: .3px; font-weight: 700; }
  .subtitle { margin: 3px 0 8px; color: var(--ink-2); font-size: 13px; }
  .chips { display: flex; gap: 7px; flex-wrap: wrap; }
  .chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px; border-radius: 999px;
    background: rgba(255,255,255,.85); border: 1px solid #e3e8f7;
    color: var(--ink-2); font-size: 11px; line-height: 1.7;
  }
  .chip.live { background: #e8f8f0; border-color: #a7e8c4; color: #0f766e; }
  .dot { width: 6px; height: 6px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }

  /* ---------- layout ---------- */
  main { margin-top: -52px; padding-bottom: 46px; position: relative; z-index: 2; flex: 1 0 auto; }
  .grid { display: grid; grid-template-columns: minmax(0, 1fr) 318px; gap: 18px; align-items: start; }
  .card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
  }
  .card + .card { margin-top: 18px; }
  .card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 20px; border-bottom: 1px solid var(--line);
  }
  .card-title { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15px; margin: 0; }
  .card-title .num {
    width: 22px; height: 22px; border-radius: 7px; background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; font-size: 11px; font-weight: 800;
  }
  .card-sub { font-size: 12px; color: var(--ink-3); font-weight: 400; }
  .card-body { padding: 20px; }

  /* ---------- request form ---------- */
  .field-label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 8px; }
  .req { color: var(--danger); }
  .input-row { display: flex; gap: 9px; align-items: stretch; }
  .input-wrap { position: relative; flex: 1; min-width: 0; }
  .input-wrap svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--ink-3); pointer-events: none; }
  input[type="text"] {
    width: 100%; height: 46px; padding: 0 13px 0 40px;
    border: 1px solid #d7e2e4; border-radius: 10px; background: #fbfdfd;
    color: var(--ink); outline: none; transition: border-color .18s, box-shadow .18s;
  }
  input[type="text"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13,127,128,.11); background: #fff; }
  input[type="text"]::placeholder { color: #aab8be; }
  .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 46px; padding: 0 17px; border-radius: 10px; border: 1px solid transparent;
    font-weight: 650; font-size: 13px; white-space: nowrap; transition: filter .15s, transform .1s, background .15s;
  }
  .btn:active { transform: translateY(1px); }
  .btn:disabled { opacity: .6; cursor: not-allowed; }
  .btn-primary { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(13,127,128,.22); }
  .btn-primary:hover:not(:disabled) { background: var(--brand-deep); }
  .btn-ghost { background: #fff; border-color: #d7e2e4; color: var(--ink-2); }
  .btn-ghost:hover:not(:disabled) { background: #f6faf9; border-color: #b9cdcf; }
  .btn-accent { background: var(--lime); color: #2b4108; }
  .btn-accent:hover:not(:disabled) { background: #cdea55; }
  .btn-sm { height: 32px; padding: 0 11px; font-size: 12px; border-radius: 8px; }
  .btn svg { width: 15px; height: 15px; flex: none; }
  .form-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }.hint-inline { font-size: 12px; color: var(--ink-3); }
  .hint-inline code { background: #f0f5f5; padding: 1px 5px; border-radius: 4px; font-size: 11px; color: var(--ink-2); }

  /* ---------- status ---------- */
  .status-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 11px 14px; border-radius: 10px; font-size: 12px;
    background: #f5f8f8; color: var(--ink-2); border: 1px solid #e8efef;
  }
  .status-bar.ok { background: #edf8f2; border-color: #cfe9db; color: #176645; }
  .status-bar.err { background: #fdf0ef; border-color: #f3d4d0; color: #a83d36; }
  .status-bar.wait { background: #fff8e9; border-color: #f3e3bd; color: #8a6414; }
  .status-icon { width: 16px; height: 16px; flex: none; }
  .status-metrics { margin-left: auto; display: flex; gap: 14px; font-size: 11px; opacity: .85; }

  /* ---------- result ---------- */
  .empty { text-align: center; padding: 46px 18px 40px; color: var(--ink-3); }
  .empty-icon {
    width: 62px; height: 62px; margin: 0 auto 14px; border-radius: 19px;
    display: grid; place-items: center; background: var(--brand-soft); color: var(--brand);
  }
  .empty-icon svg { width: 30px; height: 30px; }
  .empty h3 { margin: 0 0 5px; font-size: 14px; color: var(--ink-2); }
  .empty p { margin: 0; font-size: 12px; }
  .meta { display: flex; gap: 12px; align-items: center; padding: 4px 0 16px; }
  .avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #eef3f3; border: 1px solid var(--line); flex: none; }
  .avatar-fallback { display: grid; place-items: center; color: var(--brand); font-weight: 700; }
  .meta-text { min-width: 0; }
  .meta-title { font-size: 15px; font-weight: 700; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .meta-desc { font-size: 12px; color: var(--ink-3); margin: 1px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tag { margin-left: auto; flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--brand-soft); color: var(--brand); }
  .section-head { display: flex; align-items: center; gap: 8px; margin: 6px 0 11px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
  .section-head .bar { width: 3px; height: 13px; border-radius: 2px; background: var(--brand); }
  .section-head .count { color: var(--ink-3); font-weight: 500; }
  .section-head .spacer { flex: 1; }
  .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; }
  .thumb {
    border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #f7fafa;
    transition: transform .16s, box-shadow .16s, border-color .16s;
  }
  .thumb:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(12,63,66,.10); border-color: #c8dcdc; }
  .thumb-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #eaf0f0; }
  .thumb-img.err { opacity: .35; }
  .thumb-body { padding: 9px 10px 10px; }
  .thumb-name { font-size: 11px; color: var(--ink-2); font-weight: 700; display: flex; align-items: center; gap: 6px; }
  .thumb-name .idx { color: var(--brand); font-family: ui-monospace, Consolas, monospace; }
  .thumb-actions { display: flex; gap: 6px; margin-top: 8px; }
  .thumb-actions button { flex: 1; }
  .video-list { display: grid; gap: 10px; }
  .video-item {
    display: flex; gap: 12px; align-items: center; padding: 10px;
    border: 1px solid var(--line); border-radius: 11px; background: #fbfdfd;
  }
  .video-item .poster { width: 96px; height: 62px; border-radius: 7px; object-fit: cover; background: #e8eff0; flex: none; }
  .video-info { min-width: 0; flex: 1; }
  .video-info .vtitle { font-size: 12px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .video-info .vurl { font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; font-family: ui-monospace, Consolas, monospace; }
  .video-actions { display: flex; gap: 6px; flex: none; }
  .raw { margin-top: 20px; border-top: 1px dashed var(--line); padding-top: 14px; }
  .raw summary { cursor: pointer; font-size: 12px; color: var(--ink-2); font-weight: 700; display: flex; align-items: center; gap: 6px; list-style: none; }
  .raw summary::-webkit-details-marker { display: none; }
  .raw summary svg { width: 13px; height: 13px; transition: transform .2s; }
  .raw[open] summary svg { transform: rotate(90deg); }
  .raw pre {
    margin: 10px 0 0; padding: 14px; background: #10292d; color: #cdeae5; border-radius: 10px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; line-height: 1.65;
    max-height: 330px; overflow: auto; white-space: pre-wrap; word-break: break-all;
  }

  /* ---------- sidebar ---------- */
  .tips { margin: 0; padding-left: 17px; color: var(--ink-2); font-size: 12px; display: grid; gap: 8px; }
  .tips li::marker { color: var(--brand); }
  .notice {
    display: flex; gap: 9px; padding: 11px; border-radius: 9px;
    background: #fff8e9; border: 1px solid #f2e4c0; color: #7b5b16; font-size: 11.5px; line-height: 1.65;
  }
  .notice svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
  .foot { text-align: center; font-size: 11px; color: var(--ink-3); padding: 0 0 24px; }

  /* ---------- toast ---------- */
  #toast {
    position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 18px);
    background: #17343a; color: #fff; padding: 10px 16px; border-radius: 10px;
    font-size: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); z-index: 99;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  #toast.show { opacity: 1; transform: translate(-50%, 0); }
  @media (max-width: 900px) {
    .grid { grid-template-columns: 1fr; }
    main { margin-top: -46px; }
    .hero { padding-bottom: 66px; }
  }
  @media (max-width: 560px) {
    .wrap { padding: 0 14px; }
    .hero-inner { gap: 14px; }
    h1 { font-size: 19px; }
    .card-body { padding: 15px; }
    .input-row { flex-wrap: wrap; }
    .input-row .btn { width: 100%; }
    .status-metrics { width: 100%; margin-left: 0; }
    .gallery { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .video-item { flex-wrap: wrap; }
    .video-actions { width: 100%; }
  }

  
  /* ---------- footer waves ---------- */
  .footer-waves {
    position: relative; height: 90px; overflow: hidden; flex: none;
    background: linear-gradient(180deg, rgba(233,240,255,0) 0%, #e9f0ff 72%, #e9f0ff 100%);
  }
  .footer-waves svg { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; }
  .fw-layer { transform-origin: bottom; }
  .fw-haze   { fill: rgba(167,139,250,.18); animation: wave-move 14s linear infinite; }
  .fw-far    { fill: rgba(124,92,245,.22); animation: wave-move 11s linear infinite reverse; }
  .fw-middle { fill: rgba(96,140,240,.30); animation: wave-move 9s linear infinite; }
  .fw-near   { fill: #e9f0ff; animation: wave-move 7s linear infinite reverse; }
  @keyframes wave-move { from { transform: translateX(0); } to { transform: translateX(-50%); } }
  @media (prefers-reduced-motion: reduce) { .fw-layer { animation: none !important; } }
  .foot-note {
    text-align: center; font-size: 11px; color: #7d8aa8;
    padding: 16px 0 26px; background: #e9f0ff; margin-top: -1px;
  }
