:root {
  color-scheme: light;
  --ink: #382359;
  --muted: #6c5b80;
  --purple: #6942aa;
  --line: #e9def3;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  background: #fcf9ff;
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #783bd5; outline-offset: 4px; }
.top { border-bottom: 1px solid var(--line); background: #fffcff; }
.top-inner, main { max-width: 1100px; margin: auto; padding-inline: 26px; }
.top-inner { min-height: 72px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 14px; color: var(--purple); font-weight: 800; }
.brand strong { display: block; color: var(--ink); font-size: 17px; }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 15px; color: white; font-size: 26px; background: linear-gradient(145deg,#b17ae6,#7946c0); box-shadow: 0 3px 0 #6434a0; }
nav { display: flex; gap: 6px; background: #f6effb; padding: 4px; border-radius: 100px; }
nav a { display: grid; place-items: center; padding: 8px 15px; border-radius: 100px; color: var(--muted); font-size: 13px; font-weight: 800; min-height: 39px; }
nav a[aria-current="page"] { background: white; color: var(--purple); box-shadow: 0 1px 5px #58358216; }
.hero { display: grid; grid-template-columns: 1fr .96fr; gap: 20px; padding: 26px; margin-top: 29px; border-radius: 34px; border: 1px solid #ecdaf8; background: radial-gradient(ellipse at 0 5%, #fff 0%, transparent 55%), linear-gradient(120deg,#f8eafd,#f6edff 53%,#fcebf6); }
.hero-copy { padding: 20px 8px 16px 16px; align-self: center; }
.date, .eyebrow { color: var(--purple); font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.date { display: inline-block; background: #fff; border: 1px solid #ead9f3; border-radius: 999px; padding: 7px 13px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(32px, 5.3vw, 62px); line-height: 1.14; letter-spacing: -.045em; font-weight: 900; }
.hero h1 { margin: 13px 0 12px; }
h1 span { color: #a454c3; }
p { line-height: 1.75; color: var(--muted); font-weight: 650; font-size: 14px; }
.pill { margin-top: 19px; min-height: 45px; border: 1px solid #e3cef1; background: #fffbff; border-radius: 30px; padding: 0 15px; font-size: 14px; font-weight: 850; color: var(--purple); }
.pill span { margin-left: 9px; }
.pet-area { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px 16px 13px; border-radius: 27px; overflow: hidden; background: radial-gradient(ellipse at 50% 47%,#fff7fe 4%,transparent 57%), linear-gradient(145deg,#ead4fa,#f9dff2 50%,#e0d9ff); border: 1px solid #fff9; }
.pet-label { z-index: 1; background: #fff9; border-radius: 50px; padding: 6px 12px; font-size: 12px; color: #62418c; font-weight: 850; }
.pet { width: min(100%, 325px); height: auto; overflow: visible; margin: -9px 0 -3px; }
.wings, .bow, .crown { visibility: hidden; }
.pet[data-level="2"] .bow, .pet[data-level="3"] :is(.bow,.wings), .pet[data-level="4"] :is(.bow,.wings,.crown) { visibility: visible; }
.twinkle { position: absolute; color: white; text-shadow: 0 0 12px white; pointer-events: none; }
.t1 { top: 20%; left: 10%; font-size: 33px; }
.t2 { top: 38%; right: 9%; font-size: 28px; }
.t3 { bottom: 23%; left: 14%; color: #fff6ad; font-size: 19px; }
.pet-progress { z-index: 1; width: min(100%, 310px); padding: 10px 13px; border-radius: 15px; background: #fffC; }
.pet-progress div { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; color: #694691; font-weight: 800; }
.pet-progress strong { font-size: 14px; white-space: nowrap; }
.pet-progress strong > span:first-child, .count > span { color: #995800; }
progress { display: block; width: 100%; height: 8px; margin-top: 6px; appearance: none; border: 0; border-radius: 99px; overflow: hidden; background: #e9dff5; }
progress::-webkit-progress-bar { background: #e9dff5; }
progress::-webkit-progress-value { background: linear-gradient(90deg,#af75e4,#e78bc9); border-radius: 99px; }
progress::-moz-progress-bar { background: #ad70df; border-radius: 99px; }
.missions { margin-top: 29px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
h2 { font-size: clamp(22px,3.3vw,34px); line-height: 1.35; margin: 3px 0; letter-spacing: -.04em; }
.count { border: 1px solid #f1ddbd; padding: 8px 12px; border-radius: 30px; background: #fff6e4; color: #774b22; font-size: 13px; white-space: nowrap; font-weight: 750; }
.cards { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; }
.card { position: relative; display: flex; flex-direction: column; align-items: start; text-align: left; min-height: 145px; border-radius: 21px; padding: 13px 14px; background: white; border: 1px solid var(--line); box-shadow: 0 3px 0 #ebe1f4; transition: transform .15s, background .15s; }
.card:hover, .pill:hover { background: #faf2ff; }
.card:active { transform: translateY(2px); }
.card[aria-pressed="true"] { background: #fff9ed; border-color: #eacb90; box-shadow: 0 3px 0 #efdbae; }
.icon { display: grid; place-items: center; width: 51px; height: 51px; margin-bottom: 8px; border-radius: 15px; background: var(--tile); }
.icon svg { width: 39px; height: 39px; }
.card strong { font-size: clamp(13px,1.7vw,17px); line-height: 1.4; }
.card small { display: block; font-size: 11px; color: var(--muted); line-height: 1.45; margin-top: 4px; font-weight: 650; }
.check { position: absolute; top: 13px; right: 13px; display: grid; place-items: center; width: 24px; height: 24px; border: 1px dashed #cdbadf; border-radius: 50%; color: #a187b8; font-size: 13px; }
.card[aria-pressed="true"] .check { background: #ffe3a3; border: 1px solid #e8bf72; color: #855014; }
footer { padding: 26px 0 24px; text-align: center; color: var(--muted); font-size: 12px; font-weight: 700; }
footer span { color: #985bc7; }
.history { padding-top: 32px; }
.history h1 { font-size: clamp(28px,5vw,50px); margin: 6px 0; }
.calendar-panel { max-width: 720px; border: 1px solid var(--line); background: #fff; border-radius: 25px; padding: 18px; margin-top: 18px; }
.month-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.month-controls button, .close { width: 44px; height: 44px; border: 1px solid var(--line); background: #f8efff; border-radius: 14px; font-size: 24px; }
.month-controls button:disabled { opacity: .45; cursor: default; }
.calendar { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 4px; text-align: center; }
.weekday { color: var(--muted); font-size: 12px; padding-bottom: 5px; }
.day { min-height: 48px; padding: 3px 0; background: #fbf7ff; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 800; }
.day:disabled { color: #796c88; background: #fbf9fc; cursor: default; }
.day[aria-pressed="true"] { border-color: #9d6ad4; background: #f0e2ff; }
.day small { display: block; color: #8c5709; font-size: 10px; }
.day-detail { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; }
.day-detail ul { padding-left: 21px; margin-bottom: 0; }
dialog { width: min(90%, 450px); border: 1px solid var(--line); border-radius: 25px; padding: 23px; color: var(--ink); background: #fffaff; }
dialog::backdrop { background: #38235977; }
.close { position: absolute; top: 12px; right: 12px; }
#stages { padding: 0; margin: 16px 0 0; list-style: none; display: grid; gap: 6px; }
#stages li { border: 1px solid var(--line); padding: 9px 11px; border-radius: 12px; font-size: 14px; }
#stages li.current { border-color: #c09cdf; background: #f4e8ff; }
.toast { position: fixed; z-index: 2; bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: 90vw; pointer-events: none; border-radius: 20px; background: #57347f; color: white; font-weight: 800; text-align: center; box-shadow: 0 7px 25px #45247144; }
.toast:not(:empty) { padding: 11px 17px; }
.pet.pop { animation: pop .52s ease both; }
@keyframes pop { 35% { transform: translateY(-8px) scale(1.07); } 70% { transform: scale(.97); } }
@media (max-width: 720px) {
  .top-inner, main { padding-inline: 14px; }
  .hero { margin-top: 14px; padding: 15px; gap: 12px; border-radius: 24px; }
  .hero-copy { padding: 2px 0; }
  .hero h1 { font-size: clamp(25px,5.8vw,43px); }
  .hero-copy p { font-size: 12px; }
  .pet-area { padding: 9px; border-radius: 20px; }
  .pet-label { font-size: 10px; }
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .card { min-height: 130px; }
  .section-heading { flex-wrap: wrap; }
}
@media (max-width: 480px) {
  .top-inner { min-height: 63px; }
  .brand { font-size: 11px; gap: 7px; }
  .brand strong { font-size: 13px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 11px; font-size: 19px; }
  nav a { padding-inline: 9px; font-size: 11px; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 br { display: none; }
  .hero-copy p br { display: none; }
  .pill { margin-top: 10px; }
  .pet { width: 210px; }
  .missions { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
