/* ============================================================
   KajiMate – Design System
   ============================================================ */

/* ---- Reset & Base ---------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #4a6cf7;
  --primary-dark:  #3a5be6;
  --primary-light: #eef1ff;
  --text:          #1a1a2e;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;
  --bg:            #f8f9ff;
  --white:         #ffffff;
  --danger:        #e53e3e;
  --success:       #38a169;
  --radius:        10px;
  --shadow:        0 1px 4px rgba(0,0,0,.08);
  --font:          'Inter', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Meiryo', sans-serif;
}

html { font-size: 15px; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Header ---------------------------------------------- */
.app-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.app-nav {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.app-logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}
.app-logo:hover { opacity: .85; text-decoration: none; }

.app-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;   /* 絶対に折り返さない */
  overflow: hidden;
}
.app-nav-links a {
  padding: 5px 9px;
  border-radius: 6px;
  font-size: .82rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.app-nav-links a:hover { background: var(--bg); color: var(--text); }
.app-nav-primary {
  background: var(--primary) !important;
  color: var(--white) !important;
  font-weight: 600;
  border-radius: 8px !important;
  padding: 6px 12px !important;
  white-space: nowrap;
}
.app-nav-primary:hover { background: var(--primary-dark) !important; opacity: 1 !important; }
.app-nav-secondary {
  border: 1px solid var(--border) !important;
  color: var(--text-muted) !important;
  border-radius: 8px !important;
  padding: 5px 12px !important;
  white-space: nowrap;
}
.app-nav-user {
  display: flex;
  align-items: center;
  gap: 2px;
  border-left: 1px solid var(--border);
  margin-left: 6px;
  padding-left: 8px;
}
.app-user {
  font-size: .78rem;
  color: var(--text-muted);
  padding: 4px 6px;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.inline-form { display: inline; }
.app-nav-links form button,
.app-nav-user form button {
  padding: 5px 9px;
  border: none;
  background: transparent;
  font-size: .82rem;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  font-family: var(--font);
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.app-nav-links form button:hover,
.app-nav-user form button:hover { background: var(--bg); color: var(--text); }

/* ---- Flash ----------------------------------------------- */
.flash {
  padding: 12px 20px;
  font-size: .875rem;
  text-align: center;
}
.flash.notice { background: #f0fdf4; color: #166534; border-bottom: 1px solid #bbf7d0; }
.flash.alert  { background: #fff5f5; color: #9b1c1c; border-bottom: 1px solid #fed7d7; }

/* ---- Main ------------------------------------------------- */
.app-main {
  padding: 28px 20px 48px;
  max-width: 960px;
  margin: 0 auto;
}

/* ---- Footer ---------------------------------------------- */
.app-footer {
  text-align: center;
  padding: 20px;
  font-size: .8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--white);
}

/* ---- Buttons --------------------------------------------- */
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  border: 2px solid transparent;
  transition: background .15s, box-shadow .15s, opacity .15s;
  font-family: var(--font);
  line-height: 1.4;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); text-decoration: none; }
.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover { background: var(--primary-light); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--bg); text-decoration: none; }
.btn-danger {
  background: var(--white);
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover { background: #fff5f5; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-quick {
  padding: 5px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #c7d2fe;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font);
  transition: background .15s;
}
.btn-quick:hover { background: #dde3ff; }
.btn-guest {
  display: inline-block;
  padding: 11px 24px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s;
}
.btn-guest:hover { background: var(--primary-dark); text-decoration: none; }

/* ---- Category Badges ------------------------------------- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge--cleaning   { background: #e0f2fe; color: #0369a1; }
.badge--laundry    { background: #ede9fe; color: #6d28d9; }
.badge--cooking    { background: #fef3c7; color: #92400e; }
.badge--dishwashing{ background: #d1fae5; color: #065f46; }
.badge--shopping   { background: #fce7f3; color: #9d174d; }
.badge--childcare  { background: #fee2e2; color: #991b1b; }
.badge--other      { background: #f3f4f6; color: #374151; }

/* ---- Forms ----------------------------------------------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 520px;
}
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-hint { font-size: .78rem; color: var(--text-muted); margin-bottom: 4px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
  line-height: 1.5;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,108,247,.12);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-input-suffix { position: relative; display: flex; align-items: center; }
.form-input-suffix .form-input { padding-right: 36px; }
.form-suffix {
  position: absolute;
  right: 12px;
  font-size: .85rem;
  color: var(--text-muted);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 24px; }
.form-errors {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  max-width: 520px;
}
.form-errors__title { font-size: .875rem; font-weight: 600; color: #9b1c1c; margin-bottom: 6px; }
.form-errors ul { padding-left: 18px; font-size: .85rem; color: #c53030; }

/* Devise form compatibility */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; }
.field input[type="email"],
.field input[type="password"],
.field input[type="text"],
.field input[type="checkbox"] {
  font-family: var(--font);
}
.field input[type="email"],
.field input[type="password"],
.field input[type="text"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(74,108,247,.12);
}
.field p { margin: 0; }
.actions { margin-top: 20px; }
.actions input[type="submit"] {
  padding: 9px 20px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background .15s;
}
.actions input[type="submit"]:hover { background: var(--primary-dark); }

/* ---- Page Header ----------------------------------------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}
.page-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.page-desc {
  font-size: .875rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.page-link-bottom {
  margin-top: 16px;
  font-size: .875rem;
  color: var(--text-muted);
}
.section-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.section-title { font-size: 1rem; font-weight: 700; }
.section-meta { font-size: .8rem; color: var(--text-muted); }

/* ---- Accordion (details/summary) ------------------------- */
.accordion {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  overflow: hidden;
}
.accordion__summary {
  padding: 14px 16px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background .15s;
}
.accordion__summary::-webkit-details-marker { display: none; }
.accordion__summary::after {
  content: "›";
  font-size: 1.1rem;
  color: var(--text-muted);
  transform: rotate(90deg);
  transition: transform .2s;
  margin-left: 8px;
}
details[open] .accordion__summary::after { transform: rotate(270deg); }
.accordion__summary:hover { background: var(--bg); }
.accordion__badge {
  font-size: .7rem;
  font-weight: 600;
  background: var(--primary);
  color: var(--white);
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 8px;
}
.accordion__body {
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* ---- Quick List ------------------------------------------ */
.quick-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.quick-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
}
.quick-item__info { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.quick-item__title {
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.quick-item__date { font-size: .78rem; color: var(--text-muted); white-space: nowrap; }

/* ---- Filter ---------------------------------------------- */
.filter-grid { display: flex; flex-direction: column; gap: 16px; }
.filter-label { font-size: .8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; }
.filter-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: .82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: all .15s;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.filter-btn--active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 600;
}
.filter-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-form .form-select { width: auto; }
.link-muted { font-size: .8rem; color: var(--text-muted); }

/* ---- Log List -------------------------------------------- */
.log-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: box-shadow .15s;
}
.log-item:hover { box-shadow: var(--shadow); }
.log-item__main { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.log-item__title {
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.log-item__meta { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.log-item__minutes { font-size: .85rem; color: var(--text-muted); }
.log-item__date { font-size: .82rem; color: var(--text-muted); }
.link-detail { font-size: .8rem; color: var(--primary); }

.empty-note {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: .875rem;
}

/* ---- Pagination ------------------------------------------ */
.pagination { margin-top: 20px; display: flex; justify-content: center; gap: 6px; font-size: .85rem; }
.pagination a, .pagination span {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-muted);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 600;
}

/* ---- Guest Login ----------------------------------------- */
.guest-login {
  margin-top: 24px;
  padding: 18px;
  border: 2px dashed #c7d2fe;
  border-radius: 10px;
  text-align: center;
  background: var(--primary-light);
}
.guest-login__note {
  margin: 0 0 10px;
  font-size: .85rem;
  color: var(--text-muted);
}

/* ---- Dashboard ------------------------------------------- */
.dashboard-notice {
  background: #fffbea;
  border: 1px solid #f0c040;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: .875rem;
}
.dashboard-notice__actions { display: flex; gap: 16px; margin-top: 8px; }
.dashboard-household { font-size: .9rem; margin-bottom: 12px; color: var(--text-muted); }

.period-nav { display: flex; gap: 8px; margin-bottom: 20px; }
.period-nav__btn {
  padding: 6px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: .875rem;
  transition: all .15s;
}
.period-nav__btn:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.period-nav__btn--active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  font-weight: 600;
}

.dashboard-summary { display: flex; gap: 14px; margin-bottom: 24px; }
.summary-card {
  flex: 1;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.summary-card__label { font-size: .75rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.summary-card__value { font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.summary-card__unit { font-size: .9rem; font-weight: 400; color: var(--text-muted); margin-left: 2px; }

.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.chart-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
}
.chart-card__title { font-size: .85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 14px; }
.chart-empty { color: #ccc; font-size: .875rem; text-align: center; padding: 40px 0; }
.member-list { margin: 12px 0 0; padding: 0; list-style: none; font-size: .85rem; color: var(--text-muted); }
.member-list li { padding: 5px 0; border-top: 1px solid var(--border); }
.dashboard-link { text-align: right; font-size: .875rem; }

/* ---- Hero (top page) ------------------------------------- */
.hero {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 0 32px;
  text-align: center;
}
.hero__icon { font-size: 2.5rem; margin-bottom: 12px; }
.hero__title {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}
.hero__desc { font-size: 1rem; color: var(--text-muted); margin-bottom: 28px; line-height: 1.7; }
.hero__actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.hero__note { font-size: .8rem; color: var(--text-muted); margin-bottom: 40px; }
.hero__features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 32px;
  text-align: left;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 16px;
}
.feature-card__icon { font-size: 1.4rem; display: block; margin-bottom: 8px; }
.feature-card strong { display: block; font-size: .9rem; margin-bottom: 4px; }
.feature-card p { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }

/* ---- Template Buttons ------------------------------------ */
.template-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0;
}
.template-tap-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: var(--font);
  transition: transform .12s, box-shadow .12s, opacity .15s;
  min-width: 80px;
  text-align: center;
  background: var(--white);
}
.template-tap-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.template-tap-btn:active { transform: scale(.96); }

/* カテゴリ別の色 */
.template-tap-btn--cleaning    { border-color: #bae6fd; background: #f0f9ff; }
.template-tap-btn--laundry     { border-color: #ddd6fe; background: #f5f3ff; }
.template-tap-btn--cooking     { border-color: #fde68a; background: #fffbeb; }
.template-tap-btn--dishwashing { border-color: #a7f3d0; background: #ecfdf5; }
.template-tap-btn--shopping    { border-color: #fbcfe8; background: #fdf2f8; }
.template-tap-btn--childcare   { border-color: #fecaca; background: #fff5f5; }
.template-tap-btn--other       { border-color: #e5e7eb; background: #f9fafb; }

.template-tap-btn__icon    { font-size: 1.5rem; line-height: 1; }
.template-tap-btn__title   { font-size: .82rem; font-weight: 600; color: var(--text); }
.template-tap-btn__minutes { font-size: .72rem; color: var(--text-muted); }

.template-manage-link { margin-top: 12px; font-size: .8rem; }
.accordion__sub { font-size: .75rem; color: var(--text-muted); font-weight: 400; margin-left: 6px; }

/* ---- Template List (管理画面) ---------------------------- */
.template-preview {
  background: var(--primary-light);
  border: 1px solid #c7d2fe;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}
.template-preview__label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.template-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.template-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.template-row__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.template-row__title {
  font-size: .9rem;
  font-weight: 600;
}
.template-row__minutes {
  font-size: .8rem;
  color: var(--text-muted);
}
.template-row__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ---- Empty State ----------------------------------------- */
.empty-state {
  text-align: center;
  padding: 48px 20px;
}
.empty-state__icon  { font-size: 2.5rem; margin-bottom: 12px; }
.empty-state__title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.empty-state__desc  { font-size: .875rem; color: var(--text-muted); margin-bottom: 20px; line-height: 1.7; }

/* ---- Responsive ------------------------------------------ */
@media (max-width: 640px) {
  .hero__title { font-size: 1.8rem; }
  .hero__features { grid-template-columns: 1fr; }
  .chart-grid { grid-template-columns: 1fr; }
  .dashboard-summary { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .app-logo__img { height: 28px; }
  .app-nav-links a { padding: 4px 6px; font-size: .76rem; }
  .app-nav-primary { padding: 5px 9px !important; font-size: .76rem !important; }
  .app-user { display: none; } /* モバイルでは名前を非表示 */
}

/* ---- OmniAuth / Google ボタン ------------------------------------------ */
.omniauth-buttons {
  margin: 16px 0;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: .95rem;
  font-weight: 500;
  color: #3c4043;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
  text-decoration: none;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}

.btn-google__icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.omniauth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: .85rem;
}

.omniauth-divider::before,
.omniauth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
/* ---- LP セクション共通 ------------------------------------------ */
.lp-section {
  padding: 64px 20px;
}

.lp-section__inner {
  max-width: 800px;
  margin: 0 auto;
}

.lp-section__title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text);
}

/* ---- LP 課題提起 ------------------------------------------ */
.lp-problems {
  background: var(--white);
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.problem-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  font-size: .95rem;
  line-height: 1.6;
}

.problem-card__icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* ---- LP ステップ ------------------------------------------ */
.lp-steps {
  background: var(--white);
}

.step-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
}

.step-item__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-item__body strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-item__body p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---- LP CTA ------------------------------------------ */
.lp-cta {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: #fff;
}

.lp-cta__inner {
  text-align: center;
}

.lp-cta__title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

.lp-cta__desc {
  font-size: 1rem;
  opacity: .85;
  margin-bottom: 28px;
}

.lp-cta__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lp-cta .btn-secondary {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-color: rgba(255,255,255,.4);
}

.lp-cta .btn-secondary:hover {
  background: rgba(255,255,255,.25);
}

/* Hero badge */
.hero__badge {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  font-size: .8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}

/* btn-lg */
.btn-lg {
  padding: 12px 28px !important;
  font-size: 1rem !important;
}

/* ---- 静的ページ（利用規約・プライバシーポリシー） ------------------- */
.static-page {
  max-width: 760px;
  margin: 40px auto;
  padding: 0 20px 60px;
}

.static-page__header {
  margin-bottom: 36px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 20px;
}

.static-page__title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.static-page__date {
  font-size: .85rem;
  color: var(--text-muted);
}

.static-page__body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.static-page__section h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.static-page__section p,
.static-page__section li {
  font-size: .95rem;
  line-height: 1.8;
  color: var(--text);
}

.static-page__section ul {
  padding-left: 1.5em;
}

.static-page__section li {
  margin-bottom: 6px;
}

.static-page__footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: .9rem;
}

/* ---- フッターリンク ------------------------------------------ */
.app-footer__links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 8px;
  font-size: .85rem;
}

/* ---- ハンバーガーメニュー（モバイル） ------------------------------------------ */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger__line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

.nav-drawer {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}

.nav-drawer.is-open {
  display: flex;
}

.nav-drawer a,
.nav-drawer form button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: .95rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 6px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
}

.nav-drawer a:hover,
.nav-drawer form button:hover {
  background: var(--bg);
}

.nav-drawer .nav-drawer__cta {
  margin-top: 8px;
  padding: 10px;
  background: var(--primary);
  color: #fff;
  text-align: center;
  border-radius: 8px;
  font-weight: 600;
}

/* ---- ローディングスピナー ------------------------------------------ */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

.spinner--dark {
  border-color: rgba(0,0,0,.15);
  border-top-color: var(--primary);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- LP / 静的ページのレスポンシブ追加 ------------------------------------------ */
@media (max-width: 640px) {
  .problem-grid { grid-template-columns: 1fr; }
  .lp-section { padding: 40px 16px; }
  .lp-section__title { font-size: 1.25rem; margin-bottom: 28px; }
  .step-item { flex-direction: column; gap: 12px; }
  .lp-cta__title { font-size: 1.3rem; }
  .lp-cta__actions { flex-direction: column; align-items: center; }
  .nav-hamburger { display: flex; }
  .app-nav-links { display: none; } /* デスクトップメニューをモバイルで非表示 */
}

/* ---- オートコンプリート ------------------------------------------ */
.autocomplete-wrap {
  position: relative;
  flex: 1;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
  list-style: none;
  padding: 4px 0;
}

.autocomplete-item {
  padding: 9px 14px;
  font-size: .9rem;
  cursor: pointer;
  transition: background .1s;
}

.autocomplete-item:hover,
.autocomplete-item[aria-selected="true"] {
  background: var(--primary-light);
  color: var(--primary);
}

.autocomplete-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
