/* =========================================================
   小吴小王的幸福生活
   Warm paper, soft peach, a little bit of romance.
   ========================================================= */

:root {
  --bg: #fff8f2;
  --paper: #ffffff;
  --ink: #3a2a22;
  --ink-soft: #6c584d;
  --muted: #9c8a7f;
  --muted-2: #bdaa9f;
  --line: #f0e2d8;
  --line-strong: #e6d0c2;
  --rose: #e4655c;
  --rose-deep: #c94f4a;
  --rose-soft: #fbe3dd;
  --peach: #f6c6af;
  --gold: #e5b36f;
  --sage: #8faf97;
  --shadow-sm: 0 2px 10px rgba(150, 100, 75, 0.05);
  --shadow: 0 14px 40px rgba(150, 100, 75, 0.1);
  --shadow-lg: 0 28px 70px rgba(120, 75, 55, 0.16);
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --radius: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 620px at 8% -12%, rgba(249, 199, 178, 0.5), transparent 62%),
    radial-gradient(760px 540px at 102% -4%, rgba(250, 224, 206, 0.55), transparent 58%),
    radial-gradient(900px 760px at 88% 112%, rgba(214, 229, 214, 0.38), transparent 62%),
    radial-gradient(600px 500px at -8% 100%, rgba(250, 230, 214, 0.5), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(228, 101, 92, 0.18);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
}

[hidden] {
  display: none !important;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

:focus-visible {
  outline: 2px solid rgba(228, 101, 92, 0.55);
  outline-offset: 2px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: rgba(180, 140, 120, 0.28);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-track {
  background: transparent;
}

/* ------------------------------ 启动页 ------------------------------ */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  background: var(--bg);
  transition: opacity 0.35s ease;
}

.boot-heart {
  font-size: 52px;
  line-height: 1;
  color: var(--rose);
  animation: heartbeat 1.5s ease-in-out infinite;
}

.boot-screen p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.boot-screen.is-gone {
  opacity: 0;
  pointer-events: none;
}

/* ------------------------------- 登录 ------------------------------- */

.login-view {
  position: relative;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 40px 32px 56px;
  overflow: hidden;
  z-index: 1;
}

.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.7;
  animation: drift 18s ease-in-out infinite alternate;
}

.glow-a {
  width: 540px;
  height: 540px;
  left: -140px;
  top: -180px;
  background: #f8cbb6;
}

.glow-b {
  width: 460px;
  height: 460px;
  right: -120px;
  bottom: -160px;
  background: #f3dcc4;
  animation-delay: -6s;
}

.glow-c {
  width: 320px;
  height: 320px;
  right: 18%;
  top: 22%;
  background: #e3ecdf;
  opacity: 0.55;
  animation-delay: -11s;
}

.login-hearts {
  position: absolute;
  inset: 0;
}

.float-heart {
  position: absolute;
  bottom: -60px;
  color: rgba(228, 101, 92, 0.3);
  animation-name: floatUp;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}

.login-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 84px;
  align-items: center;
  width: min(1000px, 100%);
}

.login-poem {
  padding-left: 8px;
  animation: fadeUp 0.8s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.poem-eyebrow {
  margin: 0 0 20px;
  font-size: 11px;
  letter-spacing: 0.36em;
  color: var(--muted);
}

.poem-line {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.55;
  letter-spacing: 0.04em;
  color: #5a4034;
}

.poem-sign {
  margin: 26px 0 0;
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.poem-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 190px;
  margin-top: 18px;
  color: var(--peach);
}

.poem-rule span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 140, 115, 0.4));
}

.poem-rule span:last-child {
  background: linear-gradient(90deg, rgba(190, 140, 115, 0.4), transparent);
}

.poem-rule i {
  font-style: normal;
  font-size: 15px;
}

.login-card {
  position: relative;
  padding: 38px 36px 30px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px) saturate(1.08);
  -webkit-backdrop-filter: blur(24px) saturate(1.08);
  animation: fadeUp 0.75s 0.08s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.9), rgba(246, 198, 175, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #f08a7e, #d9554f);
  box-shadow: 0 10px 22px rgba(201, 79, 74, 0.28);
  flex: none;
}

.brand-mark svg {
  width: 25px;
  height: 25px;
  stroke: none;
}

.brand-mark-sm {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.brand-mark-sm svg {
  width: 21px;
  height: 21px;
}

.login-brand-text h1 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #4a342a;
}

.login-brand-kicker {
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: var(--muted);
}

.login-sub {
  margin: 20px 0 26px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.75;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field > span {
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 251, 248, 0.9);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.input-wrap:focus-within {
  background: #fff;
  border-color: rgba(228, 101, 92, 0.6);
  box-shadow: 0 0 0 4px rgba(228, 101, 92, 0.1);
}

.input-wrap > svg {
  width: 18px;
  height: 18px;
  color: var(--muted-2);
}

.input-wrap input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
}

.input-wrap input::placeholder {
  color: var(--muted-2);
}

.input-wrap.plain {
  padding: 0 4px 0 14px;
}

.pass-toggle {
  border: 0;
  background: transparent;
  color: var(--muted-2);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  padding: 0;
}

.pass-toggle:hover {
  color: var(--ink-soft);
  background: rgba(240, 226, 216, 0.6);
}

.pass-toggle svg {
  width: 17px;
  height: 17px;
}

.form-error {
  min-height: 18px;
  margin: -2px 0 0;
  font-size: 12.5px;
  color: var(--rose-deep);
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.2s, transform 0.2s;
}

.form-error.show {
  opacity: 1;
  transform: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #ee7b6e, #d9554f);
  box-shadow: 0 10px 24px rgba(201, 79, 74, 0.26);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(201, 79, 74, 0.32);
}

.btn-primary:active {
  transform: translateY(0) scale(0.995);
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #e4655c, #b9423f);
  box-shadow: 0 8px 18px rgba(185, 66, 63, 0.22);
}

.btn-sm {
  height: 40px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 13px;
}

.btn-block {
  width: 100%;
}

.btn-heart {
  width: 16px;
  height: 16px;
  stroke: none;
  opacity: 0.9;
}

.login-foot {
  margin: 24px 0 0;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  color: var(--muted-2);
}

.tiny-heart {
  color: var(--peach);
}

.login-credit {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  z-index: 2;
  margin: 0;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: rgba(156, 138, 127, 0.7);
}

.shake {
  animation: shake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ------------------------------- 主框架 ------------------------------ */

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  width: min(1240px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 36px 22px 24px;
  border-right: 1px solid rgba(220, 190, 172, 0.28);
  overflow-y: auto;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 6px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.brand-kicker {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.brand-name {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #4a342a;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 43px;
  padding: 0 13px;
  border-radius: 13px;
  border: 1px solid transparent;
  background: transparent;
  color: #756157;
  font-size: 14px;
  text-align: left;
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  opacity: 0.72;
}

.nav-item span {
  flex: 1;
}

.nav-item em {
  font-style: normal;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(240, 226, 216, 0.8);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.nav-item.active {
  color: var(--rose-deep);
  background: linear-gradient(135deg, #ffffff, #fff6f1);
  border-color: rgba(228, 101, 92, 0.18);
  box-shadow: 0 8px 20px rgba(190, 120, 95, 0.1);
}

.nav-item.active svg {
  opacity: 1;
}

.nav-item.active em {
  color: var(--rose-deep);
  background: var(--rose-soft);
  border-color: transparent;
}

.love-card {
  position: relative;
  margin-top: auto;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, 0.9), transparent 55%),
    linear-gradient(150deg, rgba(255, 249, 244, 0.95), rgba(253, 233, 222, 0.9));
  border: 1px solid rgba(240, 195, 170, 0.5);
  box-shadow: 0 14px 34px rgba(190, 130, 100, 0.1);
  overflow: hidden;
}

.love-card::after {
  content: "♡";
  position: absolute;
  right: -8px;
  bottom: -34px;
  font-family: var(--serif);
  font-size: 110px;
  line-height: 1;
  color: rgba(228, 101, 92, 0.08);
  pointer-events: none;
}

.love-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 12px;
}

.love-card-top svg {
  width: 13px;
  height: 13px;
  stroke: none;
  color: var(--rose);
  opacity: 0.75;
}

.anniversary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--ink);
}

.anniversary-number {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.anniversary-number b {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.1;
  font-weight: 600;
  color: var(--rose-deep);
  letter-spacing: 0.01em;
}

.anniversary-number i {
  font-style: normal;
  font-size: 11px;
  color: var(--muted);
}

.anniversary-label {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.anniversary:hover .anniversary-label {
  color: var(--rose-deep);
}

.daily-quote {
  position: relative;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(210, 165, 140, 0.4);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.8;
  color: #8b6d5d;
}

.side-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 2px;
}

.user-chip {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  text-align: left;
  transition: background 0.18s, border-color 0.18s;
}

.user-chip:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--line);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex: none;
  color: #fff;
  font-family: var(--serif);
  font-size: 13px;
  background: linear-gradient(140deg, #e8a48f, #d3786f);
  box-shadow: 0 5px 12px rgba(190, 110, 90, 0.2);
}

.user-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.user-meta b {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.user-meta small {
  font-size: 10px;
  color: var(--muted-2);
  white-space: nowrap;
}

.user-gear {
  width: 15px;
  height: 15px;
  color: var(--muted-2);
  margin-left: auto;
}

.logout-btn {
  width: 34px;
  height: 34px;
}

/* -------------------------------- 主区域 ------------------------------- */

.main {
  min-width: 0;
  padding: 38px 50px 60px 46px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.hello h2 {
  margin: 7px 0 7px;
  font-family: var(--serif);
  font-size: clamp(24px, 2.5vw, 31px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #4a342a;
}

.heart-pop {
  display: inline-block;
  margin-left: 2px;
  font-size: 0.72em;
  color: var(--rose);
  animation: heartbeat 3.6s ease-in-out infinite;
}

.hello-sub {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.progress-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 15px 10px 11px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(232, 200, 182, 0.5);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex: none;
}

.ring {
  --p: 0;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(
    from -90deg,
    var(--rose) calc(var(--p) * 1%),
    #f2e5dc 0
  );
  transition: background 0.6s ease;
  box-shadow: inset 0 0 0 1px rgba(200, 140, 110, 0.08);
}

.ring-inner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fffdfb;
  box-shadow: 0 2px 6px rgba(160, 110, 85, 0.08);
}

.ring-inner b {
  font-size: 12px;
  font-weight: 700;
  color: var(--rose-deep);
  letter-spacing: -0.02em;
}

.progress-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 64px;
}

.progress-text span {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.progress-text b {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.quote-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(100deg, rgba(252, 233, 223, 0.85), rgba(255, 248, 239, 0.5));
  border: 1px solid rgba(240, 205, 185, 0.45);
  color: #7d5d4d;
  font-family: var(--serif);
  font-size: 13.5px;
  letter-spacing: 0.02em;
}

.quote-bar p {
  flex: 1;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-mark {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
  color: var(--peach);
  transform: translateY(-2px);
}

.quote-spark {
  width: 15px;
  height: 15px;
  color: rgba(210, 160, 120, 0.7);
}

/* -------------------------------- 输入区 ------------------------------- */

.composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 15px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}

.composer:focus-within {
  border-color: rgba(228, 101, 92, 0.45);
  box-shadow: 0 14px 34px rgba(200, 120, 95, 0.13);
  transform: translateY(-1px);
}

.composer-plus {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  color: var(--rose);
  background: var(--rose-soft);
}

.composer-plus svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

#taskInput {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15.5px;
  color: var(--ink);
}

#taskInput::placeholder {
  color: var(--muted-2);
}

.compose-due {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  max-width: 165px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  flex: none;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.compose-due svg {
  width: 14px;
  height: 14px;
}

.compose-due span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compose-due:hover {
  color: var(--ink-soft);
  border-color: var(--rose);
  background: rgba(255, 255, 255, 0.8);
}

.compose-due.has-due {
  color: #b4682f;
  border-style: solid;
  border-color: rgba(240, 180, 130, 0.5);
  background: rgba(248, 220, 195, 0.35);
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  background: linear-gradient(135deg, #ee7b6e, #d9554f);
  box-shadow: 0 8px 18px rgba(201, 79, 74, 0.22);
  flex: none;
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn-add svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.2;
}

.btn-add:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(201, 79, 74, 0.28);
}

.btn-add:active {
  transform: scale(0.985);
}

.compose-hint {
  min-height: 18px;
  margin: 6px 2px 0;
  font-size: 11.5px;
  color: var(--rose-deep);
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 0.2s, transform 0.2s;
}

.compose-hint.show {
  opacity: 1;
  transform: none;
}

.composer-tips {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 3px 4px 0;
  font-size: 10.5px;
  color: var(--muted-2);
  letter-spacing: 0.01em;
}

.tips-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
}

kbd {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--sans);
  font-size: 10px;
  color: var(--muted);
}

/* -------------------------------- 列表头 ------------------------------- */

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 5px;
}

.list-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.list-title h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #4a342a;
}

.soft-count {
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 205px;
  height: 37px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.66);
  transition: width 0.25s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.search:focus-within {
  width: 245px;
  background: #fff;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}

.search svg {
  width: 15px;
  height: 15px;
  color: var(--muted-2);
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
  color: var(--ink);
}

.search input::placeholder {
  color: var(--muted-2);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.list-sub {
  margin: 0 0 13px;
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.02em;
}

/* -------------------------------- 任务卡 ------------------------------- */

.task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.task {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 12px 13px 11px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(232, 208, 194, 0.62);
  box-shadow: 0 2px 10px rgba(170, 120, 95, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease,
    opacity 0.2s ease;
  animation: taskIn 0.4s cubic-bezier(0.2, 0.8, 0.3, 1) both;
  animation-delay: calc(var(--i, 0) * 16ms);
}

.task:hover {
  transform: translateY(-1px);
  border-color: rgba(228, 160, 134, 0.55);
  box-shadow: 0 10px 24px rgba(170, 120, 95, 0.1);
}

.task.top-1::before,
.task.top-2::before,
.task.top-3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--rose);
  opacity: 0.8;
}

.task.top-2::before {
  background: var(--peach);
  opacity: 0.9;
}

.task.top-3::before {
  background: var(--sage);
  opacity: 0.55;
}

.drag-handle {
  width: 22px;
  height: 34px;
  margin: 1px 0 0 -3px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted-2);
  display: grid;
  place-items: center;
  opacity: 0.38;
  cursor: grab;
  touch-action: none;
  flex: none;
  transition: opacity 0.18s, background 0.18s, color 0.18s;
}

.drag-handle svg {
  width: 14px;
  height: 18px;
}

.drag-handle:hover {
  opacity: 1;
  color: var(--ink-soft);
  background: rgba(240, 226, 216, 0.55);
}

.drag-handle:active {
  cursor: grabbing;
}

.check {
  position: relative;
  width: 23px;
  height: 23px;
  margin-top: 1px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid #dcc3b6;
  background: #fff;
  display: grid;
  place-items: center;
  flex: none;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.check svg {
  width: 12px;
  height: 12px;
  stroke: #fff;
  stroke-width: 3;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.16s, transform 0.2s;
}

.check:hover {
  border-color: var(--rose);
  background: var(--rose-soft);
  transform: scale(1.04);
}

.task.is-completing .check,
.check.checked {
  border-color: transparent;
  background: linear-gradient(135deg, #ee7b6e, #d9554f);
}

.task.is-completing .check svg,
.check.checked svg {
  opacity: 1;
  transform: none;
}

.task.is-completing {
  opacity: 0.45;
  transform: scale(0.99);
}

.task.is-completing .task-title {
  text-decoration: line-through;
  color: var(--muted);
}

.task-body {
  flex: 1;
  min-width: 0;
  padding-top: 0;
}

.task-title {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  word-break: break-word;
  overflow-wrap: anywhere;
  cursor: text;
  outline: 0;
}

.task-title:hover {
  color: #2f211a;
}

.task-note {
  margin: 3px 0 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.task-meta:empty {
  display: none;
}

.due-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: rgba(245, 232, 224, 0.72);
  color: #8a7064;
  font-size: 11.5px;
  line-height: 1;
  transition: background 0.18s, color 0.18s, border-color 0.18s, opacity 0.18s;
}

.due-chip svg {
  width: 13px;
  height: 13px;
  opacity: 0.8;
}

.due-chip:hover {
  background: #fff;
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.due-chip.no-due {
  background: transparent;
  border: 1px dashed var(--line-strong);
  color: var(--muted-2);
  opacity: 0;
}

.task:hover .due-chip.no-due,
.task:focus-within .due-chip.no-due {
  opacity: 1;
}

.due-chip.is-today {
  background: rgba(246, 198, 175, 0.32);
  color: #ad5f2d;
}

.due-chip.is-overdue {
  background: rgba(228, 101, 92, 0.1);
  color: var(--rose-deep);
}

.due-chip.is-done-time {
  background: transparent;
  color: var(--muted-2);
  padding: 0;
}

.due-chip.is-done-time svg {
  width: 12px;
  height: 12px;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 1px;
  margin-left: 2px;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity 0.18s, transform 0.18s;
  flex: none;
}

.task:hover .task-actions,
.task:focus-within .task-actions {
  opacity: 1;
  transform: none;
}

.icon-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted-2);
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
}

.icon-btn svg {
  width: 15px;
  height: 15px;
}

.icon-btn:hover {
  background: #fbf1eb;
  color: var(--ink-soft);
}

.icon-btn.danger:hover {
  background: #fdece9;
  color: var(--rose-deep);
}

.title-edit {
  width: 100%;
  padding: 4px 8px;
  margin: -4px -8px;
  border: 1px solid rgba(228, 101, 92, 0.45);
  border-radius: 9px;
  background: #fff;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(228, 101, 92, 0.08);
}

.task.just-added {
  animation: addedGlow 1.2s ease both;
}

/* 拖拽 */

.task.drag-origin {
  opacity: 0.28;
  border-style: dashed;
  background: transparent;
  box-shadow: none;
  transform: none;
}

.task.drag-origin > * {
  visibility: hidden;
}

.drag-ghost {
  position: fixed;
  z-index: 80;
  margin: 0;
  pointer-events: none;
  background: #fff;
  border: 1px solid rgba(228, 101, 92, 0.4);
  box-shadow: 0 24px 60px rgba(120, 70, 50, 0.24);
  border-radius: 16px;
  transform: rotate(1.5deg) scale(1.015);
  opacity: 0.98;
  animation: none;
}

.drag-ghost .task-actions {
  display: none;
}

.drag-ghost .drag-handle {
  opacity: 0.7;
  color: var(--rose);
}

body.is-dragging {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}

body.modal-open {
  overflow: hidden;
}

body.is-dragging .task:hover {
  transform: none;
}

/* ------------------------------- 空状态 ------------------------------- */

.empty {
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 46px 24px 44px;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.46);
  text-align: center;
  animation: fadeUp 0.45s ease both;
}

.empty-art {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 7px;
  color: var(--rose);
  background: linear-gradient(135deg, rgba(252, 226, 214, 0.95), rgba(246, 238, 224, 0.95));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8);
}

.empty-art::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(228, 101, 92, 0.2);
}

.empty-art svg {
  width: 30px;
  height: 30px;
  stroke-width: 1.5;
}

.empty h4 {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #5a4034;
}

.empty p {
  margin: 0;
  max-width: 320px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.empty .btn {
  height: 39px;
  margin-top: 9px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 13px;
}

/* ------------------------------- 已完成 ------------------------------- */

.done-section {
  margin-top: 30px;
  padding-top: 13px;
  border-top: 1px solid rgba(231, 210, 196, 0.65);
}

.done-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.done-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
}

.done-toggle svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.done-toggle.open svg {
  transform: rotate(180deg);
}

.done-toggle em {
  font-style: normal;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  font-size: 10.5px;
}

.done-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 9px 0 0;
  padding: 0;
}

.done-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(240, 226, 216, 0.66);
}

.done-item .check {
  width: 19px;
  height: 19px;
  margin: 0;
  cursor: default;
}

.done-item .check svg {
  width: 10px;
  height: 10px;
}

.done-item .task-body {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.done-item .task-title {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(156, 138, 127, 0.5);
  cursor: default;
}

.done-time {
  font-size: 10.5px;
  color: var(--muted-2);
  white-space: nowrap;
}

.done-actions {
  display: flex;
  gap: 1px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.18s;
}

.done-item:hover .done-actions,
.done-item:focus-within .done-actions {
  opacity: 1;
}

.done-actions .icon-btn {
  width: 27px;
  height: 27px;
}

.done-actions .icon-btn svg {
  width: 14px;
  height: 14px;
}

.task.is-done {
  background: rgba(255, 255, 255, 0.58);
}

.task.is-done .task-title {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(156, 138, 127, 0.5);
  cursor: default;
}

.task.is-done .task-actions {
  opacity: 1;
  transform: none;
}

.restore-btn {
  height: 26px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.8);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.restore-btn:hover {
  color: var(--rose-deep);
  border-color: rgba(228, 101, 92, 0.4);
  background: #fff;
}

.app-foot {
  margin: 44px 0 0;
  text-align: center;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: rgba(189, 170, 159, 0.9);
}

.foot-dot {
  margin: 0 6px;
  color: var(--peach);
}

/* ------------------------------ 移动端导航 ----------------------------- */

.mobile-nav,
.fab {
  display: none;
}

/* ------------------------------- 时间弹层 ------------------------------ */

.due-popover {
  position: fixed;
  z-index: 70;
  width: 306px;
  padding: 16px;
  border-radius: 18px;
  background: #fffefc;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  animation: popIn 0.18s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pop-head b {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #4a342a;
}

.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 13px;
}

.quick-row button {
  height: 29px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(250, 243, 238, 0.8);
  color: var(--ink-soft);
  font-size: 11.5px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.quick-row button:hover {
  color: var(--rose-deep);
  border-color: rgba(228, 101, 92, 0.35);
  background: #fff;
}

.due-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.due-fields label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 10.5px;
  color: var(--muted);
}

.due-fields input {
  height: 38px;
  padding: 0 9px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: #fffbf8;
  font-size: 12.5px;
  color: var(--ink);
  outline: 0;
  color-scheme: light;
  width: 100%;
}

.due-fields input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(228, 101, 92, 0.1);
}

.pop-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

/* -------------------------------- 通用弹窗 ------------------------------ */

.text-btn {
  border: 0;
  background: transparent;
  padding: 6px 2px;
  font-size: 12.5px;
  color: var(--muted);
  border-radius: 8px;
  transition: color 0.15s;
}

.text-btn:hover {
  color: var(--ink-soft);
}

.text-btn.danger {
  color: #c07a70;
}

.text-btn.danger:hover {
  color: var(--rose-deep);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(58, 42, 34, 0.34);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn 0.2s ease both;
}

.modal-card {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  padding: 24px;
  border-radius: 24px;
  background: #fffefc;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.modal-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-card h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #4a342a;
}

.modal-card footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
}

.modal-task-title {
  margin: 0 0 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(250, 240, 233, 0.7);
  font-size: 12.5px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.modal-card textarea {
  width: 100%;
  min-height: 112px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #fffbf8;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  outline: 0;
  resize: vertical;
}

.modal-card textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(228, 101, 92, 0.1);
  background: #fff;
}

.field-note {
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted-2);
}

.settings-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.settings-user {
  display: flex;
  align-items: center;
  gap: 9px;
}

.confirm-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-soft);
}

.modal-card-sm {
  width: min(380px, 100%);
}

/* -------------------------------- Toast -------------------------------- */

.toast-host {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
  width: max-content;
  max-width: calc(100vw - 32px);
}

.toast {
  display: flex;
  align-items: center;
  gap: 13px;
  max-width: 100%;
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(58, 42, 34, 0.93);
  color: #fff7f1;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  box-shadow: 0 16px 34px rgba(60, 35, 25, 0.26);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: opacity 0.24s ease, transform 0.24s ease;
  pointer-events: auto;
}

.toast span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: none;
}

.toast button {
  flex: none;
  padding: 2px 0 2px 10px;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #f6c6af;
  font-size: 12px;
  font-weight: 600;
}

.toast.error {
  background: rgba(169, 58, 54, 0.95);
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
  color: var(--ink-soft);
  text-align: center;
  font-size: 14px;
}

/* -------------------------------- 动画 -------------------------------- */

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  18% {
    transform: scale(1.12);
  }
  36% {
    transform: scale(1);
  }
  54% {
    transform: scale(1.08);
  }
}

@keyframes floatUp {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  85% {
    opacity: 0.7;
  }
  100% {
    transform: translate3d(24px, -110vh, 0) rotate(24deg);
    opacity: 0;
  }
}

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(30px, -24px, 0) scale(1.08);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes taskIn {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes addedGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(228, 101, 92, 0.34);
    border-color: rgba(228, 101, 92, 0.6);
  }
  100% {
    box-shadow: 0 2px 10px rgba(170, 120, 95, 0.04);
  }
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes shake {
  10%,
  90% {
    transform: translateX(-1px);
  }
  20%,
  80% {
    transform: translateX(2px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-5px);
  }
  40%,
  60% {
    transform: translateX(5px);
  }
}

/* ------------------------------- 响应式 ------------------------------- */

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 248px minmax(0, 1fr);
  }

  .main {
    padding: 34px 34px 56px 30px;
  }

  .login-wrap {
    gap: 56px;
  }
}

@media (max-width: 960px) {
  .main {
    padding: 30px 26px 56px;
  }

  .progress-card {
    padding-right: 12px;
  }

  .login-wrap {
    grid-template-columns: 1fr 400px;
    gap: 40px;
  }

  .poem-line {
    font-size: 30px;
  }
}

@media (max-width: 860px) {
  body {
    background-attachment: scroll;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 26px 18px calc(112px + var(--safe-bottom));
    max-width: 680px;
    margin: 0 auto;
  }

  .topbar {
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
  }

  .hello h2 {
    font-size: 23px;
  }

  .hello-sub {
    font-size: 12px;
  }

  .quote-bar {
    margin-bottom: 14px;
    font-size: 12.5px;
  }

  .progress-card {
    border-radius: 18px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.66);
  }

  .progress-text {
    padding-right: 4px;
  }

  .ring {
    width: 50px;
    height: 50px;
  }

  .ring-inner {
    width: 40px;
    height: 40px;
  }

  .ring-inner b {
    font-size: 11px;
  }

  .composer {
    border-radius: 18px;
  }

  .task {
    padding: 12px 10px 12px 8px;
    border-radius: 15px;
  }

  .task-actions {
    opacity: 1;
    transform: none;
  }

  .due-chip.no-due {
    opacity: 1;
  }

  .done-actions {
    opacity: 1;
  }

  .mobile-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + var(--safe-bottom));
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 62px;
    padding: 6px;
    border-radius: 20px;
    border: 1px solid rgba(238, 218, 204, 0.85);
    background: rgba(255, 252, 249, 0.92);
    box-shadow: 0 16px 40px rgba(130, 85, 60, 0.18);
    backdrop-filter: blur(18px) saturate(1.1);
    -webkit-backdrop-filter: blur(18px) saturate(1.1);
  }

  .mobile-nav button {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.03em;
    transition: color 0.18s, background 0.18s;
  }

  .mobile-nav button svg {
    width: 19px;
    height: 19px;
  }

  .mobile-nav button.active {
    color: var(--rose-deep);
    background: rgba(251, 227, 221, 0.55);
  }

  .mobile-nav button:active {
    background: rgba(251, 227, 221, 0.8);
  }

  .fab {
    position: fixed;
    right: 18px;
    bottom: calc(86px + var(--safe-bottom));
    z-index: 41;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #ee7b6e, #d9554f);
    box-shadow: 0 12px 30px rgba(201, 79, 74, 0.34);
    transition: transform 0.16s;
  }

  .fab svg {
    width: 23px;
    height: 23px;
    stroke-width: 2;
  }

  .fab:active {
    transform: scale(0.94);
  }

  .toast-host {
    bottom: calc(88px + var(--safe-bottom));
  }

  .app-foot {
    margin-top: 34px;
  }
}

@media (max-width: 900px) {
  .login-wrap {
    grid-template-columns: 1fr;
    width: min(420px, 100%);
  }

  .login-poem {
    display: none;
  }

  .login-view {
    padding: 32px 20px 48px;
  }
}

@media (max-width: 640px) {
  .progress-text {
    display: none;
  }

  .login-card {
    padding: 30px 24px 24px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.86);
  }

  .login-brand-text h1 {
    font-size: 23px;
  }

  .login-sub {
    margin: 16px 0 22px;
  }

  .login-credit {
    display: none;
  }

  .main {
    padding: 22px 14px calc(108px + var(--safe-bottom));
  }

  .topbar {
    margin-bottom: 13px;
  }

  .eyebrow {
    font-size: 10px;
  }

  .hello h2 {
    font-size: 21px;
    margin: 5px 0 5px;
  }

  .hello-sub {
    font-size: 11.5px;
  }

  .quote-bar {
    padding: 9px 12px;
    border-radius: 13px;
    font-size: 12px;
    gap: 6px;
  }

  .quote-mark {
    display: none;
  }

  .quote-spark {
    width: 13px;
    height: 13px;
  }

  .composer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 10px;
    padding: 11px 12px;
  }

  .composer-plus {
    display: none;
  }

  #taskInput {
    grid-column: 1 / -1;
    height: 34px;
    font-size: 15px;
  }

  .compose-due {
    grid-column: 1;
    justify-self: start;
    height: 36px;
  }

  .btn-add {
    grid-column: 2;
    height: 38px;
    padding: 0 16px;
  }

  .composer-tips {
    font-size: 10px;
  }

  .composer-tips .tips-key {
    display: none;
  }

  .list-toolbar {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
  }

  .list-title h3 {
    font-size: 19px;
  }

  .search {
    width: 100%;
    height: 36px;
  }

  .search:focus-within {
    width: 100%;
  }

  .list-sub {
    margin-bottom: 11px;
  }

  .task {
    gap: 8px;
    padding: 12px 8px 12px 6px;
  }

  .drag-handle {
    width: 20px;
    height: 32px;
    opacity: 0.5;
  }

  .task-title {
    font-size: 14.5px;
  }

  .task-actions {
    gap: 0;
    margin-left: 0;
  }

  .task-actions .icon-btn {
    width: 28px;
    height: 28px;
  }

  .empty {
    padding: 38px 18px;
  }

  .empty h4 {
    font-size: 16.5px;
  }

  .empty p {
    font-size: 12.5px;
  }

  .due-popover {
    left: 10px !important;
    right: 10px;
    top: auto !important;
    bottom: calc(10px + var(--safe-bottom));
    width: auto;
    border-radius: 22px;
    padding: 18px;
  }

  .modal {
    padding: 14px;
    align-items: end;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100dvh - 80px);
    border-radius: 22px;
    padding: 20px;
    animation: sheetIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  }

  .toast-host {
    width: calc(100vw - 28px);
    max-width: none;
  }

  .toast {
    width: 100%;
    justify-content: space-between;
    border-radius: 16px;
  }
}

@keyframes sheetIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 380px) {
  .hello-sub {
    display: none;
  }

  .topbar {
    align-items: flex-start;
  }

  .login-card {
    padding: 26px 18px 20px;
  }

  .compose-due {
    max-width: 130px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
