:root {
  --ink: #181817;
  --muted: #77766f;
  --paper: #f7f5ef;
  --card: #fffefb;
  --line: #e8e4da;
  --red: #e74737;
  --red-soft: #fff0ed;
  --green: #277a56;
  --shadow: 0 14px 40px rgba(37, 31, 21, .07);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 0, rgba(235, 96, 70, .12), transparent 28rem),
    var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(100% - 32px, 760px); margin: 0 auto; padding-bottom: 64px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
}
.admin-topbar { justify-content: flex-end; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 760; letter-spacing: -.02em; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px;
  background: var(--ink); color: white; font-size: 15px; box-shadow: 0 8px 20px rgba(24, 24, 23, .18);
}
.nav-link { color: var(--muted); text-decoration: none; font-size: 14px; }
.nav-link:hover { color: var(--ink); }

.hero { padding: 42px 0 31px; }
.hero-eyebrows { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.eyebrow { margin: 0; color: var(--red); font-weight: 700; font-size: 12px; letter-spacing: .16em; }
h1 { margin: 0; max-width: 620px; font-size: clamp(35px, 8vw, 58px); line-height: 1.03; letter-spacing: -.055em; }
.hero h1 { font-size: clamp(30px, 7vw, 52px); }
.hero-note { margin: 19px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.summary {
  display: flex; align-items: center; gap: 18px; margin-top: 30px; padding: 17px 19px;
  border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.55);
}
.summary strong { font-size: 26px; letter-spacing: -.04em; }
.summary span { color: var(--muted); font-size: 12px; }
.summary-divider { width: 1px; height: 32px; background: var(--line); }

.day-section { margin-top: 31px; }
.day-heading { display: flex; align-items: baseline; justify-content: space-between; margin: 0 2px 12px; }
.day-heading h2 { margin: 0; font-size: 17px; letter-spacing: -.02em; }
.day-heading span { color: var(--muted); font-size: 12px; }
.task-list { display: grid; gap: 11px; }
.task-card {
  position: relative; overflow: hidden; padding: 19px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); box-shadow: var(--shadow); transition: opacity .2s, transform .2s;
}
.task-card:active { transform: scale(.995); }
.task-card.visited { opacity: .52; box-shadow: none; }
.task-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.platform { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
.platform-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--red); }
.platform.douyin .platform-dot { background: #181817; box-shadow: 3px 0 #29e6de, -3px 0 #fd2d55; }
.publisher { color: var(--muted); font-size: 12px; }
.task-title { margin: 12px 0 17px; font-size: 18px; line-height: 1.42; letter-spacing: -.02em; }
.progress-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.progress-row b { color: var(--ink); font-size: 14px; }
.progress-track { height: 6px; overflow: hidden; border-radius: 10px; background: #eeeae1; }
.progress-fill { height: 100%; min-width: 0; border-radius: inherit; background: var(--red); }
.requirements-title { margin: 0 0 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.requirements-list { display: grid; gap: 13px; }
.requirement-item { padding: 11px 12px; border-radius: 13px; background: #faf8f3; }
.requirement-item .progress-row { margin-bottom: 7px; }
.requirement-name { color: var(--ink); font-weight: 720; }
.requirement-updated { margin-top: 6px; color: var(--muted); font-size: 10px; text-align: right; }
.task-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; }
.updated { color: var(--muted); font-size: 11px; }
.open-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px;
  border-radius: 12px; color: white; background: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700;
}
.visited .open-link { background: #66645f; }
.open-link svg { width: 14px; height: 14px; }
.click-count { color: var(--muted); font-size: 11px; }
.empty, .loading { padding: 55px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; margin-bottom: 8px; color: var(--ink); font-size: 18px; }

.admin-hero { padding: 28px 0 22px; }
.admin-hero h1 { font-size: clamp(32px, 7vw, 48px); }
.panel { padding: 22px; border: 1px solid var(--line); border-radius: 21px; background: var(--card); box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0; font-size: 18px; }
.panel-heading small { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field.wide { grid-column: 1 / -1; }
.field label { color: var(--muted); font-size: 12px; font-weight: 650; }
.field input, .field select {
  width: 100%; min-height: 45px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px;
  outline: none; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus { border-color: #aaa69c; box-shadow: 0 0 0 3px rgba(24,24,23,.05); }
.button-row { display: flex; justify-content: flex-end; gap: 9px; margin-top: 17px; }
.button {
  min-height: 42px; padding: 0 17px; border: 0; border-radius: 12px; cursor: pointer;
  color: white; background: var(--ink); font-weight: 700; font-size: 13px;
}
.button:hover { filter: brightness(1.08); }
.button:disabled { cursor: wait; opacity: .55; }
.button.secondary { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.button.danger { color: var(--red); background: var(--red-soft); }
.login-card { width: min(100%, 430px); margin: 50px auto; }
.login-card h1 { margin-bottom: 9px; font-size: 34px; }
.login-card > p { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.login-card .field + .field { margin-top: 13px; }
.login-card .button { width: 100%; margin-top: 18px; }
.admin-task { padding: 17px 0; border-top: 1px solid var(--line); }
.admin-task:first-child { padding-top: 0; border-top: 0; }
.admin-task:last-child { padding-bottom: 0; }
.admin-task-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-task h3 { margin: 0 0 5px; font-size: 15px; }
.admin-task p { margin: 0; color: var(--muted); font-size: 11px; }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 9px; margin-top: 13px; }
.inline-fields .field input { min-height: 39px; }
.inline-fields .button { min-height: 39px; }
.requirement-builder { margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 14px; }
.requirement-builder legend { padding: 0 5px; color: var(--muted); font-size: 12px; font-weight: 650; }
.requirement-builder-head, .requirement-input-row {
  display: grid; grid-template-columns: minmax(82px, 1fr) 1fr 1fr; align-items: center; gap: 9px;
}
.requirement-builder-head { padding: 0 4px 7px; color: var(--muted); font-size: 11px; }
.requirement-input-row + .requirement-input-row { margin-top: 8px; }
.requirement-input-row label { color: var(--ink); font-size: 13px; font-weight: 650; }
.requirement-input-row input[type="checkbox"] { width: 16px; height: 16px; margin: 0 5px 0 0; vertical-align: -3px; accent-color: var(--ink); }
.requirement-input-row input[type="number"] {
  width: 100%; min-width: 0; min-height: 39px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; outline: none;
}
.requirement-input-row input:disabled { color: #aaa69c; background: #f3f1eb; }
.admin-requirements { display: grid; gap: 9px; margin-top: 13px; }
.admin-requirement-row { display: grid; grid-template-columns: 64px 1fr 1fr; align-items: end; gap: 9px; }
.admin-requirement-name { align-self: center; font-size: 13px; font-weight: 700; }
.text-button { padding: 3px; border: 0; color: var(--muted); background: none; cursor: pointer; font-size: 12px; }
.text-button:hover { color: var(--red); }
.toast {
  position: fixed; z-index: 10; left: 50%; bottom: 25px; transform: translate(-50%, 20px); opacity: 0;
  padding: 11px 16px; border-radius: 12px; color: white; background: rgba(24,24,23,.92); font-size: 13px;
  pointer-events: none; transition: .2s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.hidden { display: none !important; }

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 760px); }
  .topbar { min-height: 66px; }
  .hero { padding-top: 27px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.wide { grid-column: auto; }
  .inline-fields { grid-template-columns: 1fr 1fr; }
  .inline-fields .button { grid-column: 1 / -1; }
}
