* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #fff8fa;
  color: #4f3b42;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

button,
input,
textarea {
  font: inherit;
}

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

.shell {
  width: min(430px, 100%);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: linear-gradient(180deg, #fff5f7 0%, #fff8fa 45%, #ffffff 100%);
  box-shadow: 0 0 48px rgba(232, 93, 139, 0.12);
}

@media (max-width: 430px) {
  .shell {
    width: 100%;
    box-shadow: none;
  }
}

.page {
  min-height: calc(100vh - 72px - env(safe-area-inset-bottom));
  min-height: calc(100dvh - 72px - env(safe-area-inset-bottom));
  padding: 24px 18px calc(96px + env(safe-area-inset-bottom));
}

.hero {
  padding: 24px 20px;
  border-radius: 16px;
  background: #ffd6e0;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "♡";
  position: absolute;
  right: 18px;
  bottom: -20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 112px;
  line-height: 1;
}

.eyebrow {
  color: #e85d8b;
  font-size: 13px;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

h1 {
  margin: 8px 0 0;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: 0;
  position: relative;
  z-index: 1;
}

.subtitle {
  margin: 10px 0 0;
  color: #7b6269;
  font-size: 15px;
  line-height: 1.55;
  position: relative;
  z-index: 1;
}

.card {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #ffe4ec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(232, 93, 139, 0.08);
}

.card-title {
  font-size: 18px;
  font-weight: 900;
}

.muted {
  color: #8a6b72;
  font-size: 13px;
}

.field-label {
  margin-top: 12px;
  color: #8a6b72;
  font-size: 13px;
  font-weight: 800;
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #fff5f7;
  color: #e85d8b;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.primary,
.secondary {
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border-radius: 16px;
  font-weight: 900;
}

.primary {
  background: #ff8fb0;
  color: #ffffff;
}

.secondary {
  border: 1px solid #ffd6e0;
  background: #fff5f7;
  color: #e85d8b;
}

.mini {
  min-width: 72px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ff8fb0;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

input,
textarea {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #ffe4ec;
  border-radius: 16px;
  outline: 0;
  background: #fff8fa;
  color: #4f3b42;
}

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

input[type="date"] {
  color-scheme: light;
}

.stat {
  margin: 12px 0 4px;
  color: #e85d8b;
  font-size: 34px;
  font-weight: 900;
}

.list-item {
  padding: 15px 0;
  border-bottom: 1px solid #fff0f4;
}

.list-item:last-child {
  border-bottom: 0;
}

.mood {
  min-height: 96px;
  padding: 18px 8px;
  border: 1px solid #ffe4ec;
  border-radius: 16px;
  background: #fff;
  text-align: center;
  font-weight: 900;
}

.mood.active {
  border-color: #ff8fb0;
  background: #fff0f4;
  color: #e85d8b;
}

.emoji {
  display: block;
  margin-bottom: 6px;
  font-size: 34px;
}

.task-title {
  margin-top: 12px;
  font-size: 18px;
  font-weight: 900;
}

.score,
.point {
  color: #e85d8b;
  font-size: 26px;
  font-weight: 900;
}

.letter {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: #fff8fa;
  line-height: 1.8;
  white-space: pre-wrap;
}

.timeline {
  margin-top: 18px;
  padding-left: 16px;
  border-left: 3px solid #ffd6e0;
}

.memory-card {
  position: relative;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #ffe4ec;
  border-radius: 16px;
  background: #fff;
}

.memory-card::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 22px;
  width: 13px;
  height: 13px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #ff8fb0;
}

.empty {
  padding: 46px 18px;
  text-align: center;
  color: #8a6b72;
}

.empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #fff5f7;
  color: #ff8fb0;
  font-size: 42px;
  line-height: 72px;
}

.tabbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(430px, 100%);
  transform: translateX(-50%);
  border-top: 1px solid #ffe4ec;
  background: rgba(255, 248, 250, 0.96);
  backdrop-filter: blur(10px);
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 430px) {
  .tabbar {
    width: 100%;
  }
}

.tab {
  min-height: 72px;
  background: transparent;
  color: #8a6b72;
  font-size: 13px;
  font-weight: 800;
}

.tab.active {
  color: #e85d8b;
}

.hidden {
  display: none;
}

.install-banner {
  position: fixed;
  left: 50%;
  bottom: calc(84px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(394px, calc(100% - 36px));
  padding: 14px 16px;
  border: 1px solid #ffe4ec;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(232, 93, 139, 0.16);
  transform: translateX(-50%);
}

.install-banner-text {
  flex: 1;
  color: #4f3b42;
  font-size: 13px;
  line-height: 1.5;
}

.install-banner-action,
.install-banner-close {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.install-banner-action {
  background: #ff8fb0;
  color: #fff;
}

.install-banner-close {
  background: #fff5f7;
  color: #e85d8b;
}

