:root {
  color: #4a2432;
  background: #fff5f8;
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #fff5f8;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18px 18px, rgba(255, 190, 205, 0.45) 0 2px, transparent 2px 100%),
    linear-gradient(145deg, #fff5f8 0%, #fffaf0 44%, #f2fbf6 100%);
  background-size: 34px 34px, auto;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  content: "";
  pointer-events: none;
}

body::before {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 137, 170, 0.12) 1px, transparent 1px),
    linear-gradient(rgba(255, 137, 170, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 82%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(236, 72, 153, 0.26);
  outline-offset: 2px;
}

.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 16px 108px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -18px -16px 16px;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  background: rgba(255, 245, 248, 0.88);
  border-bottom: 1px solid rgba(255, 137, 170, 0.18);
  backdrop-filter: blur(18px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.brand-lockup span:last-child {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.brand-lockup strong {
  overflow: hidden;
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-lockup em {
  overflow: hidden;
  color: #965167;
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-mark {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 50px;
  height: 44px;
  border: 1px solid rgba(244, 114, 182, 0.22);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 9px 20px rgba(236, 72, 153, 0.18);
  overflow: hidden;
}

.cat-mark img {
  width: 46px;
  height: 42px;
  object-fit: contain;
}

.role-switch {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(236, 72, 153, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 26px rgba(168, 85, 117, 0.13);
}

.role-switch button,
.tab,
.chip,
.pill,
.tiny-button,
.primary,
.secondary {
  min-height: 40px;
  border-radius: 999px;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.role-switch button {
  padding: 0 12px;
  background: transparent;
  color: #7b4056;
  font-size: 13px;
  font-weight: 700;
}

.role-switch .active {
  background: #ec4899;
  color: #fff;
  box-shadow: 0 8px 16px rgba(236, 72, 153, 0.22);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: #4a2432;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  color: #4a2432;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

h3 {
  color: #4a2432;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
}

.muted,
.hero-copy p {
  color: #7e5362;
  font-size: 13px;
  line-height: 1.55;
}

.eyebrow {
  color: #ec4899;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-card,
.panel,
.list-item {
  border: 1px solid rgba(236, 72, 153, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 42px rgba(168, 85, 117, 0.13);
}

.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 14px;
  min-height: 214px;
  padding: 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 232, 241, 0.86)),
    url("/assets/kitty/pink-banner.png") center / cover;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  align-content: center;
}

.ribbon {
  position: absolute;
  right: 58px;
  top: 16px;
  width: 44px;
  height: 28px;
  background: #ff7ca3;
  transform: rotate(-12deg);
}

.ribbon::before,
.ribbon::after {
  position: absolute;
  top: 0;
  width: 30px;
  height: 28px;
  border-radius: 8px 16px 16px 8px;
  background: #ff7ca3;
  content: "";
}

.ribbon::before {
  left: -24px;
  transform: skewY(18deg);
}

.ribbon::after {
  right: -24px;
  transform: skewY(-18deg);
}

.mascot-card {
  position: relative;
  align-self: end;
  width: 148px;
  height: 166px;
}

.hero-kitty {
  position: absolute;
  right: 0;
  bottom: 5px;
  width: 142px;
  height: 142px;
  border-radius: 8px;
  object-fit: contain;
  filter: drop-shadow(0 16px 20px rgba(236, 72, 153, 0.2));
}

.sticker-float {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
}

.sticker-plane {
  left: -18px;
  bottom: -4px;
  width: 78px;
  transform: rotate(-8deg);
  filter: drop-shadow(0 8px 12px rgba(236, 72, 153, 0.18));
}

.panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
}

.hero-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 234, 240, 0.88)),
    #fff;
}

.section {
  margin-top: 14px;
}

.section-head,
.row,
.feed-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-head > div,
.feed-summary > div {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.soft-badge,
.status-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff0c8;
  color: #713c1a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 9px 11px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.metric-card {
  display: grid;
  min-height: 108px;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 12px 28px rgba(168, 85, 117, 0.12);
}

.metric-card span,
.metric-card em {
  color: rgba(74, 36, 50, 0.74);
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}

.metric-card strong {
  color: #4a2432;
  font-size: 30px;
  line-height: 1;
}

.accent-pink {
  background: #ffd6e3;
}

.accent-yellow {
  background: #fff0bd;
}

.accent-mint {
  background: #dff8ef;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.quick-actions button,
.preset-card {
  display: grid;
  align-content: start;
  min-height: 132px;
  gap: 6px;
  border: 1px solid rgba(236, 72, 153, 0.13);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: #4a2432;
  text-align: left;
  box-shadow: 0 12px 26px rgba(168, 85, 117, 0.1);
}

.quick-actions button img {
  justify-self: end;
  width: 72px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(236, 72, 153, 0.14));
}

.quick-actions button:nth-child(2),
.preset-card:nth-child(3n + 2) {
  background: #fff7dc;
}

.quick-actions button:nth-child(3),
.preset-card:nth-child(3n) {
  background: #e9fbf3;
}

.quick-actions strong,
.preset-card strong {
  font-size: 16px;
}

.quick-actions span,
.preset-card span {
  color: #805568;
  font-size: 12px;
  line-height: 1.35;
}

.kitty-banner {
  position: relative;
  display: grid;
  min-height: 168px;
  margin-top: 14px;
  overflow: hidden;
  border-radius: 8px;
  background: #ff7ab0;
  color: #fff;
  box-shadow: 0 18px 42px rgba(236, 72, 153, 0.18);
}

.kitty-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
}

.kitty-banner::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.82), rgba(236, 72, 153, 0.24));
  content: "";
}

.kitty-banner > div {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  gap: 8px;
  max-width: 72%;
  padding: 20px;
}

.kitty-banner h2,
.kitty-banner p,
.kitty-banner .eyebrow {
  color: #fff;
}

.feature-stickers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
}

.feature-stickers article {
  display: grid;
  justify-items: center;
  min-height: 142px;
  border: 1px solid rgba(236, 72, 153, 0.13);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.86);
  text-align: center;
  box-shadow: 0 12px 26px rgba(168, 85, 117, 0.1);
}

.feature-stickers img {
  width: 82px;
  height: 66px;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(236, 72, 153, 0.14));
}

.feature-stickers strong {
  font-size: 13px;
  line-height: 1.2;
}

.feature-stickers span {
  color: #805568;
  font-size: 11px;
  line-height: 1.35;
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-grid.compact .pill {
  flex: 1 1 calc(33.333% - 8px);
}

.pill,
.tab,
.chip,
.tiny-button {
  border: 1px solid rgba(236, 72, 153, 0.14);
  background: rgba(255, 255, 255, 0.82);
  color: #7b4056;
  font-size: 13px;
  font-weight: 800;
  padding: 0 13px;
}

.pill.active,
.tab.active,
.chip.selected {
  border-color: #ec4899;
  background: #ec4899;
  color: #fff;
  box-shadow: 0 10px 20px rgba(236, 72, 153, 0.18);
}

.tiny-button {
  min-height: 34px;
  padding: 0 12px;
  background: #fce7f3;
  color: #9d174d;
  font-size: 12px;
}

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

.primary,
.secondary {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  font-weight: 900;
}

.primary {
  background: #ec4899;
  color: #fff;
  box-shadow: 0 14px 26px rgba(236, 72, 153, 0.23);
}

.secondary {
  border: 1px solid rgba(236, 72, 153, 0.18);
  background: #fff0c8;
  color: #5b3412;
}

.tabs,
.chips,
.favorite-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar,
.chips::-webkit-scrollbar,
.favorite-strip::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
}

.menu-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.menu-item {
  display: grid;
  min-height: 92px;
  align-content: start;
  gap: 6px;
  border: 1px solid rgba(236, 72, 153, 0.14);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #4a2432;
  text-align: left;
  box-shadow: 0 10px 22px rgba(168, 85, 117, 0.08);
}

.menu-item strong {
  font-size: 14px;
  line-height: 1.32;
}

.menu-item span,
.menu-item em {
  color: #8b5e6e;
  font-size: 11px;
  font-style: normal;
  line-height: 1.3;
}

.menu-item em {
  justify-self: start;
  margin-top: auto;
  border-radius: 999px;
  background: #fce7f3;
  color: #be185d;
  font-weight: 900;
  padding: 6px 9px;
}

.menu-item.selected {
  border-color: #ec4899;
  background: #ffe2eb;
  box-shadow: 0 14px 26px rgba(236, 72, 153, 0.16);
}

.feed-summary {
  align-items: stretch;
  border-radius: 8px;
  padding: 12px;
  background: #fff7dc;
}

.feed-summary .secondary {
  width: auto;
  min-width: 124px;
}

.form label {
  display: grid;
  gap: 7px;
}

.form label span {
  color: #7e5362;
  font-size: 12px;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(236, 72, 153, 0.14);
  border-radius: 8px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.92);
  color: #4a2432;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #b18191;
}

.form-error {
  color: #be123c;
  font-size: 13px;
  font-weight: 800;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.status-badge {
  background: #e9fbf3;
  color: #047857;
}

.chips .chip {
  flex: 0 0 auto;
}

.wish-card.is-done {
  opacity: 0.72;
}

.task-list {
  display: grid;
  gap: 9px;
}

.task-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(236, 72, 153, 0.12);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.task-item > span {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #ec4899;
  box-shadow: 0 0 0 5px rgba(236, 72, 153, 0.12);
}

.task-item div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.task-item strong {
  overflow: hidden;
  color: #4a2432;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-item em {
  color: #8b5e6e;
  font-size: 11px;
  font-style: normal;
}

.timeline {
  position: relative;
}

.timeline-item {
  position: relative;
}

.favorite-strip {
  padding-top: 2px;
}

.favorite-strip span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fce7f3;
  color: #9d174d;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
}

.settings-grid {
  display: grid;
  gap: 10px;
}

.settings-grid article {
  display: grid;
  gap: 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
}

.settings-grid strong {
  color: #4a2432;
  font-size: 14px;
}

.settings-grid span {
  color: #7e5362;
  font-size: 13px;
  line-height: 1.4;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px);
  border-top: 1px solid rgba(236, 72, 153, 0.15);
  background: rgba(255, 245, 248, 0.94);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  display: grid;
  min-width: 0;
  min-height: 54px;
  place-items: center;
  gap: 2px;
  border-radius: 8px;
  background: transparent;
  color: #7b4056;
  font-size: 11px;
  font-weight: 800;
}

.bottom-nav svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.bottom-nav span {
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-nav .active {
  background: #ec4899;
  color: #fff;
  box-shadow: 0 10px 18px rgba(236, 72, 153, 0.2);
}

.empty {
  border: 1px dashed rgba(236, 72, 153, 0.2);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.58);
  color: #8b5e6e;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 374px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .topbar {
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .mascot-card {
    display: none;
  }

  .metric-card {
    min-height: 96px;
    padding: 10px;
  }

  .metric-card strong {
    font-size: 26px;
  }

  h1 {
    font-size: 28px;
  }
}

@media (min-width: 760px) {
  .app-shell {
    padding-top: 26px;
  }

  .topbar,
  .bottom-nav {
    border-radius: 0 0 8px 8px;
  }
}

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