:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --ink: #122018;
  --muted: #69766e;
  --line: #e3ebe5;
  --cau: #0f5f3c;
  --cau-dark: #073c27;
  --cau-soft: #eaf5ef;
  --cau-pale: #f5fbf7;
  --warm: #c7783e;
  --bad: #8b5d54;
  --shadow: 0 20px 50px rgba(15, 95, 60, 0.12);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1), background 160ms ease, color 160ms ease, border-color 160ms ease;
}

button:active {
  transform: scale(0.94);
}

.app-shell {
  width: 100vw;
  max-width: none;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.view {
  display: none;
  height: 100vh;
  overflow: hidden;
}

.view.is-active {
  display: block;
}

.home-view {
  padding: 0;
}

.list-view {
  overflow: auto;
  padding: 26px 18px 142px;
  scrollbar-width: none;
}

.list-view::-webkit-scrollbar {
  display: none;
}

.topbar.floating {
  position: absolute;
  z-index: 30;
  top: 10px;
  left: 12px;
  right: auto;
  width: min(calc(100vw - 24px), 410px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  pointer-events: none;
}

.brand-lockup {
  min-width: 0;
  width: 184px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid rgba(227, 235, 229, 0.82);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 28px rgba(15, 95, 60, 0.08);
}

.mascot-button {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(227, 235, 229, 0.9);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 28px rgba(15, 95, 60, 0.09);
  display: grid;
  place-items: center;
  pointer-events: auto;
}

.mascot {
  display: inline-block;
  width: 38px;
  height: 38px;
  background-image: url("./assets/mascot-sprite-transparent.png");
  background-size: 200% 200%;
  background-position: 0 0;
  transform-origin: 50% 78%;
  animation: mascot-breathe 3.6s ease-in-out infinite;
}

.mascot.normal {
  background-position: 0 0;
}

.mascot.happy {
  background-position: 100% 0;
}

.mascot.curious,
.mascot.thinking {
  background-position: 0 100%;
}

.mascot.yummy {
  background-position: 100% 100%;
}

.mascot.is-popping {
  animation: mascot-pop 420ms cubic-bezier(0.2, 1.4, 0.3, 1);
}

.topbar h1 {
  margin: 0;
  font-size: 21px;
  line-height: 1.08;
  letter-spacing: 0;
  white-space: nowrap;
}

.page-head h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--cau);
  font-size: 12px;
  font-weight: 750;
}

.topbar .eyebrow {
  margin-bottom: 3px;
  font-size: 9px;
}

.scope-switch {
  position: relative;
  display: flex;
  justify-self: end;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(227, 235, 229, 0.9);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}

.home-search {
  grid-column: auto;
  position: relative;
  pointer-events: auto;
}

.home-search input {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(227, 235, 229, 0.95);
  border-radius: 999px;
  padding: 0 15px;
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px rgba(15, 95, 60, 0.08);
}

.home-search input:focus {
  border-color: #9bcab0;
  box-shadow: 0 0 0 4px rgba(15, 95, 60, 0.08);
}

.scope-switch::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 3px;
  left: 3px;
  width: 30px;
  height: 32px;
  border-radius: 50%;
  background: var(--cau-dark);
  box-shadow: 0 8px 18px rgba(15, 95, 60, 0.18);
  transform: translateX(var(--scope-x, 0));
  transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.scope-switch[data-scope-active="inside"] {
  --scope-x: 34px;
}

.scope-switch[data-scope-active="outside"] {
  --scope-x: 68px;
}

.scope-switch[data-scope-active="delivery"] {
  --scope-x: 102px;
}

.scope-button {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.scope-button.is-active {
  background: transparent;
  color: #fff;
}

.snap-feed {
  height: 100vh;
  overflow-y: auto;
  padding: 146px 14px 150px;
  scroll-padding-top: 92px;
  scroll-padding-bottom: 144px;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.snap-feed::-webkit-scrollbar {
  display: none;
}

.note-card {
  position: relative;
  z-index: var(--card-z, 1);
  min-height: 48vh;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  padding: 0 0 6px;
  display: grid;
  align-content: center;
  width: min(92vw, 400px);
  margin: 0 auto;
  cursor: pointer;
  opacity: var(--card-opacity, 1);
  transform: scale(var(--card-scale, 1));
  filter: blur(var(--card-blur, 0));
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.22, 1, 0.36, 1), filter 180ms ease;
  will-change: opacity, transform, filter;
}

.note-card:last-child {
  margin-bottom: 132px;
}

.note-photo {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  background: #edf3ef;
  box-shadow: var(--shadow);
  transition: transform 360ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms ease;
}

.aspect-square {
  aspect-ratio: 1;
}

.note-photo img,
.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--cover-position, center);
  transform: scale(var(--cover-scale, 1));
  transform-origin: var(--cover-position, center);
}

.is-image-error {
  position: relative;
}

.is-image-error::after {
  content: "图片加载失败";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  background: #edf3ef;
}

.note-body {
  margin-top: -28px;
  margin-inline: 10px;
  padding: 16px;
  border: 1px solid rgba(227, 235, 229, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(15, 95, 60, 0.1);
}

.note-meta {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.note-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f6f1eb;
  background: var(--cau-pale);
}

.tag-color.default {
  background: var(--cau-pale);
  color: #53625a;
}

.tag-color.green {
  background: #e8f5ef;
  color: #0f5f3c;
}

.tag-color.yellow {
  background: #fff5d8;
  color: #84620f;
}

.tag-color.pink {
  background: #fff0f6;
  color: #bd3d78;
}

.tag-color.blue {
  background: #eef5ff;
  color: #38679d;
}

.tag-color.red {
  background: #fff0ed;
  color: #a74d3f;
}

.note-meta .verdict {
  color: #fff;
  background: var(--cau);
}

.note-meta .verdict.safe {
  background: var(--blue);
  background: #477868;
}

.note-meta .verdict.neutral {
  background: #857762;
  background: #6d7d72;
}

.note-meta .verdict.bad {
  background: var(--bad);
}

.note-body h2 {
  margin: 13px 0 6px;
  font-size: 25px;
  line-height: 1.16;
  letter-spacing: 0;
}

.note-body p {
  margin: 0;
  color: #5f574f;
  color: #53625a;
  font-size: 14px;
  line-height: 1.45;
}

.note-body .note-author,
.drawer-author {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.note-actions {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.icon-pill,
.round-icon {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-height: 38px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(15, 95, 60, 0.06);
}

.icon-pill {
  min-width: 62px;
  border-radius: 999px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1), background 160ms ease, box-shadow 160ms ease;
}

.icon-pill.is-reacting,
.round-icon.is-reacting {
  animation: action-bounce 520ms cubic-bezier(0.2, 1.4, 0.3, 1);
  box-shadow: 0 12px 28px rgba(15, 95, 60, 0.18);
}

.thumb-up.is-reacting {
  background: #ddf3e7;
}

.thumb-down.is-reacting {
  background: #f9e6e1;
}

.round-icon.is-reacting {
  background: #fff0f6;
  color: #d94886;
}

.is-count-popping {
  display: inline-block;
  animation: count-pop 440ms cubic-bezier(0.2, 1.4, 0.3, 1);
}

.icon-pill:active,
.round-icon:active,
.nav-button:active,
.scope-button:active {
  transform: scale(0.9);
}

.thumb-up:active {
  background: var(--cau-soft);
  color: var(--cau);
}

.thumb-down:active {
  background: #f6eeee;
  color: var(--bad);
}

.thumb-up.is-voted {
  border-color: #b9dcc8;
  background: var(--cau-soft);
  color: var(--cau);
}

.thumb-down.is-voted {
  border-color: #e3c9c4;
  background: #f8eeee;
  color: var(--bad);
}

.round-icon {
  margin-left: auto;
  width: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.card-reaction-mascot {
  position: absolute;
  left: var(--mascot-x, 32px);
  bottom: 44px;
  width: 48px;
  height: 48px;
  opacity: 0;
  transform: translate(-50%, 8px) scale(0.84);
  filter: drop-shadow(0 10px 18px rgba(15, 95, 60, 0.14));
  transition: opacity 160ms ease, transform 180ms cubic-bezier(0.2, 1.3, 0.3, 1);
  pointer-events: none;
}

.card-reaction-mascot.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1.08);
}

.card-reaction-mascot.is-popping {
  animation: card-mascot-pop 520ms cubic-bezier(0.2, 1.35, 0.3, 1);
}

.round-icon.is-saved {
  color: #d94886;
  border-color: #f4bed4;
  background: #fff0f6;
  animation: heart-pop 360ms cubic-bezier(0.2, 1.35, 0.32, 1);
}

.page-head {
  margin-bottom: 18px;
}

.rank-list,
.saved-list,
.column-list {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.column-list {
  display: grid;
  gap: 10px;
  border: 0;
  background: transparent;
}

.column-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 95, 60, 0.08);
}

.column-card h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.column-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.feedback-card {
  display: grid;
  gap: 10px;
}

.feedback-card textarea {
  width: 100%;
  resize: vertical;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  outline: none;
  color: var(--ink);
  background: #fff;
}

.feedback-card textarea:focus {
  border-color: #9bcab0;
  box-shadow: 0 0 0 4px rgba(15, 95, 60, 0.08);
}

.feedback-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.feedback-actions button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--cau-dark);
  color: #fff;
  padding: 0 16px;
  font-weight: 800;
}

.column-link {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.column-link span {
  color: var(--muted);
  font-size: 12px;
}

.column-link:last-child {
  border-bottom: 0;
}

.rank-row,
.saved-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.rank-row {
  grid-template-columns: 34px 58px 1fr auto;
}

.saved-row {
  grid-template-columns: 58px 1fr auto;
}

.rank-row:last-child,
.saved-row:last-child {
  border-bottom: 0;
}

.rank-num {
  color: var(--cau);
  font-weight: 850;
  text-align: center;
}

.thumb {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  overflow: hidden;
  background: #edf3ef;
}

.row-title {
  margin: 0;
  font-size: 16px;
  font-weight: 780;
}

.row-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.row-score {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.empty {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
}

.mascot-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.mascot-empty .mascot {
  width: 58px;
  height: 58px;
}

.mascot-empty p {
  margin: 0;
}

.submit-card {
  display: grid;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.dev-editor {
  display: grid;
  gap: 12px;
}

.image-picker {
  display: block;
  cursor: pointer;
}

.form-hint,
.access-badge {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.access-badge.is-active {
  color: var(--cau);
  font-weight: 750;
}

.access-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
}

.access-actions button {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  padding: 0 10px;
}

.image-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

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

.image-thumb,
.image-add,
.draft-preview-photo {
  aspect-ratio: 1;
  min-height: 0;
  border-radius: 8px;
}

.image-thumb {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #edf3ef;
  padding: 0;
  cursor: pointer;
  display: block;
}

.image-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.image-cover-hit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.image-cover-hit span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(7, 60, 39, 0.86);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
}

.image-remove {
  position: absolute;
  right: 5px;
  top: 5px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 32, 24, 0.72);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.image-thumb.is-cover {
  border-color: var(--cau);
  box-shadow: 0 0 0 3px rgba(15, 95, 60, 0.12);
}

.image-thumb.is-dragging {
  opacity: 0.55;
}

.cover-tools {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.cover-stage {
  position: relative;
  height: 230px;
  border-radius: 10px;
  background: rgba(7, 60, 39, 0.14);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.cover-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(18, 32, 24, 0.18);
}

.cover-frame {
  position: relative;
  z-index: 1;
  height: 204px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  outline: 2px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 999px rgba(18, 32, 24, 0.26);
  background: #edf3ef;
}

.cover-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--cover-position, center);
  transform: scale(var(--cover-scale, 1));
  transform-origin: var(--cover-position, center);
}


.cover-sliders {
  display: grid;
  gap: 8px;
}

.cover-sliders label {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.cover-sliders input {
  width: 100%;
  accent-color: var(--cau);
}

.image-add,
.draft-preview-photo {
  border: 1px dashed #bdd7c9;
  background: linear-gradient(145deg, #f5fbf7, #eef5f1);
  color: var(--cau);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 850;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 0.86fr;
  gap: 10px;
}

.dev-editor input[type="text"],
.dev-editor input:not([type]),
.dev-editor textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

.dev-editor textarea {
  resize: vertical;
}

.channel-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.channel-picker label {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #fff;
}

.channel-picker input {
  position: absolute;
  opacity: 0;
}

.channel-picker label:has(input:checked) {
  border-color: #b9dcc8;
  background: var(--cau-soft);
  color: var(--cau);
  font-weight: 780;
}

.editor-actions {
  display: grid;
  grid-template-columns: 0.78fr 1fr 1fr;
  gap: 10px;
}

.editor-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--cau-dark);
  color: #fff;
  cursor: pointer;
}

.editor-actions button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.editor-actions .ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--cau);
}

.manage-panel {
  margin-top: 18px;
}

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

.mini-filter {
  display: flex;
  gap: 5px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.mini-filter button,
.manage-actions button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.mini-filter button {
  width: 30px;
  height: 30px;
}

.mini-filter button.is-active {
  background: var(--cau-soft);
  color: var(--cau);
  font-weight: 800;
}

.manage-list {
  display: grid;
  gap: 8px;
}

.manage-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: grab;
}

.manage-row.is-dragging {
  opacity: 0.5;
}

.manage-actions {
  display: flex;
  gap: 4px;
}

.manage-actions button {
  width: 30px;
  height: 30px;
  background: var(--cau-pale);
  display: grid;
  place-items: center;
  color: var(--cau);
}

.manage-actions svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.manage-owner-note {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.draft-preview {
  margin-top: 14px;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 95, 60, 0.08);
}

.draft-preview-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.preview-thumb {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #edf3ef;
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.submit-card label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.submit-card input,
.submit-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

.submit-card input:focus,
.submit-card textarea:focus {
  border-color: #88b89d;
  box-shadow: 0 0 0 4px rgba(15, 95, 60, 0.08);
}

.submit-card button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--cau-dark);
  color: #fff;
  cursor: pointer;
}

.bottom-nav {
  position: absolute;
  z-index: 8;
  left: 10px;
  right: auto;
  width: min(calc(100vw - 20px), 410px);
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 4px;
  height: 62px;
  padding: 7px;
  border: 1px solid rgba(235, 227, 216, 0.9);
  border-color: rgba(227, 235, 229, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  box-shadow: 0 14px 34px rgba(15, 95, 60, 0.14);
}

.bottom-nav::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 7px;
  left: 7px;
  width: calc((100% - 30px) / 5);
  height: 48px;
  border-radius: 999px;
  background: var(--cau-soft);
  box-shadow: 0 10px 24px rgba(15, 95, 60, 0.1);
  transform: translateX(var(--nav-x, 0));
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1), width 220ms ease, background 160ms ease;
}

.bottom-nav[data-active="rank"] {
  --nav-x: calc(100% + 4px);
}

.bottom-nav[data-active="column"] {
  --nav-x: calc(300% + 12px);
}

.bottom-nav[data-active="saved"] {
  --nav-x: calc(400% + 16px);
}

.nav-button {
  position: relative;
  z-index: 1;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: grid;
  grid-template-rows: 1fr;
  gap: 0;
  place-items: center;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
  min-width: 0;
}

.nav-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.nav-button span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.nav-button.is-active {
  color: var(--cau);
  background: transparent;
}

.nav-button.is-active::after {
  content: "";
  position: absolute;
  bottom: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.nav-button.add.is-active::after {
  display: none;
}

.nav-button.add {
  color: #fff;
  background: var(--cau-dark);
  box-shadow: 0 10px 22px rgba(15, 95, 60, 0.18);
  transform: translateY(-8px);
  height: 54px;
}

.nav-button.add.is-active {
  color: #fff;
  background: var(--cau);
}

.drawer-backdrop {
  position: absolute;
  z-index: 10;
  inset: 0;
  background: rgba(11, 45, 30, 0.18);
  backdrop-filter: blur(3px);
}

.detail-drawer {
  position: absolute;
  z-index: 11;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px 18px 92px;
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(18px);
  transform: translateY(105%);
  transition: transform 220ms ease;
  box-shadow: 0 -18px 48px rgba(15, 95, 60, 0.16);
  max-height: 82vh;
  overflow: auto;
  scrollbar-width: none;
  visibility: hidden;
}

.detail-drawer.is-open {
  transform: translateY(0);
  visibility: visible;
}

.detail-drawer::-webkit-scrollbar {
  display: none;
}

.drawer-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f5f0ea;
  background: var(--cau-pale);
  color: var(--muted);
}

.drawer-kicker {
  margin: 0 0 8px;
  color: var(--cau);
  font-size: 12px;
  font-weight: 750;
}

.drawer-head {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 42px 14px 0;
}

.drawer-head .drawer-mascot {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
}

.detail-drawer h2 {
  margin: 0;
  font-size: 24px;
}

.drawer-gallery {
  display: flex;
  gap: 10px;
  margin: 4px -18px 16px;
  padding: 0 18px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.drawer-gallery::-webkit-scrollbar {
  display: none;
}

.gallery-card {
  flex: 0 0 82%;
  aspect-ratio: 1.05;
  border: 1px solid var(--line);
  border-radius: 12px;
  scroll-snap-align: center;
  box-shadow: 0 12px 28px rgba(15, 95, 60, 0.12);
  overflow: hidden;
  background: #edf3ef;
}

.gallery-card.is-photo {
  display: block;
}

.gallery-card.is-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--photo-position, center);
}

.gallery-card.is-placeholder {
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #eef1ef, #dfe5e1);
  color: rgba(83, 98, 90, 0.46);
  font-size: 22px;
  font-weight: 850;
}

.drawer-tags {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.drawer-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--cau-pale);
  color: #53625a;
  font-size: 12px;
}

.detail-drawer p {
  color: #514b45;
  line-height: 1.55;
}

.drawer-mini {
  display: flex;
  gap: 16px;
  color: var(--muted);
  font-size: 13px;
}

.toast {
  position: absolute;
  z-index: 12;
  left: 50%;
  bottom: 92px;
  transform: translate(-50%, 12px);
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(37, 35, 31, 0.9);
  background: rgba(7, 60, 39, 0.92);
  color: #fff;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

@keyframes mascot-breathe {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-2px) rotate(-1deg);
  }
}

@keyframes heart-pop {
  0% {
    transform: scale(1);
  }
  44% {
    transform: scale(1.22) rotate(-6deg);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes action-bounce {
  0% {
    transform: scale(1);
  }
  34% {
    transform: scale(1.2) translateY(-2px);
  }
  62% {
    transform: scale(0.94);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes count-pop {
  0% {
    transform: translateY(0) scale(1);
  }
  42% {
    transform: translateY(-5px) scale(1.3);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes mascot-pop {
  0% {
    transform: scale(1) rotate(0deg);
  }
  42% {
    transform: scale(1.18) rotate(-4deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

@keyframes card-mascot-pop {
  0% {
    transform: translate(-50%, 0) scale(0.9) rotate(0deg);
  }
  42% {
    transform: translate(-50%, -3px) scale(1.2) rotate(-4deg);
  }
  100% {
    transform: translate(-50%, 0) scale(1.08) rotate(0deg);
  }
}

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

.bulk-shell {
  overflow: auto;
}

.bulk-view {
  height: auto;
  min-height: 100vh;
  padding-bottom: 42px;
}

.bulk-page-head {
  display: grid;
  gap: 6px;
}

.bulk-subtitle,
.bulk-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.bulk-panel,
.bulk-list-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.bulk-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.bulk-panel textarea,
.bulk-panel input,
.bulk-fields input,
.bulk-fields select,
.bulk-fields textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

.bulk-panel textarea {
  min-height: 220px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.bulk-help {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.bulk-help code,
.bulk-hint code {
  border-radius: 999px;
  background: var(--cau-pale);
  color: var(--cau);
  padding: 3px 7px;
  font-family: inherit;
  font-size: 12px;
}

.bulk-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.bulk-quick-start {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bulk-quick-start button,
.bulk-advanced button,
.bulk-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--cau-dark);
  color: #fff;
  cursor: pointer;
}

.bulk-quick-start button:first-child,
.bulk-advanced button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--cau);
}

.bulk-advanced {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
}

.bulk-advanced summary {
  color: var(--cau);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.bulk-advanced[open] {
  gap: 12px;
}

.bulk-advanced[open] > * + * {
  margin-top: 12px;
}

.bulk-list {
  display: grid;
  gap: 12px;
}

.bulk-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(15, 95, 60, 0.08);
}

.bulk-card.is-imported {
  border-color: #b9dcc8;
  background: #fbfffd;
}

.bulk-card.is-failed {
  border-color: #e3c9c4;
  background: #fffafa;
}

.bulk-select {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.bulk-card-grid {
  display: grid;
  gap: 12px;
}

.bulk-cover {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: #edf3ef;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.bulk-image-button {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  min-height: 36px;
  border-radius: 999px;
  background: rgba(7, 60, 39, 0.88);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 820;
  cursor: pointer;
}

.bulk-image-button input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bulk-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: var(--cover-position, center);
  transform: scale(var(--cover-scale, 1));
  transform-origin: var(--cover-position, center);
}

.bulk-cover.is-missing {
  border: 1px dashed #bdd7c9;
  background: linear-gradient(145deg, #f5fbf7, #eef5f1);
}

.bulk-fields {
  display: grid;
  gap: 10px;
}

.bulk-image-tools {
  display: grid;
  gap: 10px;
}

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

.bulk-thumb {
  position: relative;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #edf3ef;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
}

.bulk-thumb.is-cover {
  border-color: var(--cau);
  box-shadow: 0 0 0 3px rgba(15, 95, 60, 0.12);
}

.bulk-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.bulk-thumb span {
  position: absolute;
  right: 4px;
  bottom: 4px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(7, 60, 39, 0.86);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
}

.bulk-crop-controls {
  display: grid;
  gap: 7px;
}

.bulk-crop-controls label {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.bulk-crop-controls input {
  width: 100%;
  accent-color: var(--cau);
}

.bulk-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.bulk-meta [data-status] {
  color: var(--cau);
  font-weight: 800;
  text-align: right;
}

@media (min-width: 760px) {
  body {
    display: grid;
    place-items: center;
    padding: 28px;
  }

  .app-shell {
    width: 430px;
    max-width: 430px;
    margin: 0 auto;
    min-height: 844px;
    height: 844px;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(31, 25, 17, 0.12);
  }

  .view,
  .snap-feed {
    height: 844px;
  }

  .bulk-shell {
    width: min(100vw - 56px, 980px);
    height: auto;
    min-height: 844px;
  }

  .bulk-actions {
    grid-template-columns: 1fr;
  }

  .bulk-card-grid {
    grid-template-columns: 180px 1fr;
    align-items: start;
  }
}
