/* ============================================
   引っ越し前チェックリスト - Apple HIG Design
   ============================================ */

:root {
  --brand: #0099D9;
  --brand-dark: #0077A8;
  --brand-light: #E6F4FB;
  --color-success: #34C759;
  --color-success-light: #E8F7EC;
  --text-primary: #1C1C1E;
  --text-secondary: #636366;
  --text-tertiary: #AEAEB2;
  --bg: #F2F2F7;
  --bg-white: #FFFFFF;
  --border: #D1D1D6;
  --border-light: #E5E5EA;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Segoe UI", Meiryo, sans-serif;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #FFFFFF; --text-secondary: #AEAEB2; --text-tertiary: #636366;
    --bg: #1C1C1E; --bg-white: #2C2C2E;
    --border: #48484A; --border-light: #38383A;
    --brand-light: #0A2E3D; --color-success-light: #0F2E18;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--s4) var(--s10);
}

/* Header */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--s3) var(--s4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo img { display: block; height: 80px; width: auto; }

/* Card */
.card {
  background: var(--bg-white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: var(--s6);
}

/* Date Section */
.date-section { margin-top: var(--s6); }

.section-title {
  font-size: 1.375rem;
  font-weight: 800;
  margin-bottom: var(--s2);
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--s4);
  line-height: 1.7;
}

.intro-features {
  list-style: none;
  margin-bottom: var(--s5);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.intro-features li {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: var(--s6);
  position: relative;
}

.intro-features li::before {
  content: '';
  position: absolute;
  left: var(--s2);
  top: 8px;
  width: 6px;
  height: 6px;
  background: var(--brand);
  border-radius: 50%;
}

.intro-features li strong {
  color: var(--text-primary);
  font-weight: 700;
}

.date-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
}

.date-label {
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

.date-input {
  flex: 1;
  max-width: 200px;
  padding: var(--s2) var(--s3);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-family: var(--font);
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg);
}

.date-input:focus { outline: none; border-color: var(--brand); }

/* Countdown */
.countdown {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: var(--s1);
  flex-wrap: wrap;
  padding: var(--s4);
  background: var(--brand-light);
  border-radius: var(--r-md);
}

.countdown-days {
  font-size: 2.125rem;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
}

.countdown-unit {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.countdown-msg {
  width: 100%;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: var(--s2);
}

/* Summary */
.summary-section { margin-top: var(--s4); }

.summary-card {
  display: flex;
  align-items: center;
  gap: var(--s6);
  padding: var(--s5);
}

.progress-ring-wrap {
  width: 72px;
  height: 72px;
  position: relative;
  flex-shrink: 0;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--border-light);
  stroke-width: 7;
}

.ring-fill {
  fill: none;
  stroke: var(--brand);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  transition: stroke-dashoffset 0.6s ease;
}

.ring-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1rem;
  font-weight: 800;
  color: var(--brand);
}

.summary-stats {
  display: flex;
  align-items: center;
  gap: var(--s3);
}

.stat { text-align: center; }
.stat-num { display: block; font-size: 1.375rem; font-weight: 800; }
.stat-label { font-size: 0.6875rem; color: var(--text-tertiary); }
.stat-sep { font-size: 1.25rem; color: var(--text-tertiary); font-weight: 300; }

/* Checklist */
.checklist-section { margin-top: var(--s6); }

.room-group { margin-bottom: var(--s4); }

.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s3) var(--s4);
  background: var(--bg-white);
  border-radius: var(--r-md) var(--r-md) 0 0;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-height: 48px;
}

.room-header:hover { background: var(--brand-light); }

.room-header-left {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.room-icon {
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.room-icon svg {
  width: 22px;
  height: 22px;
}

.room-name {
  font-size: 0.9375rem;
  font-weight: 700;
}

.room-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-left: var(--s2);
}

.room-toggle {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  transition: transform 0.25s ease;
}

.room-toggle.open { transform: rotate(180deg); }

.room-items {
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.room-items.collapsed { display: none; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-bottom: 1px solid var(--border-light);
  min-height: 48px;
  transition: background 0.15s;
}

.check-item:last-child { border-bottom: none; }
.check-item:hover { background: var(--bg); }

.check-item.done { background: var(--color-success-light); }
.check-item.done .check-label { text-decoration: line-through; color: var(--text-tertiary); }

.check-box {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 6px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.check-box.checked {
  background: var(--color-success);
  border-color: var(--color-success);
}

.check-box.checked::after {
  content: '';
  width: 12px;
  height: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='white'%3E%3Cpath d='M4.5 8.6L2.1 6.2l.8-.8L4.5 7l4.6-4.6.8.8L4.5 8.6z'/%3E%3C/svg%3E");
}

.check-content { flex: 1; min-width: 0; }

.check-label {
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s;
}

.check-tip {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 2px;
  line-height: 1.5;
}

/* Complete */
.complete-card {
  text-align: center;
  background: var(--color-success-light);
  border: 1.5px solid var(--color-success);
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.complete-icon { font-size: 2.5rem; margin-bottom: var(--s2); }
.complete-card h2 { font-size: 1.125rem; font-weight: 800; color: #1B7A33; margin-bottom: var(--s2); }
.complete-card p { font-size: 0.875rem; color: var(--text-secondary); }

/* CTA */
.cta-section { margin-top: var(--s6); }

.cta-card {
  text-align: center;
  background: var(--brand-light);
}

.cta-title { font-size: 1rem; font-weight: 700; margin-bottom: var(--s1); }
.cta-desc { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: var(--s4); }

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--s3) var(--s6);
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.btn-cta:hover { background: var(--brand-dark); }

/* Inquiry */
.inquiry-section { margin-top: var(--s6); }
.inquiry-box h3 { font-size: 1rem; font-weight: 700; margin-bottom: var(--s2); }
.inquiry-desc { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: var(--s5); }
.form-group { margin-bottom: var(--s4); }
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; margin-bottom: var(--s1); }
.required { color: #FF3B30; font-size: 0.6875rem; }
.form-input, .form-textarea {
  width: 100%; padding: var(--s3) var(--s4);
  border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-family: var(--font); font-size: 0.9375rem; color: var(--text-primary);
  background: var(--bg); min-height: 44px;
}
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,153,217,0.12); }
.form-textarea { resize: vertical; min-height: 80px; }
.btn-full { width: 100%; }
.inquiry-success { text-align: center; padding: var(--s8) var(--s4); }
.inquiry-success p { font-size: 0.9375rem; color: #1B7A33; font-weight: 600; line-height: 1.7; }

/* Reset */
.reset-area { margin-top: var(--s6); text-align: center; }

.btn-reset {
  background: none;
  border: 1px solid var(--text-tertiary);
  border-radius: var(--r-full);
  padding: var(--s2) var(--s5);
  font-family: var(--font);
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  cursor: pointer;
  min-height: 44px;
  transition: all 0.2s;
}

.btn-reset:hover { border-color: var(--brand); color: var(--brand); }

/* Footer */
.footer {
  border-top: 1px solid var(--border-light);
  padding: var(--s6) var(--s4);
}

.footer-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
}

.footer-inner img { height: 48px; opacity: 0.5; }
.footer-inner p { font-size: 0.6875rem; color: var(--text-tertiary); }

/* Responsive */
@media (max-width: 520px) {
  .summary-card { flex-direction: column; gap: var(--s4); }
  .date-row { flex-direction: column; align-items: flex-start; gap: var(--s2); }
  .date-input { max-width: 100%; }
}
