/* ── 1001split · 浅色科技风 ─────────────────── */

:root {
  --bg: #eef3fa;
  --surface: rgba(255, 255, 255, 0.68);
  --ink: #0e1726;
  --ink-2: #526074;
  --ink-3: #8a97a9;
  --line: rgba(14, 23, 38, 0.08);
  --accent: #2a78d6;
  --accent-2: #1baf7a;
  --glow: rgba(42, 120, 214, 0.35);
  --c1: #2a78d6;
  --c2: #1baf7a;
  --c3: #eda100;
  --c4: #008300;
  --c5: #4a3aa7;
  --sans: "Noto Sans SC", "PingFang SC", sans-serif;
  --tech: "Chakra Petch", "Noto Sans SC", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  padding: 0 1.25rem 4rem;
  overflow-x: hidden;
}

/* ── 背景特效 ── */
.bg-aurora {
  position: fixed;
  inset: -20%;
  z-index: -2;
  background:
    radial-gradient(38% 32% at 18% 12%, rgba(42, 120, 214, 0.20), transparent 70%),
    radial-gradient(30% 28% at 85% 20%, rgba(27, 175, 122, 0.16), transparent 70%),
    radial-gradient(36% 34% at 70% 90%, rgba(74, 58, 167, 0.12), transparent 70%);
  filter: blur(40px);
  animation: drift 18s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.06); }
}
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(42, 120, 214, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 120, 214, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 100%);
}

/* ── 顶栏 ── */
.topbar {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 0 1.1rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; }
.pulse-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(27, 175, 122, 0.5);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(27, 175, 122, 0.45); }
  70%  { box-shadow: 0 0 0 12px rgba(27, 175, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(27, 175, 122, 0); }
}
.wordmark {
  font-family: var(--tech);
  font-size: 1.15rem;
  letter-spacing: 0.14em;
  font-weight: 400;
  color: var(--ink-2);
}
.wordmark b { font-weight: 700; color: var(--ink); }

.add-btn {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  overflow: hidden;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--tech);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #fff;
  padding: 0.58rem 1.25rem;
  border-radius: 999px;
  background: linear-gradient(160deg, #2a78d6, #1d5fae);
  box-shadow:
    0 4px 18px rgba(42, 120, 214, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
/* 边缘光束：一道细光沿按钮边框环绕 */
@property --beam {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}
.add-btn::before, .add-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(
    from var(--beam),
    transparent 0deg 285deg,
    rgba(126, 216, 255, 0.9) 320deg,
    #ffffff 340deg,
    rgba(94, 240, 190, 0.9) 352deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: beam-spin 3.6s linear infinite;
  pointer-events: none;
}
/* 同一道光的柔光晕 */
.add-btn::after {
  inset: -2px;
  padding: 3.5px;
  filter: blur(4px);
  opacity: 0.75;
}
@keyframes beam-spin { to { --beam: 360deg; } }
.add-btn .plus {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.26);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.45);
  font-weight: 700;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.add-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 8px 26px rgba(42, 120, 214, 0.45),
    0 0 34px rgba(27, 175, 122, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}
.add-btn:hover .plus { transform: rotate(90deg) scale(1.1); }
.add-btn:active { transform: scale(0.96); }
.add-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.add-btn .plus { font-weight: 700; }

main { max-width: 860px; margin: 0 auto; }

/* ── 月份 ── */
.months {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.4rem 0 1.2rem;
}
.months button {
  font-family: var(--tech);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.34rem 0.95rem;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.18s ease;
}
.months button:hover { border-color: var(--accent); color: var(--accent); }
.months button.active {
  background: linear-gradient(135deg, var(--accent), #1d5fae);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 12px var(--glow);
}

/* ── 卡片 ── */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 720px) { .grid { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  box-shadow:
    0 1px 2px rgba(14, 23, 38, 0.04),
    0 12px 32px rgba(42, 120, 214, 0.10);
  overflow: hidden;
}
/* HUD 角标 */
.card::before, .card::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid rgba(42, 120, 214, 0.45);
  pointer-events: none;
}
.card::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; border-radius: 4px 0 0 0; }
.card::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; border-radius: 0 0 4px 0; }

.card-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--ink-2);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.card-title::before {
  content: "";
  width: 4px; height: 14px;
  background: linear-gradient(var(--accent), var(--accent-2));
  border-radius: 2px;
}

/* 入场动画 */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  animation-delay: calc(var(--d, 0) * 0.12s);
}
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── 结算卡 ── */
.settle { display: flex; flex-direction: column; justify-content: center; }
/* 扫光 */
.settle .sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: sweep 3.6s ease-in-out 0.8s infinite;
  pointer-events: none;
}
@keyframes sweep {
  0% { transform: translateX(-100%); }
  38%, 100% { transform: translateX(100%); }
}
.settle .who {
  font-size: 0.95rem;
  color: var(--ink-2);
  letter-spacing: 0.05em;
}
.settle .who b { color: var(--ink); font-weight: 700; }
.settle .amount {
  font-family: var(--tech);
  font-weight: 700;
  font-size: clamp(2.3rem, 6vw, 3.1rem);
  line-height: 1.15;
  margin: 0.2rem 0 0.9rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 12px rgba(42, 120, 214, 0.25));
}
.settle .amount.even {
  background: linear-gradient(90deg, var(--accent-2), #0e8a5f);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 14px rgba(27, 175, 122, 0.35));
  animation: cheer-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes cheer-pop {
  0% { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
/* 已结清徽章 */
.settled {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0.4rem 0 0.5rem;
}
.check {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  filter: drop-shadow(0 2px 10px rgba(27, 175, 122, 0.35));
}
.check circle {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  transform: rotate(-90deg);
  transform-origin: center;
  animation: draw-ring 0.6s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.check path {
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw-check 0.32s cubic-bezier(0.65, 0, 0.35, 1) 0.55s forwards;
}
@keyframes draw-ring { to { stroke-dashoffset: 0; } }
@keyframes draw-check { to { stroke-dashoffset: 0; } }
.settled-word {
  font-family: var(--tech);
  font-weight: 700;
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1.1;
  background: linear-gradient(90deg, var(--accent-2), #0e8a5f);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: cheer-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.25s both;
}
.settled-sub {
  font-family: var(--tech);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--ink-3);
  margin-bottom: 1rem;
  animation: sub-fade 0.6s ease 0.8s both;
}
@keyframes sub-fade { from { opacity: 0; transform: translateY(4px); } }

/* 两清彩纸 */
.confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.confetti span {
  position: absolute;
  top: -12px;
  left: var(--x);
  width: 7px;
  height: 11px;
  border-radius: 2px;
  background: var(--c);
  opacity: 0;
  animation: confetti-fall 2.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) var(--d) forwards;
}
@keyframes confetti-fall {
  0% { opacity: 1; transform: translateY(0) rotate(0) scale(var(--s)); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateY(240px) rotate(var(--r)) scale(var(--s)); }
}
.settle .breakdown {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(14, 23, 38, 0.12);
}
.settle .breakdown div { font-size: 0.75rem; color: var(--ink-3); }
.settle .breakdown strong {
  display: block;
  font-family: var(--tech);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 0.1rem;
}
.loading {
  font-family: var(--tech);
  color: var(--ink-3);
  letter-spacing: 0.3em;
  text-align: center;
}

/* ── 饼图 ── */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}
.donut-box { position: relative; width: 170px; flex: 0 0 auto; margin: 0 auto; }
#donut { width: 100%; display: block; }
#donut .seg {
  fill: none;
  stroke-linecap: butt;
  cursor: pointer;
  transition: opacity 0.15s ease, stroke-width 0.15s ease;
}
#donut .seg:hover { stroke-width: 30; }
#donut.dim .seg:not(:hover) { opacity: 0.35; }

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dc-label { font-size: 0.68rem; color: var(--ink-3); letter-spacing: 0.15em; }
.dc-value {
  font-family: var(--tech);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
}

.legend { list-style: none; flex: 1 1 150px; min-width: 150px; }
.legend li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  font-size: 0.82rem;
  cursor: default;
  transition: background 0.15s ease;
}
.legend li:hover { background: rgba(42, 120, 214, 0.07); }
.legend .chip {
  width: 10px; height: 10px;
  border-radius: 3px;
  flex: 0 0 auto;
  box-shadow: 0 0 6px currentColor;
}
.legend .name { color: var(--ink-2); }
.legend .val {
  margin-left: auto;
  font-family: var(--tech);
  font-weight: 600;
  color: var(--ink);
}
.legend .pct {
  font-family: var(--tech);
  font-size: 0.72rem;
  color: var(--ink-3);
  width: 3.2em;
  text-align: right;
}

.tooltip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  background: rgba(14, 23, 38, 0.92);
  color: #fff;
  font-family: var(--tech);
  font-size: 0.78rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 6px 20px rgba(14, 23, 38, 0.3);
}

/* ── 流水明细 ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
thead th {
  text-align: left;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  font-weight: 500;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td {
  padding: 0.62rem 0.6rem;
  border-bottom: 1px solid var(--line);
  vertical-align: baseline;   /* 全行文字共享基线，小字号列不再上下漂 */
  line-height: 1.45;
}
tbody tr { transition: background 0.15s ease; }
tbody tr:hover { background: rgba(42, 120, 214, 0.06); }
tbody tr:last-child td { border-bottom: 0; }

td.num, th.num {
  text-align: right;
  font-family: var(--tech);
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
td.date {
  font-family: var(--tech);
  font-size: 0.78rem;
  color: var(--ink-3);
  white-space: nowrap;
}
td.item { font-weight: 500; white-space: nowrap; }
tbody td { white-space: nowrap; }
td.note { white-space: normal; }
td.note { color: var(--ink-3); font-size: 0.8rem; }

tr.personal td { opacity: 0.45; }
.tag {
  position: relative;
  top: -2px;
  font-family: var(--tech);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.tag.yes {
  color: var(--accent);
  border: 1px solid rgba(42, 120, 214, 0.45);
  background: rgba(42, 120, 214, 0.08);
  box-shadow: 0 0 8px rgba(42, 120, 214, 0.18);
}
.tag.no {
  color: var(--ink-3);
  border: 1px solid rgba(14, 23, 38, 0.15);
}
.tag.repay {
  color: var(--accent-2);
  border: 1px solid rgba(27, 175, 122, 0.45);
  background: rgba(27, 175, 122, 0.08);
}

.empty {
  text-align: center;
  color: var(--ink-3);
  padding: 2rem 0;
  letter-spacing: 0.2em;
}

/* 入账中的挂起行 */
tr.pending-row td { opacity: 0.6; }
.tag.pend {
  color: #b7791f;
  border: 1px solid rgba(183, 121, 31, 0.5);
  background: rgba(237, 161, 0, 0.08);
  animation: pend-pulse 1.4s ease-in-out infinite;
}
@keyframes pend-pulse { 50% { opacity: 0.4; } }

/* ── 记一笔弹窗 ── */
#entry-modal {
  margin: auto;   /* 全局 reset 清掉了 dialog 的默认居中，这里补回 */
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 1.7rem 1.7rem 1.5rem;
  width: min(430px, calc(100vw - 2rem));
  max-height: min(86vh, 720px);
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 249, 255, 0.88));
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 80px rgba(14, 23, 38, 0.22);
  color: var(--ink);
}
#entry-modal::backdrop {
  background: rgba(14, 23, 38, 0.32);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: backdrop-in 0.35s ease;
}
@keyframes backdrop-in { from { opacity: 0; } }
#entry-modal[open] { animation: modal-in 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* 手机：全屏弹层，从底部滑入 */
@media (max-width: 640px) {
  #entry-modal {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    padding: 1.5rem 1.3rem calc(1.5rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
  }
  #entry-modal:not([open]) { display: none; }
  #entry-modal[open] { animation: modal-in-sheet 0.38s cubic-bezier(0.22, 1, 0.36, 1); }
  @keyframes modal-in-sheet {
    from { opacity: 0.4; transform: translateY(45%); }
    to   { opacity: 1; transform: none; }
  }
  #entry-form { flex: 1; display: flex; flex-direction: column; }
  #entry-form .submit-btn { margin-top: auto; padding: 0.95rem; }
  .field input { font-size: 1rem; }   /* ≥16px，避免 iOS 聚焦自动放大 */
  .seg button, .chips button { padding: 0.55rem 1rem; }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.modal-head h2 {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.modal-head h2::before {
  content: "";
  width: 4px; height: 15px;
  background: linear-gradient(var(--accent), var(--accent-2));
  border-radius: 2px;
}
.close-btn {
  border: 0;
  background: rgba(14, 23, 38, 0.06);
  color: var(--ink-2);
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}
.close-btn:hover { background: rgba(14, 23, 38, 0.12); transform: rotate(90deg); }

.field { display: block; margin-bottom: 1.05rem; }
.field > span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  margin-bottom: 0.45rem;
}
.field-row { display: flex; gap: 0.85rem; }
.field-row .field { flex: 1; }

.field input {
  width: 100%;
  font-family: var(--tech);
  font-size: 0.95rem;
  color: var(--ink);
  padding: 0.68rem 0.85rem;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: rgba(14, 23, 38, 0.045);
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.field input::placeholder { color: var(--ink-3); opacity: 0.7; }
.field input:hover { background: rgba(14, 23, 38, 0.07); }
.field input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(42, 120, 214, 0.14);
}
.field input.invalid { border-color: #d03b3b; box-shadow: 0 0 0 3px rgba(208, 59, 59, 0.15); }
.seg.invalid button, .chips.invalid button {
  box-shadow: inset 0 0 0 1.5px rgba(208, 59, 59, 0.5);
  animation: shake 0.3s ease;
}
@keyframes shake {
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.field input[type="file"] {
  padding: 0.5rem 0.7rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  color: var(--ink-2);
  cursor: pointer;
}
.field input[type="file"]::file-selector-button {
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--accent);
  background: rgba(42, 120, 214, 0.1);
  border: 0;
  border-radius: 8px;
  padding: 0.3rem 0.8rem;
  margin-right: 0.7rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.field input[type="file"]::file-selector-button:hover { background: rgba(42, 120, 214, 0.18); }

td.item .clip {
  display: inline-flex;
  vertical-align: -2px;
  margin-left: 0.25rem;
  color: var(--accent);
  transition: color 0.15s ease, filter 0.15s ease, transform 0.15s ease;
}
td.item .clip svg { width: 13px; height: 13px; }
td.item .clip:hover {
  color: var(--accent-2);
  transform: rotate(-8deg) scale(1.15);
  filter: drop-shadow(0 0 4px var(--glow));
}

/* ── 日期选择器 ── */
.date-field { position: relative; }
.date-field input { cursor: pointer; }
.datepicker {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: 272px;
  padding: 0.85rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 48px rgba(14, 23, 38, 0.22), 0 0 0 1px rgba(42, 120, 214, 0.08);
  animation: dp-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes dp-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
}
.dp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.55rem;
}
.dp-title {
  font-family: var(--tech);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.dp-nav {
  width: 28px; height: 28px;
  border: 0;
  border-radius: 8px;
  background: rgba(14, 23, 38, 0.05);
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dp-nav:hover { background: rgba(42, 120, 214, 0.12); color: var(--accent); }
.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.dp-w {
  text-align: center;
  font-size: 0.66rem;
  color: var(--ink-3);
  letter-spacing: 0.05em;
  padding: 0.25rem 0;
}
.dp-day {
  aspect-ratio: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font-family: var(--tech);
  font-size: 0.82rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.12s ease;
}
.dp-day:hover { background: rgba(42, 120, 214, 0.12); color: var(--accent); }
.dp-day.today { box-shadow: inset 0 0 0 1.5px rgba(42, 120, 214, 0.55); }
.dp-day.sel {
  background: linear-gradient(135deg, var(--accent), #1d5fae);
  color: #fff;
  box-shadow: 0 3px 10px var(--glow);
}
.dp-quick {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(14, 23, 38, 0.1);
}
.dp-quick button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 0.35rem 0;
  font-size: 0.76rem;
  color: var(--accent);
  background: rgba(42, 120, 214, 0.09);
  cursor: pointer;
  transition: all 0.15s ease;
}
.dp-quick button:hover { background: rgba(42, 120, 214, 0.18); }

.seg { display: flex; gap: 0.45rem; }
.seg button, .chips button {
  font-family: var(--sans);
  font-size: 0.85rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: rgba(14, 23, 38, 0.045);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.2s ease;
}
.seg button { flex: 1; }
.seg button:hover, .chips button:hover {
  background: rgba(42, 120, 214, 0.09);
  color: var(--accent);
}
.seg button.active, .chips button.active {
  background: linear-gradient(135deg, var(--accent), #1d5fae);
  color: #fff;
  box-shadow: 0 4px 14px var(--glow);
}
.seg button:active, .chips button:active { transform: scale(0.96); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.submit-btn {
  width: 100%;
  margin-top: 0.5rem;
  font-family: var(--tech);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  border: 0;
  border-radius: 16px;
  padding: 0.85rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
  box-shadow: 0 6px 20px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.submit-btn:active { transform: scale(0.98); }
.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--glow), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.modal-hint {
  margin-top: 0.6rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--ink-3);
}

/* ── 浮动提示 ── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 2.2rem;
  transform: translateX(-50%);
  z-index: 99;
  font-family: var(--tech);
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-2), #128a60);
  box-shadow: 0 8px 28px rgba(27, 175, 122, 0.4);
  animation: toast-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.toast.err {
  background: linear-gradient(135deg, #d03b3b, #a52c2c);
  box-shadow: 0 8px 28px rgba(208, 59, 59, 0.4);
}
.toast.out { opacity: 0; transform: translateX(-50%) translateY(8px); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(14px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
