/* ==========================================================================
   おともAI チラシ専用スタイルシート (A4 Print & Web Preview)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700;900&family=Outfit:wght@600;800&family=Zen+Maru+Gothic:wght@500;700;900&display=swap');

:root {
  --primary: #FF7A45;
  --primary-dark: #E65A28;
  --primary-light: #FFF2EB;
  --secondary: #10B981;
  --secondary-light: #ECFDF5;
  --accent: #F59E0B;
  --accent-light: #FEF3C7;
  
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  
  --bg-page: #FAF8F5;
  --bg-card: #FFFFFF;
  --border-color: #E2E8F0;
  
  --font-base: 'Noto Sans JP', sans-serif;
  --font-rounded: 'Zen Maru Gothic', 'Noto Sans JP', sans-serif;
  --font-en: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

body {
  font-family: var(--font-base);
  color: var(--text-main);
  background-color: #525659;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================
   Webプレビュー時のツールバー（印刷時は非表示）
   ========================================== */
.preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: #1E293B;
  color: #FFFFFF;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.preview-toolbar .title-area h1 {
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.preview-toolbar .title-area p {
  font-size: 0.8rem;
  color: #94A3B8;
}

.toolbar-actions {
  display: flex;
  gap: 12px;
}

.btn-print {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-print:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-guide {
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* ==========================================
   用紙コンテナ・A4サイズ定義
   ========================================== */
.flyer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 32px 16px;
}

.page {
  width: 210mm;
  height: 297mm;
  min-height: 297mm;
  max-height: 297mm;
  background: var(--bg-page);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.25);
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   【表面】ご家族向け (Front Page: Family Watch)
   ========================================================================== */
.front-page {
  padding: 13mm 14mm 12mm 14mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, #FFF9F5 0%, #FAF8F5 100%);
}

/* ヘッダー */
.front-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #FFE0D0;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-logo .logo-mark {
  font-size: 1.8rem;
  line-height: 1;
}

.brand-logo .logo-text {
  font-family: var(--font-rounded);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.brand-badge-list {
  display: flex;
  gap: 6px;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

.badge-orange {
  background: var(--primary-light);
  color: var(--primary-dark);
  border: 1px solid #FFCCBA;
}

.badge-green {
  background: var(--secondary-light);
  color: var(--secondary);
  border: 1px solid #A7F3D0;
}

/* ヒーローセクション */
.front-hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 12px;
  background: white;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 4px 16px rgba(255, 122, 69, 0.08);
  border: 1.5px solid #FFE8DD;
  position: relative;
  margin-bottom: 12px;
}

.hero-lead-badge {
  display: inline-block;
  background: #FFF1EB;
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.front-hero-title {
  font-family: var(--font-rounded);
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.25;
  color: #0F172A;
  margin-bottom: 6px;
}

.front-hero-title .highlight-orange {
  color: var(--primary);
  background: linear-gradient(transparent 60%, #FFE2D4 60%);
}

.front-hero-subtitle {
  font-size: 0.82rem;
  color: #475569;
  line-height: 1.45;
  font-weight: 500;
}

.front-hero-img-wrap {
  text-align: center;
  position: relative;
}

.front-hero-img {
  width: 100%;
  max-width: 155px;
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.12));
}

.hero-speech-bubble {
  position: absolute;
  top: -8px;
  left: -10px;
  background: #FEF3C7;
  border: 1.5px solid #FDE68A;
  color: #92400E;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  white-space: nowrap;
}

/* お悩み提起セクション */
.concerns-section {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.section-label-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.section-label-bar h3 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #334155;
}

.concerns-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.concern-item {
  background: #F8FAFC;
  border: 1px solid #EDF2F7;
  border-radius: 8px;
  padding: 8px;
  font-size: 0.75rem;
  color: #475569;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.35;
}

.concern-icon {
  color: #EF4444;
  font-size: 0.95rem;
  line-height: 1;
}

/* 解決・特徴 3つのポイント */
.features-section {
  margin-bottom: 12px;
}

.features-title-wrap {
  text-align: center;
  margin-bottom: 8px;
}

.features-main-heading {
  font-family: var(--font-rounded);
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--primary-dark);
}

.front-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.front-feature-card {
  background: white;
  border: 1.5px solid #FFE4D6;
  border-radius: 10px;
  padding: 10px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.feature-number-badge {
  position: absolute;
  top: -8px;
  left: 10px;
  background: var(--primary);
  color: white;
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 0.75rem;
  padding: 1px 8px;
  border-radius: 10px;
}

.feature-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  margin-bottom: 6px;
}

.feature-card-icon {
  font-size: 1.25rem;
}

.feature-card-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.25;
}

.feature-card-body {
  font-size: 0.72rem;
  color: #475569;
  line-height: 1.4;
}

/* 比較・安心ポイント帯 */
.compare-strip {
  background: #F0FDF4;
  border: 1.5px dashed #86EFAC;
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.compare-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: #166534;
}

.compare-highlights {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

.compare-item {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #15803D;
}

/* 利用者の声 */
.voice-banner {
  background: white;
  border: 1px solid #E2E8F0;
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.voice-tag {
  background: var(--accent-light);
  color: #92400E;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.voice-quote {
  font-size: 0.74rem;
  color: #334155;
  line-height: 1.35;
}

/* CTA フッター */
.front-footer {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: white;
  border-radius: 12px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px;
  align-items: center;
}

.cta-main-msg h4 {
  font-family: var(--font-rounded);
  font-size: 1.1rem;
  font-weight: 800;
  color: #FBBF24;
  margin-bottom: 4px;
}

.cta-main-msg p {
  font-size: 0.76rem;
  color: #CBD5E1;
  line-height: 1.35;
  margin-bottom: 6px;
}

.cta-specs {
  display: flex;
  gap: 10px;
  font-size: 0.7rem;
  color: #94A3B8;
}

.cta-qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
  padding: 8px 6px;
  border-radius: 8px;
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.qr-img {
  width: 74px;
  height: 74px;
  display: block;
}

.qr-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: 3px;
  text-align: center;
}

.search-badge {
  display: inline-block;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  color: #1E293B;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  text-align: center;
  white-space: nowrap;
}

/* ==========================================================================
   【裏面】シニアご本人向け (Back Page: Senior User)
   ========================================================================== */
.back-page {
  padding: 13mm 14mm 12mm 14mm;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(180deg, #F0FDF4 0%, #FAF8F5 100%);
}

/* ヘッダー */
.back-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #A7F3D0;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.back-header-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.device-note-badge {
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
}

.senior-title-tag {
  background: #059669;
  color: white;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 20px;
}

/* ヒーロー */
.back-hero {
  background: white;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
  border: 2px solid #BBF7D0;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.back-hero-badge {
  display: inline-block;
  background: #ECFDF5;
  color: #047857;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.back-hero-title {
  font-family: var(--font-rounded);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.25;
  color: #064E3B;
  margin-bottom: 6px;
}

.back-hero-title .highlight-green {
  color: #059669;
  background: linear-gradient(transparent 60%, #D1FAE5 60%);
}

.back-hero-desc {
  font-size: 0.84rem;
  color: #1F2937;
  font-weight: 500;
  line-height: 1.45;
}

.back-hero-img-wrap {
  text-align: center;
}

.back-hero-img {
  width: 100%;
  max-width: 140px;
  height: auto;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,0.12));
}

/* シニア向け4大機能グリッド */
.senior-functions {
  margin-bottom: 12px;
}

.senior-func-title {
  text-align: center;
  font-family: var(--font-rounded);
  font-size: 1.15rem;
  font-weight: 900;
  color: #065F46;
  margin-bottom: 8px;
}

.senior-func-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.senior-func-card {
  background: white;
  border: 1.5px solid #E5E7EB;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.senior-func-card.highlight-card {
  border-color: #6EE7B7;
  background: #F6FEF9;
}

.func-icon-box {
  background: #ECFDF5;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.func-info h4 {
  font-family: var(--font-rounded);
  font-size: 0.94rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 3px;
}

.func-info p {
  font-size: 0.78rem;
  color: #1F2937;
  line-height: 1.38;
}

/* かんたん3ステップ */
.steps-section {
  background: white;
  border: 1.5px solid #D1D5DB;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 12px;
}

.steps-heading {
  font-family: var(--font-rounded);
  font-size: 0.98rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  position: relative;
}

.step-box {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}

.step-tag {
  background: #059669;
  color: white;
  font-weight: 800;
  font-size: 0.65rem;
  padding: 2px 8px;
  border-radius: 12px;
  display: inline-block;
  margin-bottom: 4px;
}

.step-box h5 {
  font-size: 0.85rem;
  font-weight: 800;
  color: #111827;
  margin-bottom: 3px;
}

.step-box p {
  font-size: 0.72rem;
  color: #374151;
  line-height: 1.35;
}

/* 裏面フッター */
.back-footer {
  background: #064E3B;
  color: white;
  border-radius: 12px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 12px;
  align-items: center;
}

.back-cta-info h4 {
  font-family: var(--font-rounded);
  font-size: 1.05rem;
  font-weight: 800;
  color: #A7F3D0;
  margin-bottom: 4px;
}

.back-cta-info p {
  font-size: 0.75rem;
  color: #E5E7EB;
  line-height: 1.35;
  margin-bottom: 6px;
}

.back-support-note {
  font-size: 0.68rem;
  color: #9CA3AF;
}

.back-qr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
  padding: 8px 6px;
  border-radius: 8px;
  color: var(--text-main);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ==========================================================================
   印刷設定 (@media print)
   ========================================================================== */
@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }
  
  body {
    background: transparent;
    padding: 0;
  }
  
  .preview-toolbar {
    display: none !important;
  }
  
  .flyer-container {
    padding: 0;
    gap: 0;
  }
  
  .page {
    width: 210mm;
    height: 297mm;
    min-height: 297mm;
    max-height: 297mm;
    box-shadow: none;
    page-break-after: always;
    page-break-inside: avoid;
    break-after: page;
  }
}
