:root {
  --bg: #eef4f6;
  --card: #ffffff;
  --ink: #15202b;
  --muted: #5b6b7a;
  --line: #d7e0e8;
  --brand: #1f7a8c;
  --brand-dark: #155e6d;
  --danger: #b42318;
  --radius: 16px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #e4f0f4 0%, var(--bg) 180px);
  -webkit-text-size-adjust: 100%;
}
button, textarea, a { font: inherit; }
a { color: var(--brand); }

.app {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 12px 16px calc(28px + env(safe-area-inset-bottom));
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.brand strong {
  display: block;
  font-size: 17px;
}
.brand span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.link-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px 20px;
  box-shadow: 0 10px 30px rgba(21, 32, 43, 0.05);
}
.card h1 {
  margin: 0 0 8px;
  font-size: 22px;
}
.muted { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 16px; }
.label {
  display: block;
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 600;
}
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  resize: vertical;
  min-height: 110px;
  background: #f8fbfc;
  color: var(--ink);
}
textarea:focus {
  outline: 2px solid rgba(31, 122, 140, 0.25);
  border-color: var(--brand);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.btn.primary {
  background: var(--brand);
  color: #fff;
}
.btn.primary:active { background: var(--brand-dark); }
.btn.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.btn.block { width: 100%; margin-top: 10px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.row-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.tip {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.err {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #dce8ec;
  object-fit: cover;
}
.name { font-weight: 600; }
.quota { color: var(--muted); font-size: 13px; margin-top: 2px; }

.result {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.result-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  word-break: break-word;
}
.result-author {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}
video {
  width: 100%;
  border-radius: 12px;
  background: #0b1418;
  max-height: 56vh;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 22px;
  font-size: 13px;
}
.foot a { color: var(--muted); text-decoration: none; }
