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

/* --- Design Tokens & Variables --- */
:root {
  --primary-color: #ff7e79;      /* Warm soft coral/pink */
  --primary-hover: #ff655f;
  --primary-light: #fff3f2;      /* Soft pink background */
  --secondary-color: #4ebfa5;    /* Trustworthy soft sage green */
  --secondary-light: #effaf7;
  --text-dark: #2c2a29;          /* Deep warm grey (never solid black for better reading) */
  --text-medium: #5c5755;        /* Secondary body text */
  --text-light: #8c8582;         /* Captions, dates */
  --bg-color: #fbf9f7;           /* Warm soft off-white background */
  --card-bg: #ffffff;
  --border-color: #f2ebe6;
  
  --font-family-base: 'Noto Sans JP', sans-serif;
  --font-family-numeric: 'Outfit', sans-serif;
  
  --border-radius-sm: 8px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;
  
  --shadow-sm: 0 2px 8px rgba(44, 42, 41, 0.04);
  --shadow-md: 0 8px 24px rgba(255, 126, 121, 0.08), 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 16px 36px rgba(44, 42, 41, 0.1);
  --shadow-btn: 0 8px 20px rgba(255, 126, 121, 0.35);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-base);
  color: var(--text-dark);
  background-color: var(--bg-color);
  line-height: 1.85;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 660px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header & Footer --- */
.site-header {
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--primary-color);
}

.logo-icon {
  width: 28px;
  height: 28px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.8rem;
  font-weight: bold;
}

.logo-sub {
  font-size: 0.65rem;
  color: var(--text-light);
  font-weight: normal;
  display: block;
}

.header-badge {
  font-size: 0.7rem;
  background-color: var(--secondary-light);
  color: var(--secondary-color);
  padding: 4px 10px;
  border-radius: 30px;
  font-weight: 500;
  border: 1px solid rgba(78, 191, 165, 0.2);
}

/* --- Article Elements --- */
.article-header {
  padding: 24px 0 16px;
}

.category-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: bold;
  color: var(--primary-color);
  background-color: var(--primary-light);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 12px;
}

h1.entry-title {
  font-size: 1.6rem;
  line-height: 1.4;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-dark);
}

@media (min-width: 480px) {
  h1.entry-title {
    font-size: 1.85rem;
  }
}

.meta-info {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.meta-item .number {
  font-family: var(--font-family-numeric);
  font-weight: 600;
}

/* --- Rich Article Content & Typography --- */
.article-body {
  padding-bottom: 100px; /* Space for sticky CTA */
}

p {
  margin-bottom: 24px;
  font-size: 1.05rem;
  color: var(--text-dark);
  text-align: justify;
}

/* Headings */
h2 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 48px 0 24px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(255,243,242,0.3) 100%);
  border-left: 5px solid var(--primary-color);
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
  color: var(--text-dark);
  position: relative;
  box-shadow: var(--shadow-sm);
}

h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 32px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--secondary-color);
  color: var(--text-dark);
}

/* Image Wrapper and Caption */
.image-wrapper {
  margin: 20px 0 28px;
  text-align: center;
}

.image-wrapper img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  display: block;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.image-caption {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 8px;
  display: block;
}

/* Interactive Highlight Markers */
.mk {
  background: linear-gradient(transparent 60%, rgba(255, 235, 59, 0.45) 60%);
  font-weight: bold;
}

.js-marker.active {
  animation: draw-marker 1.2s forwards ease-out;
}

@keyframes draw-marker {
  0% {
    background-size: 0% 100%;
  }
  100% {
    background-size: 100% 100%;
  }
}

/* Summary Box */
.summary-box {
  background-color: var(--primary-light);
  border: 1px solid rgba(255, 126, 121, 0.2);
  border-radius: var(--border-radius-md);
  padding: 20px 24px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
}

.summary-box::before {
  content: "この記事のポイント";
  display: block;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 0.95rem;
  margin-bottom: 12px;
  border-bottom: 1px dashed rgba(255, 126, 121, 0.3);
  padding-bottom: 6px;
}

.summary-box ul {
  list-style: none;
}

.summary-box li {
  font-size: 0.95rem;
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  color: var(--text-dark);
  font-weight: 500;
}

.summary-box li:last-child {
  margin-bottom: 0;
}

.summary-box li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: 700;
  font-size: 1rem;
}

/* Note Box */
.note {
  background-color: var(--secondary-light);
  border-left: 4px solid var(--secondary-color);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  padding: 16px 20px;
  margin: 28px 0;
  font-size: 0.9rem;
  color: var(--text-medium);
}

.note p {
  margin: 0;
  font-size: 0.9rem;
}

/* Review Speech Balloons */
.balloon {
  position: relative;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 20px;
  margin: 24px 0 28px 12px;
  box-shadow: var(--shadow-sm);
  font-size: 0.95rem;
  color: var(--text-dark);
}

.balloon::before {
  content: "";
  position: absolute;
  top: 20px;
  left: -9px;
  width: 16px;
  height: 16px;
  background-color: var(--card-bg);
  border-left: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  transform: rotate(45deg);
}

.balloon::after {
  content: "利用者の口コミ";
  position: absolute;
  top: -12px;
  right: 16px;
  font-size: 0.65rem;
  background-color: var(--secondary-color);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Comparison / Spec Table */
.spec-table-container {
  overflow-x: auto;
  margin: 28px 0;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  text-align: left;
  min-width: 450px;
}

.spec-table th, .spec-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.spec-table th {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 700;
  width: 30%;
  vertical-align: middle;
}

.spec-table td {
  color: var(--text-dark);
  background-color: var(--card-bg);
}

.spec-table tr:last-child th, .spec-table tr:last-child td {
  border-bottom: none;
}

/* For step-by-step specific tables */
.spec-table th {
  font-size: 0.85rem;
}

.spec-table td {
  font-size: 0.85rem;
  line-height: 1.6;
}

/* --- Call to Action (CTA) --- */
.cta-area {
  background: linear-gradient(135deg, #fffcfb 0%, #fff3f1 100%);
  border: 2px solid var(--primary-light);
  border-radius: var(--border-radius-lg);
  padding: 32px 24px;
  margin: 40px 0;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.cta-area::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background-color: var(--primary-color);
}

.cta-area p {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: white;
  padding: 6px 14px;
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
  line-height: 1.4;
}

.cta-button {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary-color) 0%, #ff524b 100%);
  color: white;
  font-weight: 700;
  font-size: 1.15rem;
  padding: 16px 24px;
  border-radius: 50px;
  box-shadow: var(--shadow-btn);
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  letter-spacing: 0.05em;
  border: none;
  cursor: pointer;
}

.cta-button::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(30deg);
  animation: shine 4s infinite linear;
}

@keyframes shine {
  0% { transform: translate(-30%, -30%) rotate(30deg); }
  20% { transform: translate(30%, 30%) rotate(30deg); }
  100% { transform: translate(30%, 30%) rotate(30deg); }
}

.cta-button:hover {
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(255, 126, 121, 0.45);
}

.cta-button:active {
  transform: translateY(1px);
}

/* --- Floating Sticky CTA for Mobile --- */
.floating-cta-wrap {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--border-color);
  padding: 12px 20px 20px;
  box-shadow: 0 -8px 30px rgba(44, 42, 41, 0.08);
  z-index: 999;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.floating-cta-wrap.visible {
  transform: translateY(0);
}

.floating-cta-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-medium);
  margin-bottom: 6px;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 4px;
}

.floating-cta-text .highlight {
  color: var(--primary-color);
}

.floating-cta-btn {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #ff524b 100%);
  color: white;
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 20px;
  border-radius: 50px;
  box-shadow: var(--shadow-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform var(--transition-fast);
}

.floating-cta-btn::before {
  content: "";
  width: 8px;
  height: 8px;
  background-color: white;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0.5; }
}

.floating-cta-btn:hover {
  color: white;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
}

.footer-logo {
  font-weight: 700;
  color: var(--text-medium);
  font-size: 1rem;
  margin-bottom: 12px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-light);
}

.footer-links a:hover {
  color: var(--primary-color);
}

.copyright {
  margin-top: 8px;
}

/* --- Scroll Progress Bar --- */
.progress-bar-container {
  position: fixed;
  top: 57px; /* Matches header height */
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 101;
  pointer-events: none;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  width: 0%;
  transition: width 0.1s ease-out;
}

/* --- Related Link Box --- */
.related-link-box {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--secondary-color);
  border-radius: var(--border-radius-md);
  padding: 16px 20px;
  margin: 28px 0;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.related-link-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}

.related-link-badge {
  font-size: 0.7rem;
  background-color: var(--secondary-light);
  color: var(--secondary-color);
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
}

.related-link-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.45;
}

.related-link-title a {
  color: var(--text-dark);
  transition: color var(--transition-fast);
}

.related-link-title a:hover {
  color: var(--secondary-color);
}

