@charset "UTF-8";

/* ===== 色の設定（ここを変えると全体の色が変わります） ===== */
:root {
  --pink-deep: #e8558a;     /* アクセント（濃いピンク） */
  --pink-mid: #f7a8c4;
  --pink-light: #fde8ef;    /* 淡いピンク */
  --pink-pale: #fff5f8;
  --text: #4a3b42;
  --text-sub: #8c7a83;
  --done: #c2b4bb;
  --white: #ffffff;
  --radius: 20px;
  --shadow: 0 4px 16px rgba(232, 85, 138, 0.10);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--pink-pale);
  color: var(--text);
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

img { max-width: 100%; }
[hidden] { display: none !important; }

/* ===== ヘッダー ===== */
.hero {
  text-align: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 20px 36px;
  background:
    radial-gradient(circle at 15% 20%, #ffffff 0 8px, transparent 9px),
    radial-gradient(circle at 85% 35%, #ffffff 0 6px, transparent 7px),
    radial-gradient(circle at 75% 85%, #ffffff 0 5px, transparent 6px),
    linear-gradient(180deg, var(--pink-light) 0%, var(--pink-pale) 100%);
  border-radius: 0 0 36px 36px;
}

.logo-wrap { min-height: 32px; }
.logo {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow);
}
.logo-text {
  display: inline-block;
  font-weight: 700;
  color: var(--pink-deep);
  background: var(--white);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow);
}

.character-wrap {
  margin: 16px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.character {
  width: 104px; height: 104px;
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: var(--shadow);
  flex-shrink: 0;
  animation: float 3s ease-in-out infinite;
}
.bubble {
  position: relative;
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
  padding: 10px 14px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.bubble::before {
  content: "";
  position: absolute;
  left: -8px; top: 50%;
  margin-top: -8px;
  border: 8px solid transparent;
  border-left: 0;
  border-right-color: var(--white);
}
.char-fallback {
  width: 96px; height: 96px;
  margin: 0 auto;
  display: grid; place-items: center;
  font-size: 48px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: var(--shadow);
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.hero-sub {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--pink-deep);
  font-weight: 700;
  letter-spacing: .1em;
}
.hero-title {
  margin: 4px 0 8px;
  font-size: 28px;
  line-height: 1.3;
  letter-spacing: .05em;
}
.hero-lead {
  margin: 0;
  font-size: 14px;
  color: var(--text-sub);
}

/* ===== 本体 ===== */
.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

/* ===== 進捗カード ===== */
.progress-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-top: -20px;
  position: relative;
  text-align: center;
}
.progress-label {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
}
.progress-count {
  margin: 0 0 12px;
  font-size: 40px;
  font-weight: 800;
  color: var(--pink-deep);
  line-height: 1.2;
}
.progress-count small { font-size: 16px; color: var(--text); font-weight: 700; }

.bar {
  height: 16px;
  background: var(--pink-light);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--pink-mid), var(--pink-deep));
  border-radius: 999px;
  transition: width .4s ease;
}
.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 15px;
  flex-wrap: wrap;
  gap: 4px;
}
.progress-row strong { color: var(--pink-deep); font-size: 18px; }
.remain {
  background: var(--pink-light);
  color: var(--pink-deep);
  font-weight: 700;
  padding: 2px 12px;
  border-radius: 999px;
}

/* 固定の小さい進捗バー */
.mini-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 2px 10px rgba(232, 85, 138, .12);
  font-size: 13px;
  font-weight: 700;
  color: var(--pink-deep);
  transform: translateY(-110%);
  transition: transform .25s ease;
}
.mini-progress.show { transform: translateY(0); }
.mini-progress .bar-mini { flex: 1; height: 8px; }

/* ===== 完了メッセージ ===== */
.complete-card {
  margin-top: 16px;
  background: linear-gradient(135deg, #fff0f6, #ffe3ee);
  border: 2px dashed var(--pink-mid);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  animation: pop .5s ease;
}
.complete-emoji { font-size: 48px; line-height: 1; }
.complete-title { margin: 8px 0 4px; font-size: 22px; font-weight: 800; color: var(--pink-deep); }
.complete-text { margin: 0; font-size: 14px; color: var(--text-sub); }
@keyframes pop {
  0% { transform: scale(.8); opacity: 0; }
  70% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== カテゴリーカード ===== */
.category {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 20px;
  overflow: hidden;
}
.category-head {
  padding: 16px 18px 12px;
  border-bottom: 2px dotted var(--pink-light);
}
.category-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.timing {
  display: inline-block;
  background: var(--pink-deep);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.cat-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  white-space: nowrap;
}
.category.all-done .cat-count { color: var(--pink-deep); }
.category-title {
  margin: 10px 0 8px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-title .icon { font-size: 22px; }
.category .bar { height: 8px; }

/* ===== チェック項目 ===== */
.items { list-style: none; margin: 0; padding: 6px 0; }

.item label {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 18px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background .15s;
}
.item label:active { background: var(--pink-pale); }
.item + .item label { border-top: 1px solid #f8eef2; }

.item input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}

.box {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border: 2.5px solid var(--pink-mid);
  border-radius: 10px;
  background: var(--white);
  display: grid;
  place-items: center;
  transition: background .2s, border-color .2s, transform .2s;
}
.box svg {
  width: 20px; height: 20px;
  stroke: var(--white);
  stroke-width: 3.5;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset .25s ease .05s;
}
.item input:checked + .box {
  background: var(--pink-deep);
  border-color: var(--pink-deep);
  animation: tap .3s ease;
}
.item input:checked + .box svg { stroke-dashoffset: 0; }
.item input:focus-visible + .box { outline: 3px solid var(--pink-mid); outline-offset: 2px; }

@keyframes tap {
  0% { transform: scale(1); }
  40% { transform: scale(.85); }
  100% { transform: scale(1); }
}

.item-text { font-size: 16px; transition: color .2s; }
.item input:checked ~ .item-text {
  color: var(--done);
  text-decoration: line-through;
  text-decoration-color: var(--pink-mid);
  text-decoration-thickness: 2px;
}

/* ===== リセット・注意書き ===== */
.reset-area { text-align: center; margin-top: 32px; }
.reset-btn {
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--pink-deep);
  background: var(--white);
  border: 2px solid var(--pink-mid);
  border-radius: 999px;
  padding: 14px 28px;
  min-height: 52px;
  cursor: pointer;
}
.reset-btn:active { background: var(--pink-light); }

.notice {
  margin: 20px 4px 0;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.7;
}
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-sub);
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

/* ===== 確認画面 ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(74, 59, 66, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  width: 100%;
  max-width: 340px;
  text-align: center;
  animation: pop .25s ease;
}
.modal-title { margin: 0 0 8px; font-size: 18px; font-weight: 800; }
.modal-text { margin: 0 0 20px; font-size: 14px; color: var(--text-sub); }
.modal-buttons { display: flex; gap: 10px; }
.modal-buttons button {
  flex: 1;
  font: inherit;
  font-weight: 700;
  min-height: 52px;
  border-radius: 999px;
  cursor: pointer;
  border: none;
}
.btn-cancel { background: var(--pink-light); color: var(--text); }
.btn-danger { background: var(--pink-deep); color: var(--white); }

/* ===== PC表示 ===== */
@media (min-width: 768px) {
  .hero-title { font-size: 34px; }
  .hero-title br { display: none; }
  .character { width: 128px; height: 128px; }
  .logo { width: 112px; height: 112px; }
}
