:root {
  --paper: #f8f3e9;
  --paper-2: #fffdf7;
  --ink: #241f19;
  --ink-soft: #4e4639;
  --muted: #8a7d6a;
  --line: #e5dac6;
  --line-2: #d8c9b0;
  --seal: #b23a2b;
  --seal-deep: #8e2a1e;
  --seal-soft: #f7e5df;
  --jade: #2f5749;
  --jade-2: #47705f;
  --jade-soft: #e7efe9;
  --gold: #c29344;
  --gold-soft: #f5ead3;
  --peach: #e8a7a1;
  --peach-deep: #c96f68;
  --blue: #4d6a80;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Droid Sans Fallback", sans-serif;
  --shadow: 0 24px 60px rgba(88, 62, 44, .12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(ellipse 60% 55% at 78% 2%, rgba(238, 174, 168, .30), transparent 60%),
    radial-gradient(ellipse 45% 50% at 96% 72%, rgba(194, 147, 68, .14), transparent 62%),
    radial-gradient(ellipse 50% 55% at 0% 96%, rgba(47, 87, 73, .12), transparent 60%),
    var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: #f4d6a4; color: var(--seal-deep); }
a { color: inherit; text-decoration: none; }
button { font: inherit; border: 0; background: none; color: inherit; cursor: pointer; }

.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.grain {
  position: fixed; inset: 0; z-index: 5; pointer-events: none; opacity: .45;
  background-image: radial-gradient(rgba(92, 70, 44, .30) .5px, transparent .5px);
  background-size: 4px 4px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.35));
}
.branch {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: .9;
}

.floating {
  position: fixed; width: 42px; height: 42px; z-index: 1;
  fill: #eaa9a3; opacity: .38; pointer-events: none;
  filter: drop-shadow(0 8px 10px rgba(180, 110, 100, .12));
}
.p-f1 { left: 5.5%; top: 64%; transform: rotate(-22deg); width: 34px; height: 34px; }
.p-f2 { left: 90%; top: 14%; transform: rotate(18deg); opacity: .3; }
.p-f3 { left: 86%; top: 82%; transform: rotate(-48deg); width: 26px; height: 26px; opacity: .34; }

/* ── 顶栏 ─────────────────────────────────────────────── */
.topbar {
  position: relative; z-index: 20;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 20px 40px 10px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 251, 243, .66);
  box-shadow: inset 0 0 0 1px rgba(201, 159, 148, .35), 0 6px 16px rgba(150, 100, 90, .10);
}
.brand-mark svg { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; gap: 4px; }
.brand-text strong { font-family: var(--serif); font-size: 24px; letter-spacing: .14em; font-weight: 600; }
.brand-text small { font-size: 9.5px; letter-spacing: .26em; color: var(--muted); padding-left: 2px; }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.today-mini { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.streak-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 11px; border-radius: 99px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, .7);
  font-size: 11px; color: var(--ink-soft);
}
.streak-pill .icon { width: 13px; height: 13px; color: var(--seal); }
.streak-pill b { font-family: var(--serif); font-size: 14px; color: var(--seal); }
.user-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px 0 4px; border-radius: 99px;
  background: rgba(255, 253, 247, .72);
  border: 1px solid var(--line);
  font-size: 12px;
}
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--seal);
  color: #fdf2e4; font-family: var(--serif); font-size: 13px;
  box-shadow: inset 0 0 0 1px rgba(255, 245, 233, .25);
}
.chev { width: 12px; height: 12px; color: var(--muted); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── 主体 ─────────────────────────────────────────────── */
.portal {
  position: relative; z-index: 2;
  flex: 1;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 10px 40px 22px;
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.intro { max-width: 440px; padding-bottom: 6px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 10px; font-weight: 700; letter-spacing: .24em;
  color: var(--seal); margin: 0 0 18px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--seal); opacity: .65; }
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(38px, 3.55vw, 51px);
  line-height: 1.34;
  letter-spacing: .015em;
  margin: 0 0 18px;
}
h1 .accent { position: relative; color: var(--seal); }
h1 .accent { color: var(--seal); }
.lede {
  margin: 0 0 26px;
  max-width: 424px;
  font-size: 13.6px; line-height: 1.95; color: #665c4c;
  letter-spacing: .01em;
}

.today-card {
  background: rgba(255, 253, 247, .76);
  border: 1px solid rgba(216, 201, 176, .75);
  border-radius: 18px;
  padding: 16px 20px 12px;
  box-shadow: 0 18px 42px rgba(96, 70, 46, .08);
  backdrop-filter: blur(8px);
}
.tc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; }
.tc-head span { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }
.tc-head b {
  font-size: 10px; font-weight: 600; color: var(--seal-deep);
  background: var(--seal-soft); padding: 3px 9px; border-radius: 99px;
}
.task-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 4px;
  border-top: 1px dashed rgba(216, 201, 176, .75);
  border-radius: 10px;
  transition: background .18s, transform .18s;
}
.task-row:hover { background: rgba(248, 239, 222, .6); transform: translateX(2px); }
.task-icon {
  width: 34px; height: 34px; flex: none; border-radius: 10px;
  display: grid; place-items: center;
}
.task-icon .icon { width: 17px; height: 17px; }
.task-icon.jade { background: var(--jade-soft); color: var(--jade); }
.task-icon.peach { background: var(--seal-soft); color: var(--seal); }
.task-main { flex: 1; min-width: 0; }
.task-main b { display: block; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.task-main i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); letter-spacing: .02em; }
.task-go { flex: none; font-size: 10.5px; color: var(--jade-2); display: inline-flex; align-items: center; gap: 3px; }
.task-go .icon { width: 12px; height: 12px; }
.tc-foot {
  display: flex; align-items: center; gap: 6px;
  padding-top: 10px; border-top: 1px dashed rgba(216, 201, 176, .75);
  font-size: 10px; color: var(--muted);
}
.tc-foot .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }

.stats { display: flex; align-items: stretch; margin-top: 24px; padding: 0 2px; }
.stats div { flex: 1; padding-left: 16px; border-left: 1px solid var(--line); }
.stats div:first-child { padding-left: 0; border-left: 0; }
.stats b { display: block; font-family: var(--serif); font-size: 27px; line-height: 1.1; color: var(--ink); }
.stats span { display: block; margin-top: 5px; font-size: 9.5px; color: var(--muted); letter-spacing: .08em; }

/* ── 桃花 ─────────────────────────────────────────────── */
.flower-wrap {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 0;
}
.flower-glow {
  position: absolute; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 196, 190, .38) 0%, rgba(244, 201, 170, .16) 45%, transparent 70%);
  filter: blur(8px);
  top: 50%; left: 50%; transform: translate(-50%, -53%);
  pointer-events: none;
}
.flower { position: relative; width: min(700px, 100%); aspect-ratio: 1; }
.petals { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.petal-labels { display: contents; }
.petal-group .petal-shape { transition: stroke .2s, filter .2s; }
.petal-group.soon { opacity: .72; }
.petal-group.lit .petal-shape { stroke: var(--seal); stroke-width: 2; }
.stamens circle { animation: stamenPulse 6s ease-in-out infinite; }
@keyframes stamenPulse { 0%, 100% { opacity: .55; } 50% { opacity: .85; } }

.center {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 25%; aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 38% 30%, rgba(255, 240, 214, .16), transparent 55%),
    radial-gradient(circle at 50% 55%, #355a4b 0%, #244236 55%, #1b3128 100%);
  border: 1px solid rgba(214, 178, 110, .55);
  box-shadow: 0 18px 40px rgba(30, 52, 43, .28), inset 0 0 0 5px rgba(247, 240, 224, .05);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #f7f1e4;
  transition: transform .2s, box-shadow .2s;
}
.center:hover { transform: translate(-50%, -50%) scale(1.02); box-shadow: 0 24px 50px rgba(30, 52, 43, .34); }
.c-kicker { font-size: 8px; letter-spacing: .32em; color: #d9bd84; margin-bottom: 7px; }
.center b { font-family: var(--serif); font-size: clamp(20px, 2.8vw, 31px); letter-spacing: .06em; line-height: 1; font-weight: 600; }
.c-week { font-size: 8.5px; letter-spacing: .08em; color: #c3d3c9; margin-top: 8px; }
.c-go {
  margin-top: 10px; font-size: 8.5px; letter-spacing: .08em; color: #f0d8ab;
  display: inline-flex; align-items: center; gap: 3px;
  border-bottom: 1px solid rgba(240, 216, 171, .45); padding-bottom: 2px;
}
.c-go .icon { width: 10px; height: 10px; }

.petal-label {
  position: absolute; width: 22%; text-align: center;
  transform: translateY(0);
  transition: transform .2s;
  color: var(--ink);
}
.petal-label:hover { transform: translateY(-3px); }
.petal-label:hover h3 { color: var(--seal); }
.pl-0 { left: 50%; top: 14.5%; transform: translateX(-50%); }
.pl-0:hover { transform: translateX(-50%) translateY(-3px); }
.pl-1 { left: 63.5%; top: 35.5%; }
.pl-2 { left: 54.5%; top: 65.5%; }
.pl-3 { left: 23.5%; top: 65.5%; }
.pl-4 { left: 14.5%; top: 35.5%; }

.p-icon { display: inline-flex; color: var(--jade); opacity: .9; }
.p-icon .icon { width: 19px; height: 19px; }
.p-icon.seal { color: var(--seal); }
.p-icon.blue { color: var(--blue); }
.p-icon.gold { color: #b07f2e; }
.p-icon.ink { color: #4a4032; }
h3.petal-title, .petal-label h3 {
  font-family: var(--serif); font-size: 20px; font-weight: 600;
  letter-spacing: .08em; margin: 5px 0 3px; line-height: 1.25;
  transition: color .18s;
}
.petal-label p { margin: 0; font-size: 10px; letter-spacing: .12em; color: #806c5b; }
.p-status {
  display: inline-block; margin-top: 7px; padding: 2px 8px; border-radius: 99px;
  font-size: 9px; letter-spacing: .06em;
}
.p-status.live { background: var(--jade-soft); color: var(--jade); }
.p-status.live.sealish { background: var(--seal-soft); color: var(--seal-deep); }
.p-status.soon { color: #9a8c76; border: 1px dashed #cdbea6; background: rgba(255, 253, 247, .5); }
.p-status.manage { background: rgba(255, 253, 247, .7); color: #6d6252; border: 1px solid var(--line); }

.flower-foot {
  display: flex; align-items: center; gap: 16px; margin-top: 2px;
  font-size: 10px; color: var(--muted); letter-spacing: .08em;
}
.add-petal {
  font-size: 10px; color: var(--jade-2);
  border: 1px dashed rgba(71, 112, 95, .45);
  padding: 5px 12px; border-radius: 99px;
  transition: background .18s;
}
.add-petal:hover { background: rgba(231, 239, 233, .7); }

/* ── 页脚 / 提示 ───────────────────────────────────────── */
.site-foot {
  position: relative; z-index: 2;
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 14px 40px 20px;
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 9px;
  font-size: 10px; color: #9a8c78; letter-spacing: .08em;
  border-top: 1px solid rgba(216, 201, 176, .55);
}
.site-foot .sep { opacity: .5; }
.foot-link { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(154, 140, 120, .35); padding-bottom: 1px; }
.foot-link:hover { color: var(--seal); border-color: rgba(178, 58, 43, .4); }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 14px);
  z-index: 50; padding: 10px 18px; border-radius: 99px;
  background: rgba(32, 28, 21, .92); color: #f7f1e4;
  font-size: 11.5px; opacity: 0; pointer-events: none; transition: .22s;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── 响应式 ─────────────────────────────────────────────── */
@media (max-width: 1180px) {
  .portal { grid-template-columns: 380px minmax(0, 1fr); gap: 32px; }
  .flower-glow { width: 540px; height: 540px; }
  h1 { font-size: clamp(34px, 4.1vw, 44px); }
  .lede { font-size: 12.6px; }
}
@media (max-width: 980px) {
  .portal { grid-template-columns: 1fr; gap: 8px; padding-top: 4px; }
  .intro { max-width: 640px; margin: 0 auto; width: 100%; }
  .flower-wrap { margin-top: 6px; }
  .flower { width: min(640px, 92vw); }
  .flower-glow { width: 520px; height: 520px; }
  .site-foot { margin-top: 8px; }
}
@media (max-width: 620px) {
  .topbar { padding: 10px 18px 4px; gap: 10px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-mark svg { width: 32px; height: 32px; }
  .brand-text strong { font-size: 20px; }
  .today-mini { display: none; }
  .user-pill span:not(.avatar) { display: none; }
  .user-pill { padding: 0 8px 0 3px; }
  .portal { padding: 6px 18px 16px; }
  .eyebrow { margin-bottom: 12px; }
  h1 { font-size: 32px; margin-bottom: 10px; }
  .lede { font-size: 12px; line-height: 1.85; margin-bottom: 14px; }
  .today-card { padding: 11px 12px 8px; border-radius: 15px; }
  .tc-head { padding-bottom: 7px; }
  .task-row { padding: 9px 3px; }
  .tc-foot { padding-top: 8px; }
  .task-main b { font-size: 12px; }
  .task-main i { font-size: 9.5px; }
  .task-go { font-size: 9.5px; }
  .task-icon { width: 30px; height: 30px; }
  .stats { margin-top: 16px; }
  .stats b { font-size: 20px; }
  .stats span { font-size: 8.5px; }
  .flower { width: 88vw; }
  .flower-foot { flex-wrap: wrap; justify-content: center; gap: 8px; }
  .petal-label h3 { font-size: 11.5px; letter-spacing: .04em; margin: 2px 0 1px; }
  .p-icon .icon { width: 13px; height: 13px; }
  .petal-label p { display: none; }
  .p-status { font-size: 7.5px; padding: 1px 5px; margin-top: 4px; }
  .c-kicker { font-size: 6px; }
  .center b { font-size: 18px; }
  .c-week { font-size: 6.5px; }
  .c-go { font-size: 6.5px; }
  .site-foot { padding: 12px 18px 18px; font-size: 9px; }
  .floating { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── 登录页 ───────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 24px;
  position: relative;
  z-index: 2;
}
.login-card {
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  border-radius: 28px;
  overflow: hidden;
  background: var(--paper-2);
  border: 1px solid rgba(216, 201, 176, .8);
  box-shadow: 0 40px 90px rgba(80, 55, 38, .16);
}
.login-art {
  position: relative;
  padding: 46px 42px;
  color: #f6f1e4;
  background:
    radial-gradient(circle at 78% 12%, rgba(240, 190, 175, .38), transparent 46%),
    linear-gradient(150deg, #1e3a30 0%, #2a5041 58%, #355f4d 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.login-art::after {
  content: "";
  position: absolute;
  width: 320px; height: 320px; right: -130px; bottom: -140px;
  border-radius: 50%;
  border: 1px solid rgba(246, 241, 228, .18);
  box-shadow: 0 0 0 42px rgba(246, 241, 228, .04), 0 0 0 104px rgba(246, 241, 228, .03);
}
.login-art .brand-mark { background: rgba(255, 251, 243, .12); box-shadow: inset 0 0 0 1px rgba(246, 241, 228, .18); }
.login-art .brand-text strong { color: #f7f1e4; }
.login-art .brand-text small { color: #b9cfc2; }
.login-art h2 {
  font-family: var(--serif);
  font-size: 34px;
  letter-spacing: .08em;
  margin: 42px 0 12px;
  line-height: 1.5;
  color: #f8f2e5;
}
.login-art p { font-size: 12px; line-height: 1.9; color: #c8dbd0; margin: 0; max-width: 260px; }
.login-quote {
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.9;
  color: #e7d3ab;
  border-left: 2px solid rgba(231, 211, 171, .45);
  padding-left: 14px;
  margin-top: 34px;
  position: relative;
  z-index: 1;
}
.login-form-panel { padding: 50px 52px 42px; }
.login-form-panel .eyebrow { margin-bottom: 12px; }
.login-form-panel h1 { font-size: 34px; margin: 0 0 8px; }
.login-form-panel .sub { font-size: 12px; color: var(--muted); margin: 0 0 28px; }
.login-field { margin-bottom: 16px; }
.login-field label { display: block; font-size: 11px; letter-spacing: .1em; color: var(--muted); margin-bottom: 7px; }
.login-input-wrap { position: relative; }
.login-input {
  width: 100%; height: 46px; padding: 0 44px 0 14px;
  border-radius: 12px; border: 1px solid var(--line);
  background: #fffdf8; font-size: 14px; color: var(--ink);
  transition: border-color .18s, box-shadow .18s;
}
.login-input:focus { outline: none; border-color: var(--seal); box-shadow: 0 0 0 3px rgba(178, 58, 43, .08); }
.login-toggle {
  position: absolute; right: 6px; top: 6px; height: 34px; padding: 0 10px;
  font-size: 11px; color: var(--jade-2); border-radius: 8px;
}
.login-toggle:hover { background: var(--jade-soft); }
.login-submit {
  width: 100%; height: 48px; margin-top: 8px;
  border-radius: 99px; background: var(--seal); color: #fdf5e9;
  font-size: 14px; font-weight: 600; letter-spacing: .08em;
  box-shadow: 0 12px 26px rgba(178, 58, 43, .22);
  transition: background .18s, transform .16s;
}
.login-submit:hover { background: var(--seal-deep); }
.login-submit:active { transform: scale(.99); }
.login-submit:disabled { opacity: .6; pointer-events: none; }
.login-error { min-height: 18px; margin: 12px 0 0; font-size: 11.5px; color: var(--seal-deep); line-height: 1.6; }
.login-foot { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 10.5px; color: var(--muted); line-height: 1.8; }
.login-foot b { color: var(--ink-soft); font-weight: 600; }
.login-back {
  position: fixed; left: 24px; top: 20px; z-index: 5;
  font-size: 11px; color: var(--muted);
  display: inline-flex; align-items: center; gap: 6px;
}
.login-back:hover { color: var(--seal); }
.login-art .mini-blossom { width: 92px; height: 92px; margin-top: 30px; opacity: .9; }
@media (max-width: 760px) {
  .login-page { padding: 0; align-items: stretch; }
  .login-card { grid-template-columns: 1fr; border-radius: 0; min-height: 100vh; border: 0; box-shadow: none; }
  .login-art { padding: 26px 24px 22px; }
  .login-art h2 { font-size: 24px; margin: 18px 0 6px; }
  .login-art p, .login-quote { display: none; }
  .login-art .mini-blossom { position: absolute; right: 18px; top: 22px; width: 64px; height: 64px; margin: 0; opacity: .7; }
  .login-form-panel { padding: 30px 24px 40px; }
  .login-form-panel h1 { font-size: 28px; }
  .login-back { position: static; display: none; }
}
