/* ============================================================
   手账本 · app
   布局 / 四个页面 / 贴纸与胶带 / 弹层
   ============================================================ */

/* ---------------- 外壳 ---------------- */

.app {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 620px) {
  .app {
    background-color: var(--paper);
    background-image: var(--grain);
    background-size: 160px 160px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 30px 70px -40px rgba(0, 0, 0, .55);
  }
}

.view {
  padding: calc(var(--safe-t) + 10px) 16px calc(112px + var(--safe-b));
  min-height: 100vh;
  min-height: 100dvh;
  animation: viewIn .32s var(--ease) both;
}

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

/* ---------------- 底部导航 ---------------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  padding: 6px 8px calc(6px + var(--safe-b));
  background: var(--paper);
  border-top: 1px dashed var(--line-strong);
  box-shadow: 0 -8px 24px -18px rgba(75, 62, 46, .55);
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .tabbar {
    background: color-mix(in srgb, var(--paper) 84%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
  }
}

.tab {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 52px;
  border-radius: 14px;
  color: var(--ink-3);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s var(--ease), transform .2s var(--ease);
}

.tab svg { width: 23px; height: 23px; }

.tab span {
  font-size: 11px;
  letter-spacing: .04em;
  line-height: 1.2;
}

.tab[aria-current="page"] {
  color: var(--accent);
}

.tab[aria-current="page"] svg {
  transform: translateY(-1px) scale(1.04);
}

.tab:active { transform: scale(.94); }

/* ---------------- 今日 · 页眉 ---------------- */

.day-head {
  position: relative;
  padding: 4px 0 18px;
}

.day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
}

.day-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--ink-2);
}

.day-label .dotsep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--ink-3);
}

.day-today-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  letter-spacing: .1em;
  box-shadow: 0 3px 8px -4px rgba(196, 96, 74, .9);
}

.day-nav {
  display: flex;
  gap: 2px;
  margin-right: -8px;
}

.day-main {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 2px;
}

.day-num {
  font-family: var(--font-hand);
  font-size: 66px;
  line-height: .92;
  letter-spacing: -.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.day-side {
  padding-bottom: 7px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.day-lunar {
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--ink-2);
  letter-spacing: .04em;
}

.day-count {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .05em;
}

.quote {
  margin-top: 12px;
  font-family: var(--font-hand);
  font-size: 15.5px;
  color: var(--ink-2);
  letter-spacing: .02em;
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.quote::before {
  content: "「";
  color: var(--accent);
  opacity: .55;
}

.quote::after {
  content: "」";
  color: var(--accent);
  opacity: .55;
}

/* ---------------- 卡片 ---------------- */

.card {
  position: relative;
  margin-bottom: 16px;
  padding: 20px 16px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
}

.card--tilt-a { transform: rotate(-.35deg); }
.card--tilt-b { transform: rotate(.3deg); }

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

.sec-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-hand);
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--ink);
}

.sec-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .75;
  flex: 0 0 auto;
}

.sec-extra {
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: .04em;
}

/* 纸胶带 */
.tape {
  position: absolute;
  width: 84px;
  height: 21px;
  top: -10px;
  left: 22px;
  transform: rotate(-3.5deg);
  background:
    repeating-linear-gradient(48deg,
      var(--tape-a, #F2E3C8) 0 5px,
      var(--tape-b, #E9D3AE) 5px 10px);
  opacity: .9;
  box-shadow: 0 1px 2px rgba(75, 62, 46, .12);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4px, #000 calc(100% - 4px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 4px, #000 calc(100% - 4px), transparent 100%);
  pointer-events: none;
}

.tape--right {
  left: auto;
  right: 26px;
  transform: rotate(2.5deg);
  width: 64px;
}

/* ---------------- 心情 ---------------- */

.mood-row {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  margin: 0 -2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.mood-row::-webkit-scrollbar { display: none; }

.mood-chip {
  flex: 0 0 auto;
  width: 58px;
  padding: 9px 0 7px;
  border-radius: 15px;
  border: 1.5px solid transparent;
  background: var(--card-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: transform .16s var(--ease), background-color .18s, border-color .18s;
}

.mood-chip .face {
  font-size: 22px;
  line-height: 1;
  filter: saturate(.92);
  transition: transform .18s var(--ease);
}

.mood-chip .lab {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .02em;
}

.mood-chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--c) 17%, var(--card));
  border-color: var(--c);
  transform: translateY(-2px);
}

.mood-chip[aria-pressed="true"] .face { transform: scale(1.12); }

.mood-chip[aria-pressed="true"] .lab {
  color: var(--ink);
  font-weight: 600;
}

.weather-row {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.weather-row::-webkit-scrollbar { display: none; }

.weather-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  transition: background-color .18s, border-color .18s;
}

.weather-chip[aria-pressed="true"] {
  border-color: var(--ink-3);
  background: var(--card-2);
  color: var(--ink);
  font-weight: 600;
}

/* ---------------- 手记 ---------------- */

.note {
  display: block;
  width: 100%;
  min-height: 244px;
  padding: 0 2px;
  border: 0;
  background-color: transparent;
  background-image: repeating-linear-gradient(to bottom,
      transparent 0 29px,
      var(--rule) 29px 30px);
  background-attachment: local;
  font-family: var(--font-hand);
  font-size: 17.5px;
  line-height: 30px;
  color: var(--ink);
  letter-spacing: .02em;
}

.note::placeholder {
  color: var(--ink-3);
  opacity: .85;
}

.note:focus { outline: none; }

.note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .04em;
}

.save-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: opacity .3s;
}

.save-state::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
}

.save-state.is-idle::before { background: var(--ink-3); }

/* ---------------- 待办 ---------------- */

.todo-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}

.todo-row:last-of-type { border-bottom: 0; }

.todo-check {
  position: relative;
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  border-radius: 8px;
  border: 1.6px solid var(--line-strong);
  background: transparent;
  transition: background-color .18s, border-color .18s, transform .12s;
}

.todo-check::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  width: 7px;
  height: 11px;
  border-right: 2.2px solid #fff;
  border-bottom: 2.2px solid #fff;
  transform: rotate(42deg) scale(.2);
  opacity: 0;
  transition: transform .18s var(--ease), opacity .12s;
}

.todo-row.is-done .todo-check {
  background: var(--accent-2);
  border-color: var(--accent-2);
}

.todo-row.is-done .todo-check::after {
  opacity: 1;
  transform: rotate(42deg) scale(1);
}

.todo-check:active { transform: scale(.9); }

.todo-text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
  transition: color .18s;
}

.todo-row.is-done .todo-text {
  color: var(--ink-3);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--line-strong);
}

.todo-del {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
  opacity: .65;
}

.todo-del:active { background: var(--card-2); opacity: 1; }

.todo-add {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.todo-add .plus {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.4px dashed var(--line-strong);
  color: var(--ink-3);
  font-size: 15px;
  line-height: 1;
}

.todo-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 32px;
  border: 0;
  background: transparent;
  font-size: 15px;
  color: var(--ink);
}

.todo-input::placeholder { color: var(--ink-3); }
.todo-input:focus { outline: none; }

.todo-empty {
  padding: 8px 0 2px;
  font-family: var(--font-hand);
  font-size: 14.5px;
  color: var(--ink-3);
}

/* ---------------- 今日习惯 ---------------- */

.habit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.habit-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card-2);
  font-size: 13.5px;
  color: var(--ink-2);
  transition: transform .14s var(--ease), background-color .2s, border-color .2s, color .2s;
}

.habit-pill .em { font-size: 15px; }

.habit-pill[aria-pressed="true"] {
  background: var(--hc);
  border-color: var(--hc);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 14px -10px var(--hc);
}

.habit-pill:active { transform: scale(.95); }

/* ---------------- 贴纸层 ---------------- */

.page {
  position: relative;
}

.sticker-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.sticker {
  position: absolute;
  display: grid;
  place-items: center;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  line-height: 1;
  will-change: left, top;
}

.sticker--emoji {
  font-size: var(--sz, 34px);
  filter: drop-shadow(0 2px 3px rgba(75, 62, 46, .22));
}

.sticker--tape {
  height: 22px;
  border-radius: 2px;
  background:
    repeating-linear-gradient(48deg,
      var(--tape-a) 0 5px,
      var(--tape-b) 5px 10px);
  box-shadow: 0 1px 2px rgba(75, 62, 46, .14);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4px, #000 calc(100% - 4px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 4px, #000 calc(100% - 4px), transparent 100%);
}

.sticker.is-dragging {
  cursor: grabbing;
  filter: drop-shadow(0 8px 14px rgba(75, 62, 46, .35));
}

.sticker.is-selected {
  outline: 2px dashed var(--accent);
  outline-offset: 5px;
  border-radius: 6px;
}

.sticker.is-selected::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 12px;
}

.fab {
  position: fixed;
  right: 16px;
  bottom: calc(var(--safe-b) + 80px);
  z-index: 44;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 22px -10px rgba(196, 96, 74, .95), 0 2px 6px rgba(0, 0, 0, .12);
  transition: transform .16s var(--ease);
}

.fab:active { transform: scale(.92); }
.fab svg { width: 26px; height: 26px; }

@media (min-width: 620px) {
  .fab { right: calc(50% - 260px + 16px); }
}

.sticker-tools {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 80px);
  z-index: 45;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  animation: popIn .2s var(--ease) both;
}

@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, 6px) scale(.94); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.sticker-tools button {
  width: 42px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 16px;
  color: var(--ink-2);
  transition: background-color .16s;
}

.sticker-tools button:active { background: var(--card-2); }
.sticker-tools button[data-act="del"] { color: var(--accent); }

/* ---------------- 日历 ---------------- */

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0 14px;
}

.cal-title {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--font-hand);
  font-size: 26px;
  letter-spacing: .04em;
}

.cal-title em {
  font-style: normal;
  font-size: 15px;
  color: var(--ink-3);
  font-family: var(--font-ui);
  letter-spacing: .1em;
}

.cal-nav { display: flex; gap: 2px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-dow {
  padding: 4px 0 8px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--ink-3);
}

.cal-cell {
  position: relative;
  aspect-ratio: 1 / 1.06;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 13px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: background-color .18s, transform .14s var(--ease);
}

.cal-cell:active { transform: scale(.92); }

.cal-cell.is-out { color: var(--ink-3); opacity: .38; }

.cal-cell.has-mood {
  background: color-mix(in srgb, var(--c) 20%, transparent);
}

.cal-cell.is-today::after {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1.8px solid var(--accent);
  border-radius: 48% 52% 47% 53% / 52% 46% 54% 48%;
  transform: rotate(-5deg);
  pointer-events: none;
}

.cal-cell.is-selected { background: color-mix(in srgb, var(--ink) 9%, transparent); }

.cal-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink-3);
  opacity: .8;
}

.cal-cell .cal-mark {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.cal-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--ink-2);
}

/* ---------------- 习惯 ---------------- */

.hb {
  position: relative;
  margin-bottom: 14px;
  padding: 15px 14px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.hb-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
}

.hb-em {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hc) 16%, var(--card));
  font-size: 17px;
}

.hb-name {
  font-family: var(--font-hand);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: .03em;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hb-streak {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .03em;
}

.hb-streak b {
  color: var(--hc);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.hb-more {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
}

.hb-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.hb-cell {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card-2);
  display: grid;
  place-items: center;
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  transition: background-color .16s, color .16s, border-color .16s, transform .12s var(--ease);
}

.hb-dow {
  text-align: center;
  padding-bottom: 2px;
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--ink-3);
  opacity: .75;
}

.hb-cell.is-future { opacity: .35; }

.hb-cell.on {
  background: var(--hc);
  border-color: var(--hc);
  color: #fff;
  font-weight: 600;
}

.hb-cell:active { transform: scale(.88); }

/* ---------------- 回顾 ---------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.stat {
  padding: 13px 13px 12px;
  border-radius: var(--r-md);
  background: var(--card-2);
  border: 1px solid var(--line);
}

.stat-lab {
  font-size: 11.5px;
  color: var(--ink-3);
  letter-spacing: .06em;
}

.stat-val {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 3px;
  font-family: var(--font-hand);
  font-size: 29px;
  line-height: 1.1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-val small {
  font-size: 12.5px;
  color: var(--ink-3);
  font-family: var(--font-ui);
}

.bars { display: flex; flex-direction: column; gap: 9px; }

.bar-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.bar-face { width: 20px; flex: 0 0 auto; font-size: 15px; line-height: 1; }

.bar-track {
  flex: 1 1 auto;
  height: 9px;
  border-radius: 999px;
  background: var(--card-2);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--c);
  transition: width .5s var(--ease);
}

.bar-n {
  flex: 0 0 auto;
  width: 26px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  font-size: 11.5px;
}

.heat-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.heat-wrap::-webkit-scrollbar { display: none; }

.heat {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(7, 1fr);
  gap: 3px;
  width: max-content;
}

.heat i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--line);
}

.heat-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: .04em;
}

.milestones {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.milestone {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.milestone .tick {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent-2) 18%, var(--card));
  color: var(--accent-2);
  font-size: 12px;
}

.milestone.off .tick {
  background: var(--card-2);
  color: var(--ink-3);
}

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

.empty {
  padding: 20px 8px 10px;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--ink-3);
  letter-spacing: .02em;
  line-height: 1.9;
}

.empty .big {
  display: block;
  font-size: 26px;
  margin-bottom: 6px;
  opacity: .8;
}

/* ---------------- 弹层 ---------------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(40, 32, 24, .40);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity .24s var(--ease);
}

.sheet-backdrop.is-open { opacity: 1; }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  max-width: 520px;
  margin: 0 auto;
  max-height: 84dvh;
  display: flex;
  flex-direction: column;
  padding: 6px 16px calc(16px + var(--safe-b));
  border-radius: 24px 24px 0 0;
  background: var(--card);
  border-top: 1px solid var(--line);
  box-shadow: 0 -18px 50px -30px rgba(0, 0, 0, .6);
  transform: translateY(102%);
  transition: transform .30s var(--ease);
  will-change: transform;
}

.sheet.is-open { transform: translateY(0); }

.sheet-grip {
  width: 38px;
  height: 4px;
  margin: 6px auto 10px;
  border-radius: 999px;
  background: var(--line-strong);
  opacity: .45;
  flex: 0 0 auto;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex: 0 0 auto;
}

.sheet-title {
  font-family: var(--font-hand);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .05em;
}

.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 4px;
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.sheet-actions .btn { flex: 1 1 0; }

.sheet-note {
  margin-top: 12px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* 贴纸面板 */
.sticker-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.sticker-tabs::-webkit-scrollbar { display: none; }

.sticker-tab {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--ink-2);
  font-size: 13px;
  transition: background-color .18s, color .18s, border-color .18s;
}

.sticker-tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--card);
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.sticker-item {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--card-2);
  font-size: 25px;
  line-height: 1;
  transition: transform .13s var(--ease), background-color .16s;
}

.sticker-item:active { transform: scale(.88); background: var(--paper-2); }

.sticker-item--tape {
  font-size: 0;
  padding: 0 8px;
  background: transparent;
  border: 0;
}

.sticker-item--tape i {
  display: block;
  width: 100%;
  height: 20px;
  border-radius: 2px;
  background: repeating-linear-gradient(48deg, var(--a) 0 5px, var(--b) 5px 10px);
}

/* 设置 */
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
}

.set-row:last-child { border-bottom: 0; }

.set-lab {
  font-size: 14.5px;
  color: var(--ink);
}

.set-sub {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.6;
}

.theme-row { display: flex; gap: 8px; }

.theme-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--d);
  position: relative;
  transition: transform .16s var(--ease), border-color .18s;
}

.theme-dot[aria-pressed="true"] {
  border-color: var(--accent);
  transform: scale(1.06);
}

.theme-dot[aria-pressed="true"]::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px dashed var(--accent);
}

/* ---------------- 提示条 ---------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-b) + 92px);
  z-index: 90;
  transform: translate(-50%, 12px);
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(48, 41, 33, .93);
  color: #fff;
  font-size: 13px;
  letter-spacing: .04em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}

.toast.is-show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------------- 图标尺寸 ---------------- */

.btn svg { width: 17px; height: 17px; }
.todo-del svg { width: 15px; height: 15px; }
.hb-more svg { width: 17px; height: 17px; }
.sticker-tools svg { width: 18px; height: 18px; }
.tab svg { width: 23px; height: 23px; }
.sec-extra svg { width: 15px; height: 15px; }
.cal-legend b { font-weight: 600; color: var(--ink); }
