/* =============================================
   保育園準備チェックリスト
   Design: Green系（#16a34a メイン）
   ============================================= */

:root {
  --primary: #16a34a;
  --primary-hover: #15803d;
  --primary-light: #f0fdf4;
  --accent: #4ade80;
  --bg: #f5faf7;
  --surface: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.08);
  --transition: 0.15s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'BIZ UDPGothic', 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: linear-gradient(135deg, #14532d 0%, #16a34a 100%);
  color: #fff;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: 600px; margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.back-link {
  color: rgba(255,255,255,0.8); font-size: 0.85rem; text-decoration: none;
  display: inline-flex; align-items: center; gap: 0.3rem;
  min-height: 44px; align-self: flex-start;
}
.back-link:hover { color: #fff; }
.header-title {
  display: flex; align-items: center; gap: 0.75rem;
}
.header-icon { font-size: 2rem; line-height: 1; }
h1 { font-family: 'Outfit', sans-serif; font-size: 1.2rem; font-weight: 800; line-height: 1.2; }
.header-sub { font-size: 0.78rem; opacity: 0.85; margin-top: 0.15rem; }

/* ── Main ── */
main { max-width: 600px; margin: 0 auto; padding: 1rem 1rem 3rem; }

/* ── Ad unit ── */
.ad-unit { min-height: 0; margin: 0.75rem 0; }

/* ── Card ── */
.card {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1rem;
}

/* ── Privacy notice ── */
.privacy-notice {
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem; font-size: 0.8rem; color: #166534;
  display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.75rem;
}

/* ── Date bar ── */
.date-bar {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.9rem; font-weight: 700; color: var(--primary);
  margin-bottom: 0.75rem;
}

/* ── Complete banner ── */
.complete-banner {
  background: linear-gradient(135deg, #14532d, #16a34a);
  border-radius: var(--radius); padding: 2rem 1rem;
  text-align: center; margin-bottom: 1rem;
  animation: bannerIn 0.4s ease;
}
@keyframes bannerIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}
.complete-emoji {
  font-size: 3rem; margin-bottom: 0.25rem;
  animation: bounce 0.6s ease;
}
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  40%       { transform: scale(1.3); }
  70%       { transform: scale(0.9); }
}
.complete-text { font-family: 'Outfit', sans-serif; font-size: 1.75rem; font-weight: 800; color: #fff; }
.complete-sub  { font-size: 0.9rem; color: rgba(255,255,255,0.85); margin-top: 0.25rem; }

/* ── Progress ── */
.progress-section { margin-bottom: 1rem; }
.progress-label {
  display: flex; justify-content: space-between;
  font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.35rem;
}
#progress-pct { font-weight: 700; color: var(--primary); }
.progress-bar-wrap {
  background: #e5e7eb; border-radius: 99px; height: 12px; overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #16a34a, #4ade80);
  transition: width 0.35s ease;
}

/* ── Checklist ── */
.checklist {
  list-style: none; display: flex; flex-direction: column;
  gap: 0.5rem; margin-bottom: 1rem;
}
.check-item {
  display: flex; align-items: center; gap: 0;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 56px;
  overflow: hidden;
  transition: opacity var(--transition);
}
.check-item.checked { opacity: 0.6; }

.check-btn {
  flex: 1; display: flex; align-items: center; gap: 0.75rem;
  padding: 0 1rem; min-height: 56px; cursor: pointer;
  background: none; border: none; text-align: left;
  font-size: 1rem; font-family: inherit; color: var(--text);
}
.check-btn:active { background: var(--primary-light); }

.check-icon {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: transparent;
  transition: all var(--transition);
}
.check-item.checked .check-icon {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.check-name {
  flex: 1;
  transition: all var(--transition);
}
.check-item.checked .check-name {
  text-decoration: line-through; color: var(--text-muted);
}

.del-btn {
  width: 44px; height: 56px; border: none; background: none;
  color: #d1d5db; cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: color var(--transition);
}
.del-btn:hover { color: #ef4444; background: #fef2f2; }

/* Empty state */
.empty-state {
  text-align: center; padding: 2.5rem 1rem;
  color: var(--text-muted); font-size: 0.9rem;
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }

/* ── Add form ── */
.add-form-title {
  font-size: 0.95rem; font-weight: 700; color: var(--primary);
  margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.4rem;
}
.add-row { display: flex; gap: 0.5rem; }
.add-input {
  flex: 1; border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem; font-size: 1rem; font-family: inherit;
  color: var(--text); background: #fff;
  transition: border-color var(--transition);
}
.add-input:focus { outline: none; border-color: var(--primary); }
.btn-add {
  background: var(--primary); color: #fff; border: none;
  border-radius: var(--radius-sm); padding: 0.65rem 1rem;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 0.3rem; white-space: nowrap;
  transition: background var(--transition);
  min-height: 44px;
}
.btn-add:hover { background: var(--primary-hover); }
.add-error { color: #ef4444; font-size: 0.8rem; margin-top: 0.35rem; }

/* ── Howto ── */
.howto-section h2 {
  font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700;
  margin-bottom: 1rem; display: flex; align-items: center; gap: 0.4rem;
}
.howto-list { padding-left: 1.5rem; }
.howto-list li { font-size: 0.875rem; line-height: 1.7; margin-bottom: 0.5rem; }
.info-box {
  margin-top: 1rem; background: var(--primary-light);
  border-left: 4px solid var(--primary); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 0.75rem 1rem; font-size: 0.85rem; line-height: 1.6;
  display: flex; align-items: flex-start; gap: 0.5rem; color: #166534;
}
.info-box i { color: var(--primary); margin-top: 0.1rem; flex-shrink: 0; }

/* ── Edit button ── */
.edit-btn {
  width: 36px; height: 56px; border: none; background: none;
  color: #d1d5db; cursor: pointer; font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: color var(--transition);
}
.edit-btn:hover { color: var(--primary); background: var(--primary-light); }

/* ── Day badges (on checklist items) ── */
.day-badges { display: inline-flex; gap: 2px; margin-left: 0.4rem; vertical-align: middle; }
.day-badge {
  font-size: 0.65rem; font-weight: 700;
  background: #dcfce7; color: var(--primary);
  border: 1px solid #bbf7d0;
  border-radius: 4px; padding: 0 4px; line-height: 1.6;
}

/* ── Hidden note ── */
.hidden-note {
  font-size: 0.78rem; color: var(--text-muted);
  text-align: center; margin-bottom: 0.5rem;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 1rem;
}
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--surface); border-radius: var(--radius);
  padding: 1.5rem; width: 100%; max-width: 380px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  animation: modalIn 0.2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
  font-family: 'Outfit', sans-serif; font-size: 1rem; font-weight: 700;
  color: var(--primary); margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.4rem;
}

.modal-field { margin-bottom: 1.1rem; }
.modal-label {
  display: block; font-size: 0.85rem; font-weight: 700;
  color: var(--text); margin-bottom: 0.4rem;
}
.modal-hint { font-size: 0.75rem; font-weight: 400; color: var(--text-muted); margin-left: 0.25rem; }

.modal-input {
  width: 100%; border: 2px solid var(--border); border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem; font-size: 1rem; font-family: inherit; color: var(--text);
  transition: border-color var(--transition);
}
.modal-input:focus { outline: none; border-color: var(--primary); }

/* ── Day picker (in modal) ── */
.day-picker {
  display: flex; gap: 0.4rem; flex-wrap: wrap;
  margin-top: 0.25rem;
}
.day-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--border); background: #fff;
  font-size: 0.9rem; font-weight: 700; cursor: pointer;
  color: var(--text-muted); transition: all var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.day-btn:hover  { border-color: var(--primary); color: var(--primary); }
.day-btn.selected {
  background: var(--primary); border-color: var(--primary);
  color: #fff;
}
.modal-day-note { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.4rem; line-height: 1.5; }

/* ── Modal buttons ── */
.modal-btns { display: flex; gap: 0.5rem; margin-top: 1.25rem; }
.btn-modal-cancel {
  flex: 1; padding: 0.7rem; border: 2px solid var(--border);
  border-radius: var(--radius-sm); background: #fff;
  font-size: 0.95rem; font-weight: 700; cursor: pointer; color: var(--text-muted);
  transition: all var(--transition);
}
.btn-modal-cancel:hover { border-color: var(--text-muted); color: var(--text); }
.btn-modal-save {
  flex: 2; padding: 0.7rem; border: none;
  border-radius: var(--radius-sm); background: var(--primary);
  font-size: 0.95rem; font-weight: 700; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 0.3rem;
  transition: background var(--transition);
}
.btn-modal-save:hover { background: var(--primary-hover); }

/* ── Footer ── */
footer { background: #1e1e2e; color: #aaa; text-align: center; padding: 1.5rem 1rem; font-size: 0.8rem; }
footer a { color: #4ade80; text-decoration: none; }
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 0.5rem; }
