/* 66 Days – light, friendly, a little anime. Mobile first. */

:root {
  --paper: #F7F9FF;
  --card: #FFFFFF;
  --sky: #E4ECFF;
  --sky-strong: #4C6FFF;
  --dawn: #FFEDE3;
  --ink: #1F2347;
  --ink-2: #5A5F86;
  --ink-3: #9297BA;
  --line: #E2E6F5;
  --fox: #FF8A3D;
  --fox-deep: #E5672A;
  --mint: #12B886;
  --mint-deep: #0C9A6F;
  --mint-soft: #DCF7EC;
  --sakura: #FF6F9F;
  --gold: #FFC23D;
  --hanko: #E03E4C;
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --shadow: 0 1px 0 rgba(31, 35, 71, .04), 0 8px 24px -10px rgba(31, 35, 71, .18);
  --font: "M PLUS Rounded 1c", "SF Pro Rounded", ui-rounded, "Hiragino Maru Gothic ProN", "Nunito", "Quicksand",
    "Varela Round", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabbar-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  scroll-padding-top: 16px;
  scroll-padding-bottom: calc(var(--tabbar-h) + 110px + env(safe-area-inset-bottom, 0px));
}

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 100% 0%, #FFE9DD 0%, rgba(255, 233, 221, 0) 60%),
    linear-gradient(180deg, #E9EFFF 0%, var(--paper) 340px);
  background-color: var(--paper);
  background-attachment: fixed;
  font: 500 18px/1.45 var(--font);
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }

h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--sky-strong); outline-offset: 3px; border-radius: 10px; }
.muted { color: var(--ink-2); }
[hidden] { display: none !important; }

/* --------------------------------------------------------------- Splash (0.4 s) */

.splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #E4ECFF, #FFEDE3);
  animation: none;
}
.splash.done { pointer-events: none; }
.splash-fox { width: 128px; height: 128px; animation: splash-pop .28s cubic-bezier(.3, 1.6, .5, 1) both; }
.splash-ring {
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 6px solid var(--gold);
  animation: splash-ring .4s ease-out both;
}
@keyframes splash-pop { from { transform: scale(.4) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes splash-ring { from { transform: scale(.3); opacity: .9; } to { transform: scale(2.6); opacity: 0; } }
@keyframes splash-out { 0%, 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1.04); } }

/* --------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  min-height: 52px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--r-md);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: transform .08s ease, box-shadow .08s ease, background-color .15s ease;
  user-select: none;
}
.btn-primary {
  background: var(--fox);
  color: #fff;
  box-shadow: 0 5px 0 var(--fox-deep);
}
.btn-primary:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--fox-deep); }
.btn-primary:disabled { background: #F2D2BF; box-shadow: 0 5px 0 #E8BBA0; color: #fff; }
.btn-big { width: 100%; min-height: 60px; font-size: 1.1rem; }
.btn-huge { width: 100%; max-width: 360px; min-height: 76px; font-size: 1.45rem; border-radius: 24px; letter-spacing: .02em; }
.btn-soft { background: var(--sky); color: var(--ink); box-shadow: 0 4px 0 #C9D5F7; }
.btn-soft:active { transform: translateY(3px); box-shadow: 0 1px 0 #C9D5F7; }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-link { background: none; color: var(--sky-strong); min-height: 48px; padding: 8px 4px; }
.btn-link.small { min-height: 40px; font-size: .95rem; }
.btn-danger { background: var(--hanko); color: #fff; box-shadow: 0 5px 0 #B42634; }
.btn-danger-soft { background: #FFECEE; color: #B42634; width: 100%; }
.btn-danger-soft.armed { background: var(--hanko); color: #fff; }
.grow { flex: 1; }

/* --------------------------------------------------------------- Screens (welcome & onboarding) */

.screen {
  max-width: 560px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 28px 20px calc(120px + var(--safe-b));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.manga-title {
  font-weight: 900;
  letter-spacing: -.01em;
  line-height: 1.12;
  text-shadow: .055em .055em 0 rgba(255, 138, 61, .32);
}

.welcome {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-bottom: calc(40px + var(--safe-b));
  position: relative;
}
.sun {
  position: absolute;
  top: 7%;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 61, .55), rgba(255, 194, 61, 0) 68%);
  pointer-events: none;
}
.welcome-fox { width: 190px; height: 190px; margin-bottom: 6px; }
.welcome-title { font-size: clamp(2.2rem, 9vw, 3rem); max-width: 12ch; }
.welcome-sub { color: var(--ink-2); font-size: 1.1rem; margin-bottom: 18px; }
.welcome .btn-huge { animation: breathe 2.4s ease-in-out .6s infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 6px 0 var(--fox-deep), 0 0 0 0 rgba(255, 138, 61, .35); }
  50% { box-shadow: 0 6px 0 var(--fox-deep), 0 0 0 14px rgba(255, 138, 61, 0); }
}

.login { justify-content: center; }
.login-fox { width: 120px; height: 120px; align-self: center; }
.login .screen-title, .login .screen-sub { text-align: center; }
.screen-title { font-size: 1.9rem; font-weight: 900; line-height: 1.15; }
.screen-sub { color: var(--ink-2); }

.login-form, .goal-form { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
label, .label { font-weight: 700; font-size: .95rem; color: var(--ink-2); margin-top: 6px; }
input[type="text"], input[type="password"] {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  font-size: 1.05rem;
  font-weight: 600;
}
input:focus { outline: none; border-color: var(--sky-strong); box-shadow: 0 0 0 4px rgba(76, 111, 255, .15); }
.form-error { color: var(--hanko); font-weight: 700; min-height: 1.4em; font-size: .95rem; }
.login-form .btn { margin-top: 4px; }

.steps { display: flex; gap: 6px; margin-bottom: 8px; }
.step { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.step.on { background: var(--fox); }

.interest-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.interest {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 104px;
  padding: 14px;
  border: 2.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  text-align: left;
  box-shadow: 0 4px 0 var(--line);
  transition: transform .12s ease, border-color .12s ease, background-color .12s ease;
}
.interest:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.interest-icon { font-size: 2rem; line-height: 1; }
.interest-label { font-weight: 800; font-size: 1.02rem; }
.interest .tick {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--fox);
  color: #fff;
  transform: scale(0);
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1);
}
.interest .tick svg { width: 16px; height: 16px; }
.interest.on { border-color: var(--fox); background: #FFF4EC; box-shadow: 0 4px 0 #FFC9A6; }
.interest.on .tick { transform: scale(1); }

.idea-group { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.group-title { font-size: 1.05rem; font-weight: 800; color: var(--ink-2); margin-top: 4px; }

.inline-add { display: flex; gap: 8px; }
.inline-add input { flex: 1; min-width: 0; }

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 20px calc(16px + var(--safe-b));
  background: linear-gradient(180deg, rgba(247, 249, 255, 0), var(--paper) 30%);
}
.sticky-cta .btn-ghost { min-height: 60px; }
.hint {
  background: #FFF6DB;
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: .95rem;
  color: #6B5310;
}

.ready { align-items: center; text-align: center; }
.ready .steps { align-self: stretch; }
.ready-fox { width: 170px; height: 170px; }
.ready .manga-title { font-size: clamp(1.9rem, 8vw, 2.5rem); max-width: 14ch; }
.how { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; text-align: left; width: 100%; }
.how li {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border-radius: var(--r-md);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  font-weight: 700;
}
.how li span { font-size: 1.5rem; }

/* --------------------------------------------------------------- App shell */

.shell { min-height: 100dvh; }
.main {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px calc(var(--tabbar-h) + 96px + var(--safe-b));
}
.page { display: flex; flex-direction: column; gap: 14px; }
.page-title { font-size: 1.75rem; font-weight: 900; margin-top: 4px; }

.top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.hello { font-size: 1.5rem; font-weight: 900; line-height: 1.2; }
.date { color: var(--ink-2); font-size: 1rem; }

.streak {
  flex: none;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 4px;
  align-items: center;
  padding: 8px 12px;
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow);
}
.streak .flame { font-size: 1.4rem; grid-row: 1; filter: grayscale(1) opacity(.45); }
.streak.hot .flame { filter: none; animation: flicker 1.6s ease-in-out infinite; }
.streak-num { font-size: 1.4rem; font-weight: 900; }
.streak-label { grid-column: 1 / -1; font-size: .72rem; font-weight: 700; color: var(--ink-2); text-align: center; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.12) rotate(3deg); } }

/* Hero card with a little manga screentone */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 40%;
  z-index: -1;
  background-image: radial-gradient(rgba(76, 111, 255, .16) 1.3px, transparent 1.6px);
  background-size: 9px 9px;
  -webkit-mask-image: linear-gradient(110deg, transparent 10%, #000 90%);
  mask-image: linear-gradient(110deg, transparent 10%, #000 90%);
}
.hero-win { background: linear-gradient(135deg, #FFF6D8 0%, #FFE7EE 100%); }
.hero-win::before { background-image: radial-gradient(rgba(255, 111, 159, .22) 1.3px, transparent 1.6px); }
.hero-day { display: flex; align-items: baseline; }
.hero-num { font-size: 2.6rem; font-weight: 900; line-height: 1; letter-spacing: -.02em; }
.hero-of { font-size: 1.15rem; font-weight: 800; color: var(--ink-2); margin-left: .3em; }
.hero-big { font-size: 1.6rem; font-weight: 900; line-height: 1.15; padding-right: 64px; }
.hero-sub { color: var(--ink-2); }
.hero-sub.strong { color: var(--ink); font-weight: 800; }

.bar { display: block; height: 14px; border-radius: 7px; background: #EDF0FA; overflow: hidden; }
.bar-fill {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--fox), var(--gold));
  transition: width .6s cubic-bezier(.3, 1.3, .5, 1);
}
.bar-xp { height: 10px; flex: 1; }
.bar-xp .bar-fill { background: linear-gradient(90deg, var(--mint), #5ED6B4); }
.level-row { display: flex; align-items: center; gap: 10px; }
.level-badge {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--gold);
  font-weight: 900;
  font-size: .9rem;
}
.level-num { flex: none; font-size: .85rem; font-weight: 800; color: var(--ink-2); }

/* Hanko – the red seal for a perfect day */
.hanko {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 3.5px solid var(--hanko);
  color: var(--hanko);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .55);
  transform: rotate(-14deg);
  animation: stamp .42s cubic-bezier(.3, 1.5, .5, 1) both;
}
.hanko svg { width: 32px; height: 32px; }
.hanko.big { position: static; width: 74px; height: 74px; margin: 0 auto -8px; }
.hanko.big svg { width: 42px; height: 42px; }
@keyframes stamp { from { transform: scale(2) rotate(-30deg); opacity: 0; } to { transform: rotate(-14deg); opacity: 1; } }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.section-head h2 { font-size: 1.25rem; font-weight: 900; }
.count { font-weight: 800; font-size: .95rem; color: var(--ink-2); }
.count.all { color: var(--mint-deep); }

/* --------------------------------------------------------------- Goal cards */

.goal-list { display: flex; flex-direction: column; gap: 10px; }
.goal, .idea {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 78px;
  padding: 12px 14px 12px 12px;
  border: 2.5px solid transparent;
  border-radius: var(--r-md);
  background: var(--card);
  text-align: left;
  box-shadow: 0 4px 0 var(--line), 0 10px 20px -16px rgba(31, 35, 71, .3);
  transition: background-color .2s ease, border-color .2s ease, transform .1s ease;
}
.goal:active, .idea:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.goal-icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  background: var(--sky);
}
.goal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.goal-title { font-weight: 800; font-size: 1.08rem; line-height: 1.25; overflow-wrap: anywhere; }
.goal-sub { font-size: .88rem; font-weight: 700; color: var(--ink-3); }
.check {
  position: relative;
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 3px solid #CFD5EC;
  display: grid;
  place-items: center;
  color: transparent;
  transition: background-color .2s ease, border-color .2s ease;
}
.check svg { width: 26px; height: 26px; }
.check-path { stroke-dasharray: 24; stroke-dashoffset: 0; }

.goal.is-done, .idea.on { background: var(--mint-soft); border-color: #A8EBD2; box-shadow: 0 4px 0 #B5EBD6; }
.goal.is-done .goal-icon, .idea.on .goal-icon { background: #fff; }
.goal.is-done .goal-sub { color: var(--mint-deep); }
.goal.is-done .check, .idea.on .check { background: var(--mint); border-color: var(--mint); color: #fff; }

.goal.pop { animation: goal-pop .45s cubic-bezier(.3, 1.5, .5, 1); }
.goal.pop .check-path { animation: draw .35s ease-out .05s both; }
.goal.pop .check::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 3px solid var(--mint);
  animation: ring .6s ease-out forwards;
}
.goal.pop .goal-icon { animation: icon-hop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes goal-pop { 0% { transform: scale(.96); } 45% { transform: scale(1.035); } 100% { transform: none; } }
@keyframes draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes ring { from { transform: scale(1); opacity: 1; } to { transform: scale(1.9); opacity: 0; } }
@keyframes icon-hop { 0% { transform: none; } 40% { transform: translateY(-8px) rotate(-8deg) scale(1.12); } 100% { transform: none; } }

.goal-edit .chev { flex: none; width: 24px; height: 24px; color: var(--ink-3); }
.goal-edit .chev svg { width: 24px; height: 24px; }
.add-pill {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--fox);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 20px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .7);
  border: 2px dashed var(--line);
}
.empty-title { font-weight: 800; font-size: 1.05rem; }

/* --------------------------------------------------------------- Progress */

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: var(--shadow);
}
.stat-icon { grid-row: 1 / 3; font-size: 1.8rem; }
.stat-value { font-size: 1.45rem; font-weight: 900; line-height: 1.1; }
.stat-label { font-size: .85rem; font-weight: 700; color: var(--ink-2); line-height: 1.2; }

.grid66 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.cell {
  aspect-ratio: 1;
  min-height: 44px;
  border-radius: 14px;
  border: 2px solid transparent;
  display: grid;
  place-items: center;
  padding: 0;
  font-weight: 800;
  font-size: .95rem;
  background: var(--card);
  color: var(--ink-2);
}
.cell.s-done { border: 3px solid var(--hanko); color: var(--hanko); background: #FFF5F5; }
.cell-stamp { display: grid; place-items: center; width: 64%; height: 64%; transform: rotate(-12deg); }
.cell-stamp svg { width: 100%; height: 100%; }
.cell.s-partial { background: linear-gradient(0deg, var(--mint-soft) 50%, var(--card) 50%); border-color: #A8EBD2; color: var(--mint-deep); }
.cell.s-missed { background: #EEF0F8; color: #A2A7C6; }
.cell.s-rest { background: #F1F3F9; color: #C0C4DA; }
.cell.s-open { background: var(--card); border: 3px solid var(--fox); color: var(--ink); }
.cell.s-future { background: transparent; border: 2px dashed #CDD2E8; color: #BCC1DA; }
.cell.today { box-shadow: 0 0 0 4px rgba(255, 138, 61, .25); }

.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .88rem; font-weight: 700; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 18px; height: 18px; border-radius: 6px; display: inline-block; border: 2px solid transparent; }
.swatch.s-done { border-color: var(--hanko); background: #FFF5F5; }
.swatch.s-partial { background: linear-gradient(0deg, var(--mint-soft) 50%, #fff 50%); border-color: #A8EBD2; }
.swatch.s-missed { background: #EEF0F8; }
.swatch.s-rest { background: #F1F3F9; }
.swatch.s-future { border: 2px dashed #CDD2E8; }

/* --------------------------------------------------------------- Goals page & forms */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 42px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--card);
  font-weight: 700;
  font-size: .95rem;
}
.chip.on { border-color: var(--fox); background: #FFF4EC; color: var(--fox-deep); }
.chip.static { display: inline-flex; align-items: center; }

.settings { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }

.days-picker { display: flex; flex-direction: column; gap: 10px; }
.days-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-dot {
  aspect-ratio: 1;
  min-height: 40px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  background: var(--card);
  font-weight: 900;
  color: var(--ink-3);
  padding: 0;
}
.day-dot.on { background: var(--fox); border-color: var(--fox); color: #fff; }

.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.icon-opt {
  aspect-ratio: 1;
  min-height: 44px;
  border-radius: 14px;
  border: 2.5px solid transparent;
  background: var(--sky);
  font-size: 1.4rem;
  padding: 0;
}
.icon-opt.on { border-color: var(--fox); background: #FFF4EC; }
.goal-form .btn-primary { margin-top: 12px; }

/* --------------------------------------------------------------- Tab bar & fox */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 8px 10px calc(8px + var(--safe-b)) 96px;
  min-height: calc(var(--tabbar-h) + var(--safe-b));
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -8px 30px -12px rgba(31, 35, 71, .25);
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-weight: 800;
  font-size: .82rem;
  border-radius: 16px;
  padding: 4px 0;
}
.tab-icon { width: 46px; height: 32px; border-radius: 12px; display: grid; place-items: center; transition: background-color .15s ease; }
.tab-icon svg { width: 24px; height: 24px; }
.tab.on { color: var(--ink); }
.tab.on .tab-icon { background: var(--sky); color: var(--sky-strong); }

.fox {
  position: fixed;
  z-index: 35;
  left: calc(max(0px, (100vw - 560px) / 2) + 6px);
  bottom: calc(var(--tabbar-h) - 30px + var(--safe-b));
  width: 86px;
  height: 86px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 50%;
}
.fox-art, .fox-art svg { display: block; width: 100%; height: 100%; }
.fox .fox-svg { overflow: visible; }
.fox .fox-tail { transform-origin: 78px 96px; animation: wag 2.6s ease-in-out infinite; }
.fox .fox-head { transform-origin: 60px 78px; animation: bob 3.2s ease-in-out infinite; }
.fox .fox-eyes { transform-origin: 60px 49px; animation: blink 5s infinite; }
.fox[data-mood="ecstatic"] .fox-tail { animation-duration: .7s; }
.fox[data-mood="ecstatic"] .fox-sparkles { animation: twinkle 1.2s ease-in-out infinite; transform-origin: center; }
.fox[data-mood="sad"] .fox-head { animation: none; transform: rotate(-4deg) translateY(2px); }
.fox[data-mood="sleepy"] .fox-z { animation: float-z 2.4s ease-in-out infinite; }
.fox.jump { animation: fox-jump .55s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes wag { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(8deg); } }
@keyframes bob { 0%, 100% { transform: none; } 50% { transform: translateY(1.5px) rotate(1.5deg); } }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes float-z { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-4px); opacity: .5; } }
@keyframes fox-jump {
  0% { transform: none; }
  30% { transform: translateY(-26px) scale(1.08, .94) rotate(-6deg); }
  60% { transform: translateY(0) scale(1.1, .88); }
  100% { transform: none; }
}

.fox-bubble {
  position: fixed;
  z-index: 36;
  left: calc(max(0px, (100vw - 560px) / 2) + 84px);
  bottom: calc(var(--tabbar-h) + 30px + var(--safe-b));
  max-width: min(250px, calc(100vw - 110px));
  padding: 10px 14px;
  border-radius: 18px 18px 18px 4px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.3;
  opacity: 0;
  transform: translateY(8px) scale(.9);
  transform-origin: 0 100%;
  pointer-events: none;
  transition: opacity .18s ease, transform .22s cubic-bezier(.3, 1.5, .5, 1);
}
.fox-bubble.show { opacity: 1; transform: none; }
body:not([data-view="app"]) .fox-bubble { display: none; }

/* --------------------------------------------------------------- Sheets */

.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(31, 35, 71, .38); opacity: 0; transition: opacity .25s ease; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 18px calc(24px + var(--safe-b));
  border-radius: 28px 28px 0 0;
  background: var(--paper);
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.2, .9, .3, 1);
}
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--sky);
  display: grid;
  place-items: center;
  padding: 0;
}
.sheet-close svg { width: 22px; height: 22px; }
.sheet-title { font-size: 1.5rem; font-weight: 900; padding-right: 52px; }
.sheet-sub { color: var(--ink-2); margin-top: -6px; }
.sheet .group-title { margin-top: 10px; }

/* --------------------------------------------------------------- Celebration */

.celebration {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 45%, rgba(255, 246, 216, .97), rgba(255, 231, 238, .95) 70%);
  opacity: 0;
  transition: opacity .2s ease;
  overflow: hidden;
}
.celebration.open { opacity: 1; }
.celebration-rays {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 1400px;
  height: 1400px;
  margin: -700px 0 0 -700px;
  background: repeating-conic-gradient(rgba(255, 194, 61, .28) 0 6deg, transparent 6deg 18deg);
  -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 55%);
  mask-image: radial-gradient(circle, #000 10%, transparent 55%);
  animation: spin 18s linear infinite;
}
.celebration-card {
  position: relative;
  width: min(380px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  padding: 26px 22px 24px;
  border-radius: 32px;
  background: #fff;
  box-shadow: 0 30px 60px -20px rgba(31, 35, 71, .35);
  transform: scale(.7);
  transition: transform .38s cubic-bezier(.3, 1.6, .5, 1);
}
.celebration.open .celebration-card { transform: none; }
.celebration-fox { width: 150px; height: 150px; animation: fox-cheer 1s ease-in-out infinite; }
.celebration .manga-title { font-size: 2.3rem; }
.celebration p { font-weight: 700; color: var(--ink-2); }
.celebration .btn { margin-top: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fox-cheer { 0%, 100% { transform: none; } 50% { transform: translateY(-8px) rotate(3deg); } }

/* --------------------------------------------------------------- Effects */

.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 70; }

.speed-burst {
  position: fixed;
  left: var(--x);
  top: var(--y);
  z-index: 40;
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  border-radius: 50%;
  pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 194, 61, .75) 0 1.6deg, transparent 1.6deg 7deg);
  -webkit-mask-image: radial-gradient(circle, transparent 10%, #000 16%, #000 30%, transparent 52%);
  mask-image: radial-gradient(circle, transparent 10%, #000 16%, #000 30%, transparent 52%);
  animation: speed .55s ease-out forwards;
}
@keyframes speed { from { transform: scale(.35) rotate(0); opacity: 1; } to { transform: scale(1.15) rotate(8deg); opacity: 0; } }

.float-text {
  position: fixed;
  left: var(--x);
  top: var(--y);
  z-index: 71;
  pointer-events: none;
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--mint-deep);
  text-shadow: 0 2px 0 #fff, 2px 0 0 #fff, -2px 0 0 #fff, 0 -2px 0 #fff;
  white-space: nowrap;
  translate: -50% 0;
  animation: float-up 1.1s cubic-bezier(.2, .8, .3, 1) forwards;
}
.float-text.gold { color: var(--fox-deep); font-size: 1.7rem; }
@keyframes float-up {
  0% { transform: translateY(10px) scale(.6); opacity: 0; }
  20% { transform: translateY(-6px) scale(1.15); opacity: 1; }
  100% { transform: translateY(-70px) scale(1); opacity: 0; }
}

/* --------------------------------------------------------------- Toast & loading */

.toast {
  position: fixed;
  left: 50%;
  top: calc(14px + env(safe-area-inset-top, 0px));
  z-index: 80;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  transform: translate(-50%, calc(-100% - 40px));
  visibility: hidden;
  transition: transform .25s cubic-bezier(.3, 1.4, .5, 1), visibility 0s linear .25s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); visibility: visible; transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.toast.error { background: var(--hanko); }

.loading { min-height: 100dvh; }

/* --------------------------------------------------------------- Larger screens */

@media (min-width: 640px) {
  .main { padding-top: 32px; }
  .hero-num { font-size: 3rem; }
}

/* --------------------------------------------------------------- Reduced motion */

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

/* =============================================================== Couple edition (Frane & Lea) */

.center { text-align: center; }

/* Unlock & who are you */
.unlock, .who { justify-content: center; }
.duo { display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.duo-pet { width: 118px; height: 118px; display: block; }
.duo-pet svg { width: 100%; height: 100%; display: block; }
.duo-heart { font-size: 1.8rem; margin-bottom: 52px; animation: beat 1.2s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(1); } 45% { transform: scale(1.18); } }

.who-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 10px; }
.who-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px 10px 20px;
  border: 3px solid transparent;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: 0 5px 0 var(--line), var(--shadow);
  transition: transform .1s ease;
}
.who-card:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.who-frane { border-color: #FFD2B3; }
.who-lea { border-color: #FFC9DA; }
.who-pet { width: 120px; height: 120px; display: block; }
.who-pet svg { width: 100%; height: 100%; display: block; }
.who-name { font-size: 1.6rem; font-weight: 900; }
.who-sub { font-size: .95rem; font-weight: 700; color: var(--ink-2); }

/* Partner strip on Today */
.partner-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 14px 10px 8px;
  border: 2.5px solid #FFD6E4;
  border-radius: var(--r-md);
  background: linear-gradient(90deg, #FFF3F7, #fff 70%);
  text-align: left;
  box-shadow: 0 4px 0 #FFE1EB;
}
.partner-strip:active { transform: translateY(3px); box-shadow: 0 1px 0 #FFE1EB; }
.partner-strip.win { background: linear-gradient(90deg, #FFF6D8, #FFE7EE); }
.mini-pet { flex: none; width: 58px; height: 58px; display: block; }
.mini-pet svg { width: 100%; height: 100%; display: block; }
.ps-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ps-name { font-weight: 900; }
.ps-status { font-size: .92rem; font-weight: 700; color: var(--ink-2); }
.bar-mini { height: 8px; margin-top: 4px; }
.bar-mini .bar-fill { background: linear-gradient(90deg, var(--sakura), #FF9DBB); }
.add-pill.pink { background: var(--sakura); }

/* Confirm */
.confirm-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: var(--r-md);
  background: #FFF6DB;
  border: 2.5px dashed #FFC23D;
}
.confirm-title { font-weight: 800; color: #6B5310; }
.confirm-cta.nudge { animation: shake .45s ease; }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.confirmed-line { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--hanko); }
.mini-hanko {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid var(--hanko);
  display: grid;
  place-items: center;
  transform: rotate(-12deg);
}
.mini-hanko svg { width: 16px; height: 16px; }

.goal.is-locked { background: #FBFBFE; }
.goal.is-locked .check { border-style: dashed; }
.goal.is-locked .goal-sub { color: #B08A2E; }
.goal.read-only { cursor: default; }
.goal.read-only:active { transform: none; box-shadow: 0 4px 0 var(--line), 0 10px 20px -16px rgba(31, 35, 71, .3); }

/* Partner page */
.partner-hero { display: flex; align-items: center; gap: 12px; }
.partner-pet { flex: none; width: 116px; height: 116px; }
.partner-pet svg { width: 100%; height: 100%; display: block; }
.partner-stats { font-weight: 800; font-size: .95rem; margin-top: 4px; white-space: pre-wrap; }
.cheer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cheer-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  border: 2.5px solid #FFD6E4;
  border-radius: var(--r-md);
  background: var(--card);
  font-weight: 800;
  text-align: left;
  box-shadow: 0 4px 0 #FFE1EB;
}
.cheer-btn:active { transform: translateY(3px) scale(.98); box-shadow: 0 1px 0 #FFE1EB; }
.cheer-btn-emoji { font-size: 1.8rem; line-height: 1; }
.msg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.msg-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: #FFF3F7;
}
.msg-list li.from-me { background: var(--sky); }
.msg-emoji { grid-row: 1 / 3; font-size: 1.5rem; }
.msg-text { font-weight: 700; line-height: 1.3; }
.msg-time { font-size: .82rem; font-weight: 700; color: var(--ink-3); }

/* Progress dates */
.dates { margin: 2px 0 0; display: flex; flex-direction: column; gap: 4px; }
.dates div { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dates dt { color: var(--ink-2); font-weight: 700; }
.dates dd { margin: 0; font-weight: 800; text-align: right; }
.cell.s-noplan { background: #F7EEF0; color: #C8A6AE; }
.swatch.s-noplan { background: #F7EEF0; }
.cell.planned { border: 2px dashed var(--fox); color: var(--fox-deep); }

/* Plan page */
.date-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  max-width: 100%;
  position: relative;
  padding: 4px 2px 10px;
  scrollbar-width: none;
}
.date-strip::-webkit-scrollbar { display: none; }
.date-chip {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 64px;
  padding: 8px 6px 10px;
  border: 2.5px solid transparent;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 3px 0 var(--line);
  line-height: 1.15;
}
.date-chip.on { border-color: var(--fox); background: #FFF4EC; box-shadow: 0 3px 0 #FFC9A6; }
.dc-wd { font-size: .78rem; font-weight: 800; color: var(--ink-2); }
.dc-day { font-size: 1.45rem; font-weight: 900; }
.dc-mon { font-size: .75rem; font-weight: 700; color: var(--ink-3); }
.dc-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; border: 2px solid var(--line); }
.st-ok .dc-dot { background: var(--hanko); border-color: var(--hanko); }
.st-todo .dc-dot { background: var(--fox); border-color: var(--fox); }
.other-date { display: flex; align-items: center; gap: 10px; margin-top: -4px; }
.date-input {
  min-height: 44px;
  padding: 6px 10px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  font: inherit;
  font-weight: 700;
  font-size: .95rem;
  color: var(--ink);
}

.plan-head {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 2.5px solid transparent;
}
.plan-head.st-todo { border: 2.5px dashed var(--fox); }
.plan-head.st-ok { border-color: #F6C5CA; }
.plan-head .hanko { top: 12px; right: 12px; width: 52px; height: 52px; }
.plan-editing { font-size: .9rem; font-weight: 800; color: var(--ink-2); }
.plan-date { font-size: 1.55rem; font-weight: 900; line-height: 1.2; padding-right: 60px; }
.status-pill { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px; font-size: .9rem; font-weight: 800; }
.status-pill.ok { background: #FFECEE; color: #B42634; }
.status-pill.todo { background: #FFF0D6; color: #995D00; }
.status-pill.empty { background: #EEF0F8; color: var(--ink-2); }

.plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.plan-row { display: flex; gap: 8px; align-items: stretch; }
.plan-goal {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--card);
  text-align: left;
  box-shadow: 0 4px 0 var(--line);
}
.plan-goal:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.plan-goal .goal-icon { width: 46px; height: 46px; font-size: 1.5rem; }
.plan-goal .goal-title { flex: 1; min-width: 0; }
.edit-ic { flex: none; width: 20px; height: 20px; color: var(--ink-3); }
.edit-ic svg { width: 20px; height: 20px; display: block; }
.done-chip { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--mint-soft); color: var(--mint-deep); font-size: .8rem; font-weight: 800; }
.remove-btn {
  flex: none;
  min-width: 52px;
  border: 0;
  border-radius: var(--r-md);
  background: #FFECEE;
  color: #B42634;
  display: grid;
  place-items: center;
  font-weight: 800;
  padding: 0 10px;
}
.remove-btn svg { width: 20px; height: 20px; display: block; }
.remove-btn.armed { background: var(--hanko); color: #fff; }
.plan-empty { padding: 6px 2px; color: var(--ink-2); }
.btn-ic { width: 20px; height: 20px; display: inline-block; }
.btn-ic svg { width: 20px; height: 20px; display: block; }

/* Tab bar with four tabs */
.tab { position: relative; font-size: .78rem; }
.tab-icon { width: 42px; }
.tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-dot {
  position: absolute;
  top: 4px;
  right: calc(50% - 22px);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--sakura);
  border: 2px solid #fff;
}

/* Motivation overlay */
.cheer-emoji { font-size: 4.2rem; line-height: 1; margin-bottom: -34px; position: relative; z-index: 1; animation: cheer-pop .6s cubic-bezier(.3, 1.7, .5, 1) both, float-bob 1.6s ease-in-out .6s infinite; }
@keyframes cheer-pop { from { transform: scale(0) rotate(-30deg); } to { transform: none; } }
@keyframes float-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.celebration-actions { display: flex; flex-direction: column; gap: 4px; width: 100%; margin-top: 6px; }
.celebration-actions .btn { margin-top: 0; }
.celebration-card .manga-title { font-size: clamp(1.6rem, 7vw, 2.2rem); }
.tab { min-width: 0; }
@media (max-width: 360px) {
  .tabbar { padding-left: 80px; padding-right: 6px; gap: 2px; }
  .fox { width: 76px; height: 76px; left: 4px; }
  .fox-bubble { left: 72px; }
  .tab-icon { width: 36px; }
  .tab { font-size: .72rem; }
}

.swatch.s-planned { border: 2px dashed var(--fox); }
.celebration-card .cheer-emoji { position: absolute; top: 22px; right: 18%; margin: 0; z-index: 2; }

/* Every-day goals, locked days, repeat switch */
.daily-tag { font-size: .82rem; font-weight: 800; color: var(--sky-strong); }
.plan-goal .goal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plan-goal.locked { background: #FFFBFB; box-shadow: 0 4px 0 #F6D9DC; }
.plan-goal.locked .edit-ic { color: #D9A1A7; }
.repeat { display: flex; flex-direction: column; gap: 6px; }
.repeat-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--sky);
}
.repeat-opt {
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-weight: 800;
  color: var(--ink-2);
}
.repeat-opt.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 0 #C9D5F7; }
.repeat-hint { font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.small-note { font-size: .9rem; text-align: center; }
.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 2.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  text-align: left;
}
.toggle-row.on { border-color: #B9C9FF; background: #F4F7FF; }
.toggle-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.toggle-title { font-weight: 800; }
.toggle-sub { font-size: .9rem; font-weight: 700; color: var(--ink-2); }
.toggle-knob {
  flex: none;
  position: relative;
  width: 52px;
  height: 30px;
  border-radius: 15px;
  background: #D5DAEC;
  transition: background-color .15s ease;
}
.toggle-knob::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(31, 35, 71, .25);
  transition: transform .18s cubic-bezier(.3, 1.4, .5, 1);
}
.toggle-row.on .toggle-knob { background: var(--sky-strong); }
.toggle-row.on .toggle-knob::after { transform: translateX(22px); }

/* Repeat-every-day switch on each goal – bright so it is seen */
.pick-card {
  display: flex;
  flex-direction: column;
  border: 2.5px solid transparent;
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: 0 4px 0 var(--line), 0 10px 20px -16px rgba(31, 35, 71, .3);
  overflow: hidden;
}
.pick-card.on { border-color: #A8EBD2; background: var(--mint-soft); box-shadow: 0 4px 0 #B5EBD6; }
.pick-main {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 74px;
  padding: 12px 14px 12px 12px;
  border: 0;
  background: transparent;
  text-align: left;
}
.pick-main.static { cursor: default; }
.pick-card.on .goal-icon { background: #fff; }
.pick-card.on .pick-main .check { background: var(--mint); border-color: var(--mint); color: #fff; }
.pick-foot { padding: 0 12px 12px; }
.repeat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 6px 14px 6px 6px;
  border: 2.5px solid #A9B9FF;
  border-radius: 999px;
  background: #F2F5FF;
  color: var(--sky-strong);
  font-weight: 800;
  font-size: .98rem;
  text-align: left;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.repeat-pill .rp-knob {
  flex: none;
  position: relative;
  width: 44px;
  height: 28px;
  border-radius: 14px;
  background: #C4CEF5;
  transition: background-color .15s ease;
}
.repeat-pill .rp-knob::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(31, 35, 71, .3);
  transition: transform .2s cubic-bezier(.3, 1.5, .5, 1);
}
.repeat-pill.on {
  border: 2.5px solid transparent;
  background: linear-gradient(90deg, #4C6FFF, #7B5CFF);
  color: #fff;
  box-shadow: 0 4px 0 #3A4FC7, 0 8px 18px -6px rgba(76, 111, 255, .55);
}
.repeat-pill.on .rp-knob { background: rgba(255, 255, 255, .35); }
.repeat-pill.on .rp-knob::after { transform: translateX(16px); }
.repeat-pill.on .rp-text { animation: rp-pop .3s cubic-bezier(.3, 1.6, .5, 1); }
.repeat-pill:active { transform: translateY(2px); }
@keyframes rp-pop { from { transform: scale(.85); } to { transform: none; } }
.own-repeat { margin-top: 2px; }
.how li.how-goal { flex-direction: column; align-items: stretch; gap: 10px; }
.how-title { display: flex; align-items: center; gap: 12px; }
.how-title span { font-size: 1.5rem; }

.add-pill { border: 0; font-family: inherit; cursor: pointer; }
button.add-pill { min-height: 40px; padding: 8px 16px; box-shadow: 0 3px 0 var(--fox-deep); }
button.add-pill:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--fox-deep); }
.pick-card.idea-card .pick-main { min-height: 68px; }

/* Question in the middle of the screen */
.ask-wrap { position: fixed; inset: 0; z-index: 66; display: grid; place-items: center; padding: 20px; }
.ask-backdrop { position: absolute; inset: 0; background: rgba(31, 35, 71, .45); opacity: 0; transition: opacity .18s ease; }
.ask-card {
  position: relative;
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 26px 20px 18px;
  border-radius: 30px;
  background: var(--card);
  text-align: center;
  box-shadow: 0 30px 60px -20px rgba(31, 35, 71, .45);
  transform: scale(.85) translateY(10px);
  opacity: 0;
  transition: transform .22s cubic-bezier(.3, 1.5, .5, 1), opacity .15s ease;
}
.ask-wrap.open .ask-backdrop { opacity: 1; }
.ask-wrap.open .ask-card { transform: none; opacity: 1; }
.ask-icon {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  background: var(--sky);
  margin-bottom: 4px;
}
.ask-title { font-size: 1.6rem; font-weight: 900; }
.ask-subject { font-size: 1.15rem; font-weight: 800; overflow-wrap: anywhere; }
.ask-line { color: var(--ink-2); font-weight: 700; }
.ask-warn { margin-top: 4px; padding: 8px 12px; border-radius: 12px; background: #FFECEE; color: #B42634; font-weight: 800; font-size: .92rem; }
.ask-actions { display: flex; flex-direction: column; gap: 4px; width: 100%; margin-top: 12px; }
.btn-mint { background: var(--mint); color: #fff; box-shadow: 0 5px 0 var(--mint-deep); }
.btn-mint:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--mint-deep); }

/* Change interests button */
.settings-label { font-weight: 800; color: var(--ink-2); font-size: .95rem; }
.btn-outline {
  background: var(--card);
  color: var(--sky-strong);
  border: 2.5px solid var(--sky-strong);
  box-shadow: 0 4px 0 #C9D5F7;
}
.btn-outline:active { transform: translateY(3px); box-shadow: 0 1px 0 #C9D5F7; }

/* Progress card: time of day + season */
.sky-hero::before { display: none; }
.sky-hero { min-height: 210px; }
.sky { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.sky-hero.sky-morning { background: linear-gradient(180deg, #E3EDFF 0%, #FFF1DE 100%); }
.sky-hero.sky-day { background: linear-gradient(180deg, #D6E8FF 0%, #F4F9FF 100%); }
.sky-hero.sky-evening { background: linear-gradient(180deg, #FFE0CC 0%, #FFD0DE 60%, #F2E2FF 100%); }
.sky-hero.sky-night { background: linear-gradient(180deg, #1C2150 0%, #2E3A7A 100%); color: #F2F4FF; }
.sky-hero.sky-night .hero-of,
.sky-hero.sky-night .dates dt,
.sky-hero.sky-night .hero-today { color: rgba(242, 244, 255, .75); }
.sky-hero.sky-night .bar { background: rgba(255, 255, 255, .18); }
.sky-label {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .65);
  font-size: .82rem;
  font-weight: 800;
  color: var(--ink-2);
}
.sky-night .sky-label { background: rgba(255, 255, 255, .14); color: #F2F4FF; }
.hero-today { font-weight: 800; color: var(--ink-2); margin-top: -2px; }
.sky .star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: #fff;
  opacity: .7;
  animation: twinkle-star 3.5s ease-in-out var(--d) infinite;
}
@keyframes twinkle-star { 0%, 100% { opacity: .25; } 50% { opacity: .9; } }
.sky .moon { position: absolute; right: 18px; top: 14px; width: 48px; height: 48px; opacity: .9; filter: drop-shadow(0 0 12px rgba(255, 243, 196, .55)); }
.sky .sky-sun { position: absolute; width: 78px; height: 78px; opacity: .55; }
.sky .sun-high { right: 10px; top: 6px; animation: spin 40s linear infinite; }
.sky .sun-rise { right: 34px; bottom: -26px; }
.sky .sun-low { right: 26px; bottom: -30px; width: 96px; height: 96px; opacity: .5; filter: hue-rotate(-18deg) saturate(1.3); }
.sky .cloud {
  position: absolute;
  top: var(--y);
  left: -120px;
  width: var(--w);
  opacity: .75;
  animation: drift 48s linear var(--d) infinite;
}
@keyframes drift { to { transform: translateX(calc(100vw + 260px)); } }
.sky svg { display: block; width: 100%; height: 100%; }
.sky .fall {
  position: absolute;
  left: var(--x);
  top: -24px;
  width: var(--s);
  height: var(--s);
  color: var(--c);
  fill: var(--c);
  opacity: .5;
  animation: fall var(--dur) linear var(--d) infinite;
}
.sky .flake { opacity: .8; }
.sky-day .flake, .sky-morning .flake { color: #A9C2EE; fill: #A9C2EE; }
@keyframes fall {
  0% { transform: translate(0, 0) rotate(var(--r)); }
  50% { transform: translate(var(--sway), 130px) rotate(calc(var(--r) + 160deg)); }
  100% { transform: translate(0, 260px) rotate(calc(var(--r) + 320deg)); }
}
.sky .firefly, .sky .glint {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFE98A;
  box-shadow: 0 0 10px 3px rgba(255, 233, 138, .6);
  animation: twinkle-star 3s ease-in-out var(--d) infinite;
}
.sky .glint { background: #fff; box-shadow: 0 0 8px 2px rgba(255, 210, 90, .5); }
.sky-hero > :not(.sky) { position: relative; }

/* =============================================================== Locked 66-day plan */

.days-list { display: flex; flex-direction: column; gap: 12px; }
.days-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: var(--r-md);
  background: var(--card);
  box-shadow: 0 4px 0 var(--line), 0 10px 20px -16px rgba(31, 35, 71, .3);
}
.days-head { display: flex; align-items: center; gap: 12px; }
.days-count { font-size: .88rem; font-weight: 800; color: var(--sky-strong); }
.preset-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.preset {
  min-height: 46px;
  padding: 6px 4px;
  border: 2.5px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  font-weight: 800;
  font-size: .86rem;
  line-height: 1.15;
  color: var(--ink-2);
}
.preset.on { border-color: var(--fox); background: var(--fox); color: #fff; box-shadow: 0 3px 0 var(--fox-deep); }
@media (max-width: 360px) { .preset-row { grid-template-columns: 1fr 1fr; } }

.pick-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.pick-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  min-height: 56px;
  padding: 4px 0;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink-3);
  line-height: 1.1;
}
.pick-day.weekend { background: #F7F5FF; }
.pick-day .pd-wd { font-size: .68rem; font-weight: 800; }
.pick-day .pd-n { font-size: 1.05rem; font-weight: 900; color: var(--ink-2); }
.pick-day .pd-m { font-size: .62rem; font-weight: 700; }
.pick-day.on { border-color: var(--mint); background: var(--mint); color: #E8FFF6; }
.pick-day.on .pd-n { color: #fff; }

.preview-grid { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
@media (max-width: 420px) { .preview-grid { grid-template-columns: repeat(6, 1fr); gap: 6px; } }
.pv-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--mint-soft);
  border: 2px solid #A8EBD2;
  line-height: 1;
}
.pv-day.weekend { background: #E6F6FF; border-color: #B7DDF5; }
.pv-day.rest { background: #F1F3F9; border-color: #E2E6F5; }
.pv-n { font-size: .62rem; font-weight: 800; color: var(--ink-3); }
.pv-c { font-size: 1rem; font-weight: 900; color: var(--mint-deep); }
.pv-day.rest .pv-c { color: #C0C4DA; }
.how-days { align-self: flex-start; padding: 3px 10px; border-radius: 999px; background: var(--sky); color: var(--sky-strong); font-weight: 800; font-size: .88rem; }
.how li.how-goal { gap: 6px; }
.lock-note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: #FFECEE;
  color: #8E1F2B;
  font-weight: 800;
  font-size: .95rem;
}
.lock-note .btn-ic { flex: none; margin-top: 2px; }
.lock-banner {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #FFF6D8, #FFE7EE);
  border: 2.5px solid #F6C5CA;
  font-weight: 700;
  color: var(--ink-2);
}
.lock-banner strong { color: var(--hanko); margin-right: 4px; }
.lock-ic { flex: none; width: 26px; height: 26px; color: var(--hanko); }
.lock-ic svg { width: 100%; height: 100%; display: block; }
.date-chip.is-today .dc-wd { color: var(--fox-deep); }

/* =============================================================== Live: light, hearts, message */

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  background: #EEF0F8;
  color: var(--ink-3);
  font-size: .78rem;
  font-weight: 800;
  vertical-align: middle;
}
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #B9BED6; }
.live-pill .when-live { display: none; }
.live-pill.is-live { background: #DFF8EA; color: #0C8A5E; }
.live-pill.is-live .live-dot { background: #18C77A; box-shadow: 0 0 0 0 rgba(24, 199, 122, .6); animation: live-pulse 1.6s ease-out infinite; }
.live-pill.is-live .when-live { display: inline; }
.live-pill.is-live .when-offline { display: none; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(24, 199, 122, .6); } 100% { box-shadow: 0 0 0 9px rgba(24, 199, 122, 0); } }
.partner-hero .live-pill { margin: 2px 0 4px; }

.tab-live { position: absolute; top: 5px; left: calc(50% - 24px); width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; background: transparent; display: none; }
.tab-live.is-live { display: block; background: #18C77A; }

.partner-block { display: flex; flex-direction: column; gap: 6px; }
.note-hint {
  align-self: stretch;
  padding: 10px 14px;
  border: 2px dashed #FFB3C9;
  border-radius: 14px;
  background: #FFF6F9;
  color: #C2366B;
  font-weight: 800;
  font-size: .95rem;
  text-align: left;
  animation: hint-glow 2.4s ease-in-out infinite;
}
@keyframes hint-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 111, 159, 0); } 50% { box-shadow: 0 0 0 5px rgba(255, 111, 159, .15); } }

.hearts-panel {
  border-radius: var(--r-lg);
  padding: 14px;
  background: #F4F5FA;
  border: 2.5px solid var(--line);
}
.hearts-panel .when-live { display: none; }
.hearts-panel.is-live { background: linear-gradient(135deg, #FFF0F5, #FFE3EE); border-color: #FFB3C9; }
.hearts-panel.is-live .when-live { display: flex; align-items: center; gap: 14px; }
.hearts-panel.is-live .when-offline { display: none; }
.hearts-off { font-weight: 700; color: var(--ink-2); font-size: .95rem; }
.heart-btn {
  flex: none;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FF8FB1, #FF4D7E 70%);
  box-shadow: 0 6px 0 #D63366, 0 12px 26px -8px rgba(255, 77, 126, .7);
  color: #fff;
  display: grid;
  place-items: center;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.heart-btn:active { transform: translateY(4px) scale(.94); box-shadow: 0 2px 0 #D63366; }
.heart-big { font-size: 2.6rem; line-height: 1; animation: beat 1.2s ease-in-out infinite; }
.hearts-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hearts-text { font-weight: 800; color: #9C2453; }
.hearts-sent { font-weight: 800; color: var(--ink-3); font-size: .9rem; }
.heart-count { font-variant-numeric: tabular-nums; color: #FF4D7E; }

.live-heart {
  position: fixed;
  left: var(--x);
  top: var(--y);
  z-index: 75;
  pointer-events: none;
  font-size: calc(2rem * var(--s));
  color: var(--c);
  text-shadow: 0 2px 6px rgba(255, 77, 126, .35);
  translate: -50% -50%;
  animation: heart-rise var(--dur) cubic-bezier(.2, .7, .3, 1) forwards;
}
.live-heart.small { font-size: calc(1.4rem * var(--s)); }
@keyframes heart-rise {
  0% { transform: translate(0, 0) scale(.3); opacity: 0; }
  12% { transform: translate(0, -20px) scale(1.15); opacity: 1; }
  50% { transform: translate(var(--sway), -32vh) scale(1); opacity: .95; }
  100% { transform: translate(calc(var(--sway) * -0.6), -62vh) scale(.8); opacity: 0; }
}

.note-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 2.5px solid #FFC9DA;
  box-shadow: 0 4px 0 #FFE1EB;
}
.note-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 900; font-size: 1.05rem; }
.note-badge { padding: 2px 9px; border-radius: 999px; background: var(--sakura); color: #fff; font-size: .75rem; font-weight: 800; }
.note-card textarea {
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 14px;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  resize: none;
  background: #FFFBFD;
}
.note-card textarea:focus { outline: none; border-color: var(--sakura); box-shadow: 0 0 0 4px rgba(255, 111, 159, .15); }
.note-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.note-counter { font-weight: 800; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.note-counter.full { color: var(--hanko); }
.note-card.sent { background: #FFF6F9; }
.note-sub { font-weight: 700; color: var(--ink-2); font-size: .92rem; }
.note-quote {
  margin: 4px 0;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  background: #FFF0F5;
  border: 2px solid #FFC9DA;
  font-weight: 800;
  font-size: 1.2rem;
  line-height: 1.35;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.note-quote.small { font-size: 1rem; margin: 0; }

/* =============================================================== Round 9: login flow, emoji, tiles, equal buttons */

.unlock-pet { width: 150px; height: 150px; align-self: center; }
.unlock-pet svg { width: 100%; height: 100%; display: block; }
.center-link { align-self: center; }
.who-hello {
  align-self: center;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--fox);
  color: #fff;
  font-weight: 900;
  letter-spacing: .02em;
  margin-bottom: 4px;
}
.who-card { cursor: pointer; }
.who-card .who-pet { transition: transform .2s cubic-bezier(.3, 1.6, .5, 1); }
.who-card:hover .who-pet, .who-card:focus-visible .who-pet { transform: translateY(-4px) rotate(-3deg); }

/* Back and Next always the same size */
.sticky-cta > .btn { flex: 1 1 0; min-width: 0; min-height: 60px; }

/* Emoji for an own goal */
.own-icon-btn {
  flex: none;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 2.5px solid #A9B9FF;
  border-radius: var(--r-md);
  background: #F2F5FF;
  font-size: 1.6rem;
  line-height: 1.1;
  box-shadow: 0 3px 0 #C9D5F7;
}
.own-icon-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #C9D5F7; }
.own-icon-hint { font-size: .68rem; font-weight: 800; color: var(--sky-strong); }

/* Goals before locking in: square, rounded, side by side */
.goal-tiles {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
@media (max-width: 360px) { .goal-tiles { grid-template-columns: 1fr 1fr; gap: 8px; } }
.goal-tile {
  aspect-ratio: 1;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 10px;
  border-radius: 22px;
  background: var(--card);
  border: 2.5px solid #A8EBD2;
  box-shadow: 0 4px 0 #B5EBD6;
  text-align: center;
  overflow: hidden;
}
.tile-icon { font-size: 2.2rem; line-height: 1; }
.tile-title { font-weight: 800; font-size: .95rem; line-height: 1.2; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.goal-tile .how-days { align-self: center; font-size: .78rem; padding: 2px 8px; }

/* =============================================================== Round 10 */

/* Login: both mascots, tap one, code below */
.who-card { position: relative; transition: transform .15s ease, opacity .2s ease, border-color .2s ease, box-shadow .2s ease; }
.who-list.has-pick .who-card:not(.picked) { opacity: .5; transform: scale(.95); }
.who-card.picked { border-color: var(--fox); box-shadow: 0 5px 0 #FFC9A6, 0 14px 30px -12px rgba(255, 138, 61, .55); transform: translateY(-2px); }
.who-card.who-lea.picked { border-color: var(--sakura); box-shadow: 0 5px 0 #FFC9DA, 0 14px 30px -12px rgba(255, 111, 159, .55); }
.who-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mint);
  color: #fff;
  display: grid;
  place-items: center;
  animation: stamp .3s cubic-bezier(.3, 1.5, .5, 1) both;
}
.who-check svg { width: 20px; height: 20px; }
.who-login { animation: rise-in .25s ease-out both; }
@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Emoji button: clearly changeable */
.own-icon-btn { position: relative; width: 78px; padding: 6px 4px; gap: 2px; }
.own-icon-emoji { font-size: 1.7rem; line-height: 1; }
.own-icon-hint { font-size: .62rem; line-height: 1.1; text-align: center; }
.own-icon-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sky-strong);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(76, 111, 255, .45);
  animation: badge-wiggle 2.6s ease-in-out infinite;
}
.own-icon-badge svg { width: 14px; height: 14px; }
@keyframes badge-wiggle { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-14deg) scale(1.1); } 90% { transform: rotate(12deg) scale(1.1); } 95% { transform: rotate(-6deg); } }

/* Emoji picker in the middle of the screen */
.emoji-card { width: min(380px, 100%); max-height: 86dvh; overflow-y: auto; }
.emoji-card .icon-picker { width: 100%; grid-template-columns: repeat(6, 1fr); margin-top: 8px; }
.emoji-card .btn { margin-top: 6px; }

/* Goals before locking in: small square tiles that stand out (warm, fox orange) */
.goal-tiles { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
@media (max-width: 360px) { .goal-tiles { grid-template-columns: repeat(3, 1fr); gap: 6px; } }
.goal-tile {
  border-radius: 18px;
  padding: 8px 6px;
  gap: 4px;
  border: 2.5px solid var(--fox);
  box-shadow: 0 4px 0 #FFC9A6, 0 10px 22px -12px rgba(229, 103, 42, .55);
  background: linear-gradient(180deg, #FFF8F1 0%, #FFE8D6 100%);
}
.tile-icon { font-size: 1.6rem; }
.tile-title { font-size: .8rem; -webkit-line-clamp: 2; }
.goal-tile .how-days { font-size: .68rem; padding: 1px 6px; background: #fff; color: var(--fox-deep); }

/* 66 day squares before locking in: small, mint like before */
.preview-grid { grid-template-columns: repeat(11, 1fr); gap: 4px; }
@media (max-width: 420px) { .preview-grid { grid-template-columns: repeat(11, 1fr); gap: 3px; } }
.pv-day { border-radius: 8px; border: 1.5px solid #A8EBD2; background: var(--mint-soft); }
.pv-day.weekend { background: #E6F6FF; border-color: #B7DDF5; }
.pv-day.rest { background: #F1F3F9; border-color: #E2E6F5; }
.pv-n { font-size: .5rem; }
.pv-c { font-size: .8rem; color: var(--mint-deep); }

/* Logo on the login screen: big manga "66", ink ribbon "DAYS", heart and sparkles */
.logo {
  position: relative;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0 4px;
  padding: 6px 28px 0;
  user-select: none;
  animation: logo-pop .45s cubic-bezier(.3, 1.6, .5, 1) both;
}
.logo-num {
  font-size: clamp(5.2rem, 30vw, 7.4rem);
  font-weight: 900;
  line-height: .82;
  letter-spacing: -.05em;
  color: var(--fox);
  transform: rotate(-5deg);
  text-shadow:
    .035em .035em 0 #fff,
    .07em .07em 0 var(--sakura),
    .07em .07em 18px rgba(255, 111, 159, .35);
}
.logo-word {
  margin-top: -.15em;
  padding: 5px 14px 5px calc(14px + .38em);
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: clamp(1.15rem, 5.5vw, 1.45rem);
  font-weight: 900;
  letter-spacing: .38em;
  line-height: 1;
  transform: rotate(-5deg);
  box-shadow: 0 4px 0 var(--fox-deep);
}
.logo-tag {
  margin-top: 12px;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--ink-2);
}
.logo-heart {
  position: absolute;
  top: -2px;
  right: 2px;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--sakura);
  transform: rotate(14deg);
  animation: logo-beat 1.6s ease-in-out infinite;
}
.logo-spark { position: absolute; line-height: 1; color: var(--gold); animation: logo-twinkle 2.2s ease-in-out infinite; }
.logo-spark.s1 { top: 18px; left: 0; font-size: 1.3rem; }
.logo-spark.s2 { bottom: 34px; right: 4px; font-size: .95rem; animation-delay: .8s; color: var(--sky-strong); }
.who-title { font-size: 1.45rem; }
@keyframes logo-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }
@keyframes logo-beat { 0%, 100% { transform: rotate(14deg) scale(1); } 15% { transform: rotate(14deg) scale(1.22); } 30% { transform: rotate(14deg) scale(1); } }
@keyframes logo-twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .logo, .logo-heart, .logo-spark { animation: none; } }

/* Intro: both mascots (Mili & Lida) with a heart, a little longer (0.9 s) */
.splash { animation: none; }
.splash-duo { position: relative; display: flex; align-items: flex-end; gap: 2px; }
.splash-fox { width: 112px; height: 112px; }
.splash-fox svg { width: 100%; height: 100%; display: block; }
.splash-dog { animation-delay: .12s; }
.splash-heart {
  align-self: center;
  margin-bottom: 30px;
  font-size: 1.9rem;
  line-height: 1;
  color: var(--sakura);
  animation: splash-pop .3s cubic-bezier(.3, 1.6, .5, 1) .24s both;
}
.splash-ring { width: 220px; height: 220px; animation-duration: .6s; }
@keyframes splash-out { 0%, 78% { opacity: 1; } 100% { opacity: 0; transform: scale(1.04); } }

/* The logo stays still when switching characters (no pop-in) */
.logo { animation: none; }
.who { justify-content: flex-start; padding-top: 36px; }

/* Goal tiles before locking in: light violet, so they stand out from the green days */
.goal-tile {
  border: 2.5px solid #C9B8FF;
  box-shadow: 0 4px 0 #DDD2FF, 0 10px 22px -14px rgba(124, 92, 255, .45);
  background: linear-gradient(180deg, #FBF9FF 0%, #F1ECFF 100%);
}
.goal-tile .how-days { background: #fff; color: #6A4FE0; }

/* Seamless intro → first screen (the motion itself runs with the Web Animations API in app.js) */
.splash { animation: none; background: none; }
.splash-ring { display: none; }
.splash-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 60% at 100% 0%, #FFE9DD 0%, rgba(255, 233, 221, 0) 60%),
    linear-gradient(180deg, #E9EFFF 0%, var(--paper) 340px);
  background-color: var(--paper);
  will-change: opacity;
}
.splash-fox { will-change: transform; }
.handoff-target { opacity: 0; }

/* Start day (step 3) */
.start-card { padding: 14px; border-radius: var(--r-md); background: var(--card); border: 2px solid #FFD9E6; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.start-title { font-weight: 900; }
.start-note { font-size: .9rem; color: var(--ink-2); font-weight: 700; }
.with-partner { color: var(--sakura); font-weight: 900; }
.preset.on .with-partner { color: inherit; }

/* Gifts for the mascot (progress tab) */
.rewards { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow); }
.rewards-pet { width: 84px; height: 84px; flex: none; display: block; }
.rewards-pet svg { width: 100%; height: 100%; display: block; }
.reward-list { list-style: none; margin: 0; padding: 0; flex: 1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; min-width: 0; }
.reward { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; background: #F4F5FA; opacity: .75; }
.reward.got { background: #F1ECFF; opacity: 1; }
.reward-emoji { font-size: 1.4rem; line-height: 1.1; }
.reward:not(.got) .reward-emoji { filter: grayscale(1); }
.reward-at { font-size: .64rem; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.reward.got .reward-at { color: #6A4FE0; }
.rewards-hint { margin-top: -4px; }

/* After day 66: a calm recap */
.recap { display: flex; flex-direction: column; gap: 12px; }
.recap-top { display: flex; align-items: center; gap: 12px; }
.recap-pet { width: 92px; height: 92px; flex: none; display: block; }
.recap-pet svg { width: 100%; height: 100%; display: block; }
.recap-kicker { font-size: .8rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; color: #6A4FE0; }
.recap-title { font-size: 1.5rem; font-weight: 900; line-height: 1.15; }
.recap-dates { color: var(--ink-2); font-weight: 700; font-size: .9rem; }
.recap-stats { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.recap-stats div { padding: 8px 10px; border-radius: 12px; background: #F6F7FC; }
.recap-stats dt { font-size: .75rem; font-weight: 800; color: var(--ink-2); }
.recap-stats dd { margin: 0; font-weight: 900; }
.recap-grid { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; }
.recap-grid i { aspect-ratio: 1; border-radius: 4px; background: #E8EAF3; }
.recap-grid i.s-done { background: var(--mint); }
.recap-grid i.s-partial { background: #9BE3C8; }
.recap-grid i.s-rest { background: #D9E6FF; }
.recap-note { font-weight: 800; text-align: center; }
.recap .btn { align-self: center; }
.hero-soon { font-size: 1.7rem; font-weight: 900; line-height: 1.15; }
