@charset "UTF-8";

/* ===== 色の設定（ここを変えると全体の色が変わります） =====
   コミコミ不動産カラー：赤・黒・白・黄（力強さ・親しみやすさ・信頼感・目立つ） */
:root {
  --red: #e60012;           /* メイン（赤） */
  --red-dark: #b5000e;      /* 濃い赤 */
  --red-soft: #ffe3e5;      /* 淡い赤（背景・枠） */
  --red-pale: #fff5f5;      /* ごく淡い赤 */
  --ink: #111111;           /* 文字（黒） */
  --text-sub: #5a5a5a;
  --done: #a8a8a8;
  --white: #ffffff;
  --yellow: #ffd400;        /* 差し色（黄） */
  --radius: 16px;
  --shadow: 0 4px 0 rgba(230, 0, 18, .18), 0 8px 20px rgba(17, 17, 17, .06);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--white);
  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; }

/* ===== ロゴバー ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: var(--white);
  border-bottom: 1px solid #eee;
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-mark { width: 40px; height: auto; flex-shrink: 0; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-title {
  font-family: "Dela Gothic One", sans-serif;
  font-size: 20px;
  letter-spacing: .02em;
  white-space: nowrap;
}
.brand-title em, .footer-brand em { font-style: normal; color: var(--red); }
.brand-tag { font-size: 10px; font-weight: 700; color: var(--text-sub); white-space: nowrap; }
.staff-chip {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  color: var(--white);
  background: var(--red);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}
.staff-chip strong { font-size: 14px; }

/* ===== ヘッダー ===== */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 18px 16px 92px;
  background: linear-gradient(180deg, var(--white) 0%, var(--red-pale) 100%);
}
.hero > * { position: relative; }
.hero::before {   /* 赤い斜めの帯（飾り） */
  content: "";
  position: absolute;
  left: -10%; right: -10%;
  bottom: 40px;
  height: 22px;
  background: var(--red);
  transform: rotate(-5deg);
}
.skyline {
  position: absolute !important;
  left: 0; right: 0; bottom: 0;
  width: 100%; height: 70px;
  fill: var(--red-soft);
}

.badge {
  display: inline-block;
  font-family: "Dela Gothic One", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 1px 16px;
  transform: rotate(-4deg);
}

.character-wrap {
  margin: 14px auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.character {
  width: 124px; height: 124px;
  border-radius: 50%;
  border: 4px solid var(--white);
  box-shadow: 0 0 0 3px var(--red), 0 8px 18px rgba(230, 0, 18, .25);
  flex-shrink: 0;
  animation: bounce 2.4s ease-in-out infinite;
}
.char-fallback {
  width: 110px; height: 110px;
  display: grid; place-items: center;
  font-size: 48px;
  background: var(--white);
  border: 3px solid var(--red);
  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: 2.5px solid var(--ink);
  border-radius: 20px;
}
.bubble mark {
  background: linear-gradient(transparent 58%, var(--yellow) 58%);
  color: var(--red);
}
.bubble::before,
.bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  border-style: solid;
  border-color: transparent;
}
.bubble::before {   /* しっぽの黒い縁 */
  left: -13px;
  margin-top: -9px;
  border-width: 9px 13px 9px 0;
  border-right-color: var(--ink);
}
.bubble::after {    /* しっぽの白い中身 */
  left: -8.5px;
  margin-top: -6.5px;
  border-width: 6.5px 9.5px 6.5px 0;
  border-right-color: var(--white);
}
@keyframes bounce {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-6px) rotate(-2deg); }
}

.hero-title {
  margin: 16px auto 4px;
  font-family: "Dela Gothic One", sans-serif;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .02em;
}
.hero-title span { display: block; }
.hero-title .t1 { font-size: 30px; color: var(--ink); }
.hero-title .t2 {
  font-size: 38px;
  color: var(--red);
  text-shadow:
    2px 0 0 #fff, -2px 0 0 #fff, 0 2px 0 #fff, 0 -2px 0 #fff,
    4px 4px 0 var(--ink);
}
.hero-sign {
  margin: 4px 0 14px;
  font-family: "Yusei Magic", sans-serif;
  font-size: 20px;
  color: var(--red);
  transform: rotate(-3deg);
}
.hero-sign::before, .hero-sign::after {    /* 黄色の「＼ ／」 */
  content: "＼";
  color: var(--yellow);
  -webkit-text-stroke: 1px var(--ink);
  margin-right: 4px;
}
.hero-sign::after { content: "／"; margin: 0 0 0 4px; }
.hero-lead {
  display: inline-block;
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  background: var(--ink);
  color: var(--white);
  padding: 7px 18px;
  border-radius: 999px;
}

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

/* ===== 進捗カード ===== */
.progress-card {
  background: var(--white);
  border: 2px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
  margin-top: -40px;
  position: relative;
  text-align: center;
}
.progress-label {
  display: inline-block;
  margin: 0 0 2px;
  font-size: 13px;
  font-weight: 800;
  color: var(--white);
  background: var(--red);
  padding: 2px 14px;
  border-radius: 999px;
}
.progress-count {
  margin: 0 0 12px;
  font-family: "Dela Gothic One", sans-serif;
  font-size: 44px;
  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: 16px;
  background: #f1f1f1;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .12);
}
.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background:
    repeating-linear-gradient(-45deg, transparent 0 8px, rgba(255,255,255,.25) 8px 14px),
    linear-gradient(90deg, var(--red), var(--red-dark));
  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(--red);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  transform: translateY(-110%);
  transition: transform .25s ease;
}
.mini-progress.show { transform: translateY(0); }
.mini-progress .bar-mini { flex: 1; height: 10px; background: rgba(255,255,255,.35); box-shadow: none; }
.mini-progress .bar-fill { background: var(--yellow); }

/* ===== 完了メッセージ ===== */
.complete-card {
  margin-top: 18px;
  background: var(--red);
  color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  text-align: center;
  animation: pop .5s ease;
}
.complete-char {
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 3px solid var(--white);
}
.complete-title {
  margin: 6px 0 4px;
  font-family: "Dela Gothic One", sans-serif;
  font-size: 26px;
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--ink);
}
.complete-text { margin: 0; font-size: 14px; font-weight: 700; }
.complete-sign {
  margin: 10px 0 0;
  font-family: "Yusei Magic", sans-serif;
  font-size: 15px;
}
@keyframes pop {
  0% { transform: scale(.8); opacity: 0; }
  70% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}

/* ===== 見出し「＼ やることリスト ／」 ===== */
.section-title {
  margin: 32px 0 0;
  text-align: center;
  font-family: "Dela Gothic One", sans-serif;
  font-weight: 400;
  font-size: 22px;
}
.section-title::before, .section-title::after {
  content: "＼";
  color: var(--red);
  margin-right: 8px;
}
.section-title::after { content: "／"; margin: 0 0 0 8px; }

/* ===== カテゴリーカード ===== */
.category {
  background: var(--white);
  border: 2px solid var(--red-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-top: 18px;
  overflow: hidden;
}
.category-head {
  padding: 14px 16px 12px;
  background: var(--red);
  color: var(--white);
}
.category-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.timing {
  display: inline-block;
  background: var(--white);
  color: var(--red);
  font-size: 12px;
  font-weight: 800;
  padding: 2px 12px;
  border-radius: 999px;
}
.cat-count {
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}
.category.all-done .cat-count {
  color: var(--ink);
  background: var(--yellow);
  border-radius: 999px;
  padding: 0 10px;
}
.category.all-done .category-head { background: var(--red-dark); }
.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: 20px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--white);
  border-radius: 50%;
}
.category .bar { height: 10px; background: rgba(255,255,255,.3); box-shadow: none; }
.category .bar-fill { background: var(--yellow); }

/* ===== チェック項目 ===== */
.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(--red-pale); }
.item + .item label { border-top: 1.5px dashed #f0d4d6; }

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

.box {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border: 2.5px solid var(--ink);
  border-radius: 8px;
  background: var(--white);
  display: grid;
  place-items: center;
  transition: background .2s, border-color .2s, transform .2s;
}
.box svg {
  width: 22px; height: 22px;
  stroke: var(--white);
  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(--red);
  border-color: var(--red);
  animation: tap .3s ease;
}
.item input:checked + .box svg { stroke-dashoffset: 0; }
.item input:focus-visible + .box { outline: 3px solid var(--yellow); 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;
  color: var(--red);
  background: var(--red-pale);
  border: 1.5px solid var(--red);
  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(--red);
  background: var(--white);
  border: 2px solid var(--red);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--red);
  padding: 12px 28px;
  min-height: 52px;
  cursor: pointer;
}
.reset-btn:active { transform: translateY(3px); box-shadow: none; }

.notice {
  margin: 20px 4px 0;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.7;
}
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  background: var(--ink);
  border-top: 6px solid var(--red);
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
}
.footer-brand { font-family: "Dela Gothic One", sans-serif; font-size: 16px; }

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

/* ===== 狭い画面（小さいスマホ） ===== */
@media (max-width: 360px) {
  .brand-title { font-size: 17px; }
  .brand-tag { display: none; }
  .character { width: 104px; height: 104px; }
  .hero-title .t2 { font-size: 32px; }
}

/* ===== PC表示 ===== */
@media (min-width: 768px) {
  .topbar { padding-left: max(16px, calc(50% - 280px)); padding-right: max(16px, calc(50% - 280px)); }
  .hero-title .t1 { font-size: 36px; }
  .hero-title .t2 { font-size: 46px; }
  .character { width: 144px; height: 144px; }
}
