@charset "UTF-8";

/* ===== 色の設定（ここを変えると全体の色が変わります） ===== */
:root {
  --yellow: #ffd60a;        /* メイン（黄色） */
  --yellow-light: #fff4b8;  /* 淡い黄色 */
  --yellow-pale: #fffbe6;   /* 背景 */
  --red: #e8361f;           /* アクセント（赤） */
  --orange: #ff8a1f;
  --ink: #141414;           /* 文字・線（黒） */
  --text-sub: #5c5c5c;
  --done: #a8a8a8;
  --white: #ffffff;
  --radius: 18px;
  --line: 3px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);   /* マンガ風のくっきり影 */
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--yellow-pale);
  color: var(--ink);
  font-family: "M PLUS Rounded 1c", "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 {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 16px 44px;
  background:
    repeating-conic-gradient(from 0deg at 50% 38%,
      var(--yellow) 0deg 6deg, #ffe867 6deg 9deg,
      var(--orange) 9deg 10deg, var(--yellow) 10deg 14deg, #fff 14deg 15deg);
  border-bottom: var(--line);
}

.logo-wrap:empty { display: none; }
.logo {
  display: block;
  margin: 0 auto 8px;
  max-height: 56px;
  width: auto;
}

.badge {
  display: inline-block;
  font-family: "Dela Gothic One", sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  padding: 2px 16px;
  box-shadow: 3px 3px 0 var(--ink);
  transform: rotate(-4deg);
}

.character-wrap {
  margin: 16px auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.character {
  width: 116px; height: 116px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background: var(--white);
  box-shadow: var(--shadow);
  flex-shrink: 0;
  animation: bounce 2.4s ease-in-out infinite;
}
.char-fallback {
  width: 104px; height: 104px;
  display: grid; place-items: center;
  font-size: 48px;
  background: var(--white);
  border: var(--line);
  border-radius: 50%;
  flex-shrink: 0;
}
.bubble {
  position: relative;
  margin: 0;
  background: var(--white);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
  text-align: left;
  padding: 10px 14px;
  border: var(--line);
  border-radius: 20px;
  box-shadow: 3px 3px 0 var(--ink);
}
.bubble mark {
  background: linear-gradient(transparent 55%, var(--yellow) 55%);
  color: inherit;
}
.bubble::before,
.bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  border-style: solid;
  border-color: transparent;
}
.bubble::before {   /* しっぽの黒い縁 */
  left: -14px;
  margin-top: -10px;
  border-width: 10px 14px 10px 0;
  border-right-color: var(--ink);
}
.bubble::after {    /* しっぽの白い中身 */
  left: -9px;
  margin-top: -7px;
  border-width: 7px 10px 7px 0;
  border-right-color: var(--white);
}
@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-6px) rotate(-2deg); }
}

.hero-title {
  margin: 14px auto 10px;
  font-family: "Dela Gothic One", sans-serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.25;
  letter-spacing: .02em;
  color: var(--ink);
  -webkit-text-stroke: 0;
  text-shadow:
    3px 0 0 #fff, -3px 0 0 #fff, 0 3px 0 #fff, 0 -3px 0 #fff,
    2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff,
    5px 5px 0 var(--red);
}
.hero-lead {
  display: inline-block;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  background: var(--ink);
  color: var(--white);
  padding: 6px 16px;
  border-radius: 999px;
}

/* ===== 本体 ===== */
.container {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

/* ===== 進捗カード ===== */
.progress-card {
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  margin-top: -24px;
  position: relative;
  text-align: center;
}
.progress-label {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-sub);
}
.progress-count {
  margin: 0 0 12px;
  font-family: "Dela Gothic One", sans-serif;
  font-size: 42px;
  color: var(--red);
  line-height: 1.2;
}
.progress-count small {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 16px;
  color: var(--ink);
  font-weight: 800;
}

.bar {
  height: 18px;
  background: var(--yellow-light);
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  background:
    repeating-linear-gradient(-45deg, transparent 0 8px, rgba(255,255,255,.35) 8px 14px),
    linear-gradient(90deg, var(--orange), var(--red));
  transition: width .4s ease;
}
.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 15px;
  font-weight: 800;
  flex-wrap: wrap;
  gap: 6px;
}
.progress-row strong { color: var(--red); font-size: 20px; }
.remain {
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-weight: 800;
  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: var(--yellow);
  border-bottom: var(--line);
  font-size: 13px;
  font-weight: 800;
  transform: translateY(-110%);
  transition: transform .25s ease;
}
.mini-progress.show { transform: translateY(0); }
.mini-progress .bar-mini { flex: 1; height: 12px; background: var(--white); }

/* ===== 完了メッセージ ===== */
.complete-card {
  margin-top: 18px;
  background: var(--yellow);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  animation: pop .5s ease;
}
.complete-emoji { font-size: 48px; line-height: 1; }
.complete-title {
  margin: 8px 0 4px;
  font-family: "Dela Gothic One", sans-serif;
  font-size: 24px;
  color: var(--red);
}
.complete-text { margin: 0; font-size: 14px; font-weight: 700; }
@keyframes pop {
  0% { transform: scale(.8); opacity: 0; }
  70% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== カテゴリーカード ===== */
.category {
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 22px;
  overflow: hidden;
}
.category-head {
  padding: 14px 16px 12px;
  background: var(--yellow-light);
  border-bottom: var(--line);
}
.category-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.timing {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
}
.cat-count {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.category.all-done .cat-count { color: var(--red); }
.category.all-done .category-head { background: var(--yellow); }
.category-title {
  margin: 8px 0 8px;
  font-family: "Dela Gothic One", sans-serif;
  font-weight: 400;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.category-title .icon { font-size: 22px; }
.category .bar { height: 12px; background: var(--white); }

/* ===== チェック項目 ===== */
.items { list-style: none; margin: 0; padding: 4px 0; }

.item label {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 60px;
  padding: 10px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition: background .15s;
}
.item label:active { background: var(--yellow-pale); }
.item + .item label { border-top: 2px dashed #e6e0c8; }

.item input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}

.box {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border: var(--line);
  border-radius: 8px;
  background: var(--white);
  display: grid;
  place-items: center;
  transition: background .2s, transform .2s;
}
.box svg {
  width: 22px; height: 22px;
  stroke: var(--red);
  stroke-width: 4;
  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(--yellow);
  animation: tap .3s ease;
}
.item input:checked + .box svg { stroke-dashoffset: 0; }
.item input:focus-visible + .box { outline: 3px solid var(--red); outline-offset: 2px; }

@keyframes tap {
  0% { transform: scale(1); }
  40% { transform: scale(.82) rotate(-6deg); }
  100% { transform: scale(1); }
}

.item-body { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.item-text { font-size: 16px; font-weight: 700; line-height: 1.45; transition: color .2s; }
.when {
  font-size: 12px;
  font-weight: 800;
  background: var(--yellow-light);
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 0 8px;
  transition: opacity .2s;
}
.item input:checked ~ .item-body .when { opacity: .4; }
.item input:checked ~ .item-body .item-text {
  color: var(--done);
  text-decoration: line-through;
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}

/* ===== リセット・注意書き ===== */
.reset-area { text-align: center; margin-top: 32px; }
.reset-btn {
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
  background: var(--white);
  border: var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 12px 28px;
  min-height: 52px;
  cursor: pointer;
}
.reset-btn:active { transform: translate(3px, 3px); box-shadow: none; }

.notice {
  margin: 20px 4px 0;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.7;
}
.footer {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  background: var(--ink);
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
}

/* ===== 確認画面 ===== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(20, 20, 20, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-box {
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  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: 800;
  min-height: 52px;
  border-radius: 999px;
  border: var(--line);
  cursor: pointer;
}
.btn-cancel { background: var(--white); color: var(--ink); }
.btn-danger { background: var(--red); color: var(--white); }

/* ===== PC表示 ===== */
@media (min-width: 768px) {
  .hero-title { font-size: 40px; }
  .hero-title br { display: none; }
  .character { width: 140px; height: 140px; }
}
