/* 票根 · 样式 */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --cream: #FBF6EF;
  --cream-2: #F3EADe;
  --paper: #FFFDF9;
  --ink: #2C2A26;
  --ink-2: #4E4840;
  --muted: #8E8579;
  --coral: #EE6C55;
  --coral-2: #D95740;
  --coral-soft: #FCE7E1;
  --green: #2F4F43;
  --line: rgba(44, 42, 38, .10);
  --line-2: rgba(44, 42, 38, .18);
  --shadow: 0 1px 2px rgba(44, 42, 38, .05), 0 12px 28px -20px rgba(44, 42, 38, .5);
  --serif: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", STSong, SimSun, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: #EFE3D5;
  background-image:
    radial-gradient(900px 620px at 12% -12%, #F9EDDE 0%, rgba(249, 237, 222, 0) 62%),
    radial-gradient(820px 620px at 96% 112%, #F2E0E2 0%, rgba(242, 224, 226, 0) 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

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

.app {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  background: var(--cream);
  background-image: radial-gradient(rgba(44, 42, 38, .03) 1px, transparent 1px);
  background-size: 17px 17px;
}

@media (min-width: 441px) {
  .app { box-shadow: 0 0 0 1px rgba(44, 42, 38, .06), 0 60px 90px -60px rgba(44, 42, 38, .5); }
}

/* ---------- 首页头部 ---------- */

.hero { padding: 18px 20px 4px; }

.hero-top { display: flex; align-items: flex-start; justify-content: space-between; }

.brand { display: flex; flex-direction: column; line-height: 1; }
.brand span {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: .16em;
}
.brand small {
  margin-top: 7px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .26em;
  color: var(--muted);
}

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 253, 249, .7);
  color: var(--ink-2);
  cursor: pointer;
  transition: background .18s, transform .18s;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.hollow { visibility: hidden; }

.hero-days {
  display: block;
  margin: 24px 0 6px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
}
.hero-days em {
  font-family: var(--serif);
  font-style: normal;
  font-size: 44px;
  font-weight: 700;
  color: var(--coral);
  margin: 0 4px 0 2px;
  letter-spacing: -.01em;
  vertical-align: -6px;
}
.hero-days.empty { font-size: 13px; }
.hero-days.empty a { color: var(--muted); border-bottom: 1px dashed var(--line-2); padding-bottom: 2px; }

.hero-sub {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .05em;
  line-height: 1.6;
}

.stats {
  display: flex;
  margin: 18px 0 16px;
  padding: 12px 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 249, .72);
}
.stat { flex: 1; text-align: center; position: relative; }
.stat + .stat::before {
  content: "";
  position: absolute; left: 0; top: 5px; bottom: 5px;
  width: 1px; background: var(--line);
}
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.1;
}
.stat span { font-size: 10.5px; color: var(--muted); letter-spacing: .1em; }

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

.notice {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 20px 0;
  padding: 8px 10px 8px 12px;
  border: 1px solid #F0DFBE;
  border-radius: 12px;
  background: #FFF8EA;
  font-size: 11.5px;
  color: #8A6B32;
  line-height: 1.4;
}
.notice button {
  margin-left: auto;
  flex: 0 0 auto;
  border: 1px solid #E5CD9F;
  background: #FFFDF7;
  color: #8A6B32;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 999px;
  cursor: pointer;
}

/* ---------- 筛选 ---------- */

.filterbar {
  position: sticky; top: 0; z-index: 20;
  padding: 12px 0 8px;
  background: linear-gradient(180deg, var(--cream) 74%, rgba(251, 246, 239, .84));
  backdrop-filter: blur(8px);
}
.chips {
  display: flex; gap: 7px;
  padding: 2px 20px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; padding: 0; }

.filterbar .chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-overflow-scrolling: touch;
}
.filterbar .chips.dragging { cursor: grabbing; }
.filterbar .chips.dragging .chip { cursor: grabbing; }

.chip {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 253, 249, .82);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s, color .16s, border-color .16s;
}
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFF8EE;
}
.chip.add {
  color: var(--coral);
  border-style: dashed;
  border-color: rgba(238, 108, 85, .5);
  background: transparent;
  font-size: 14px;
  padding: 5px 12px;
}

/* ---------- 票根墙 ---------- */

.wall {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px 16px 0;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 148px;
  padding: 12px 12px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .16s ease;
}
.card:active { transform: scale(.975); }

.card-emoji { font-size: 22px; line-height: 1; }
.card-title {
  margin: 9px 0 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: .01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-note {
  margin: 5px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding: 9px 0 10px;
  border-top: 1px dashed var(--line-2);
}
.tag {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-date {
  margin-left: auto;
  font-family: var(--serif);
  font-size: 9.5px;
  color: var(--muted);
  letter-spacing: .02em;
  white-space: nowrap;
  flex: 0 0 auto;
}

.card.done .card-title { color: #6D665C; }
.card.done .card-emoji { filter: grayscale(.3); opacity: .85; }

.card-stamp {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 2px 4px 2px 6px;
  border: 1.5px solid rgba(238, 108, 85, .68);
  border-radius: 3px;
  color: rgba(238, 108, 85, .9);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .18em;
  transform: rotate(-12deg);
  background: rgba(255, 253, 249, .55);
  pointer-events: none;
}

.foot-note {
  margin: 22px 0 0;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .08em;
}

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

.empty {
  grid-column: 1 / -1;
  padding: 44px 20px 40px;
  text-align: center;
}
.empty-emoji { font-size: 34px; opacity: .55; }
.empty-title { margin: 14px 0 6px; font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.empty-sub { margin: 0 0 20px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.empty .btn { display: inline-flex; width: auto; padding: 11px 22px; }

/* ---------- 按钮 ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .16s, box-shadow .16s, background .16s;
}
.btn:active { transform: scale(.985); }
.btn-primary {
  background: var(--coral);
  color: #FFF9F5;
  box-shadow: 0 10px 22px -12px rgba(238, 108, 85, .9);
}
.btn-ghost {
  background: var(--paper);
  border-color: var(--line-2);
  color: var(--ink-2);
}
.btn-danger {
  background: #BE6552;
  border-color: #BE6552;
  color: #FFF7F3;
  box-shadow: 0 10px 22px -14px rgba(190, 101, 82, .9);
}
.btn-block { width: 100%; }

.btn-text {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 12.5px;
  letter-spacing: .06em;
  cursor: pointer;
}
.btn-text.danger { color: #B56B5C; }

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

/* ---------- 页面通用 ---------- */

.page { padding-top: 6px; }

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 4px;
}
.topbar h2 {
  flex: 1;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--muted);
  text-align: center;
}
.topbar .icon-btn { flex: 0 0 auto; }
.topbar.simple { padding-left: 20px; }
.topbar.simple h2 { text-align: left; font-size: 13px; }

.page-lead {
  margin: 14px 20px 16px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}
.page-lead b {
  font-family: var(--serif);
  font-size: 22px;
  color: var(--coral);
  margin: 0 3px;
}

/* ---------- 票根详情 ---------- */

.ticket {
  position: relative;
  margin: 10px 16px 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.ticket-head { padding: 26px 22px 20px; text-align: center; }
.ticket-emoji { display: block; font-size: 38px; line-height: 1; margin-bottom: 14px; }
.ticket-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  line-height: 1.34;
  letter-spacing: .02em;
}
.ticket-cat {
  margin: 10px 0 0;
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: .1em;
}

.seam {
  position: relative;
  height: 0;
  margin: 0 20px;
  border-top: 1px dashed var(--line-2);
}
.seam::before, .seam::after {
  content: "";
  position: absolute;
  top: -10px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--cream);
}
.seam::before { left: -30px; }
.seam::after { right: -30px; }

.ticket-body { padding: 18px 22px 6px; }

.ticket-note {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
  white-space: pre-wrap;
}
.ticket-note.empty-note { color: #B4AB9E; font-size: 12.5px; }

.ticket-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: .08em;
}
.ticket-meta .dash { flex: 1; height: 0; border-top: 1px dashed var(--line); }

.ticket-stub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px 16px;
  border-top: 1px dashed var(--line-2);
  margin-top: 10px;
}
.stub-no {
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--muted);
}
.barcode {
  flex: 1;
  height: 16px;
  opacity: .35;
  background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 4px, var(--ink) 4px 5px, transparent 5px 9px);
}
.stub-state {
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--muted);
  border: 1px dashed var(--line-2);
  border-radius: 4px;
  padding: 2px 6px;
}

.stamp {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
  color: var(--coral);
  border: 2px solid var(--coral);
  border-radius: 5px;
  padding: 3px 6px 4px 8px;
  transform: rotate(-8deg);
  opacity: .9;
}
.stamp.anim { animation: stampIn .55s cubic-bezier(.2, 1.3, .4, 1) both; }

@keyframes stampIn {
  0% { transform: rotate(-24deg) scale(2.3); opacity: 0; }
  60% { transform: rotate(-6deg) scale(.94); opacity: 1; }
  100% { transform: rotate(-8deg) scale(1); opacity: .9; }
}

/* ---------- 回忆区 ---------- */

.memory {
  margin: 18px 16px 0;
  padding: 14px 14px 12px;
  border: 1px solid #F2DFD6;
  border-radius: 16px;
  background: #FFF8F4;
  box-shadow: var(--shadow);
}
.memory.rise { animation: rise .5s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.memory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.memory-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  color: #C1796A;
}
.memory-date {
  font-family: var(--serif);
  font-size: 10px;
  color: #C4A79E;
  letter-spacing: .06em;
}

.memory-text {
  display: block;
  width: 100%;
  min-height: 46px;
  padding: 0;
  border: none;
  background: none;
  resize: none;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
  outline: none;
}
.memory-text::placeholder { color: #C9B4AC; font-family: var(--sans); font-size: 12.5px; }

.photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 10px;
}
.photo { position: relative; }
.photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 9px;
  background: var(--cream-2);
}
.photo-del {
  position: absolute;
  top: -6px; right: -6px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: 2px solid var(--cream);
  border-radius: 50%;
  background: rgba(44, 42, 38, .62);
  color: #FFF8EE;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}
.photo-add {
  aspect-ratio: 1;
  display: grid; place-items: center;
  border: 1px dashed rgba(238, 108, 85, .45);
  border-radius: 9px;
  background: rgba(255, 253, 249, .7);
  color: var(--coral);
  font-size: 20px;
  cursor: pointer;
}
.photo-add.wide {
  grid-column: 1 / -1;
  width: 100%;
  height: 44px;
  aspect-ratio: auto;
  font-size: 12px;
  letter-spacing: .06em;
}

.actions { display: grid; gap: 9px; padding: 18px 16px 0; }

/* ---------- 表单 ---------- */

.form { display: grid; gap: 18px; padding: 8px 16px 0; }

.field { display: grid; gap: 7px; }
.field > label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted);
}

.input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  outline: none;
  transition: border-color .16s, box-shadow .16s;
}
.input::placeholder { color: #B7AEA1; }
.input:focus {
  border-color: rgba(238, 108, 85, .55);
  box-shadow: 0 0 0 3px rgba(238, 108, 85, .1);
}
textarea.input { resize: none; overflow: hidden; }

.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }

.emoji-grid {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 170px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: thin;
}
.emoji-grid::-webkit-scrollbar { width: 6px; }
.emoji-grid::-webkit-scrollbar-thumb {
  background: rgba(44, 42, 38, .18);
  border-radius: 3px;
}
.sheet .emoji-grid {
  max-height: none;
  overflow: visible;
}
.emoji-pick {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--paper);
  font-size: 18px;
  cursor: pointer;
  transition: border-color .16s, background .16s, transform .16s;
}
.emoji-pick:active { transform: scale(.92); }
.emoji-pick[aria-pressed="true"] {
  border-color: rgba(238, 108, 85, .6);
  background: var(--coral-soft);
  box-shadow: 0 0 0 2px rgba(238, 108, 85, .1);
}

/* ---------- 分类管理 ---------- */

.cat-list {
  margin: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cat-row {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 14px 14px;
  border: none;
  border-top: 1px solid var(--line);
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.cat-row:first-child { border-top: none; }
.cat-emoji { font-size: 18px; }
.cat-name { flex: 1; font-size: 14.5px; font-weight: 600; }
.cat-count { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.cat-row svg { width: 15px; height: 15px; color: #C3BAAD; }

.cat-form { display: grid; gap: 16px; }

/* ---------- 设置 ---------- */

.sections { display: grid; gap: 16px; padding: 8px 16px 0; }

.section {
  padding: 14px 14px 4px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.section h3 {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--muted);
}
.section .field { margin-bottom: 12px; }

.row-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 0;
  border: none;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.row-btn svg { width: 15px; height: 15px; color: #C3BAAD; margin-left: auto; }
.row-btn.danger { color: #B56B5C; }
.row-sub { margin-left: auto; font-size: 11px; color: var(--muted); letter-spacing: .02em; }
.row-btn.danger .row-sub { color: #C99789; }
.row-static {
  display: flex;
  align-items: center;
  padding: 13px 0;
  font-size: 14px;
  border-top: 1px solid var(--line);
}
.row-static:first-of-type { border-top: none; }

.about {
  margin: 0 0 12px;
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
}
.about .warn { color: #B56B5C; }

/* ---------- 回忆时间轴 ---------- */

.timeline { position: relative; padding: 4px 16px 8px 40px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 26px; top: 10px; bottom: 24px;
  width: 2px;
  border-radius: 1px;
  background: rgba(44, 42, 38, .13);
}

.tl-month {
  margin: 18px 0 10px -24px;
  font-family: var(--serif);
  font-size: 12.5px;
  letter-spacing: .12em;
  color: var(--muted);
}
.tl-item { position: relative; margin-bottom: 12px; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -16px; top: 20px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 3px var(--cream);
}
.tl-card {
  display: block;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.tl-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .06em;
}
.tl-emoji { font-size: 13px; }
.tl-date { font-family: var(--serif); letter-spacing: .04em; }
.tl-cat { margin-left: auto; }
.tl-title { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.4; }
.tl-memory {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tl-photos { display: flex; gap: 5px; margin-top: 9px; }
.tl-photos img {
  width: 54px; height: 54px;
  object-fit: cover;
  border-radius: 7px;
  background: var(--cream-2);
}

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

.tabbar {
  position: fixed;
  z-index: 35;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 7px 0 calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 249, .94);
  backdrop-filter: blur(14px);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 3px 0;
  color: #A79E91;
  font-size: 9.5px;
  letter-spacing: .1em;
}
.tab svg { width: 21px; height: 21px; }
.tab.active { color: var(--coral); }

.fab {
  position: fixed;
  z-index: 40;
  right: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border: none;
  border-radius: 50%;
  background: var(--coral);
  color: #FFF9F5;
  box-shadow: 0 12px 26px -10px rgba(238, 108, 85, .85), 0 2px 6px rgba(44, 42, 38, .12);
  cursor: pointer;
  transition: transform .16s;
}
.fab:active { transform: scale(.94); }
.fab svg { width: 24px; height: 24px; }

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

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

#modal-root { position: fixed; inset: 0; z-index: 60; display: none; }
#modal-root.show { display: block; }

.backdrop {
  position: absolute;
  inset: 0;
  background: rgba(44, 42, 38, .45);
  animation: fade .2s ease both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  max-height: 86dvh;
  overflow-y: auto;
  padding: 20px 20px calc(22px + env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: var(--cream);
  box-shadow: 0 -24px 50px -24px rgba(44, 42, 38, .5);
  animation: sheetUp .3s cubic-bezier(.2, .9, .25, 1) both;
}
@keyframes sheetUp {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}

.sheet h2 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .03em;
}
.sheet-sub {
  margin: 0 0 18px;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
}
.sheet-actions { display: grid; gap: 9px; margin-top: 20px; }
.sheet .field { margin-bottom: 16px; }
.sheet .btn-text { margin-top: 4px; }

/* ---------- 轻提示 ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 80;
  transform: translate(-50%, 8px);
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(44, 42, 38, .93);
  color: #FFF8EE;
  font-size: 12.5px;
  letter-spacing: .02em;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
  white-space: nowrap;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 动效偏好 ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
