@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 for Potepan Freelance --- */
:root {
  --primary-color: #ff6b00;      /* Potepan bright orange */
  --primary-hover: #e55a00;
  --primary-light: #fff5ee;      /* Soft warm peach background */
  --secondary-color: #0f172a;    /* High-credibility deep navy slate */
  --secondary-hover: #1e293b;
  --secondary-light: #f1f5f9;    /* Clean cool grey background */
  --accent-color: #0284c7;       /* Bright tech cyan/blue for secondary accents */
  --accent-light: #f0f9ff;
  
  --text-dark: #1e293b;          /* Sleek charcoal grey (highly readable, non-harsh) */
  --text-medium: #475569;        /* Body text */
  --text-light: #64748b;         /* Captions, subtext, dates */
  --bg-color: #f8fafc;           /* Crisp slate-tinted white background */
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  
  --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 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(255, 107, 0, 0.06), 0 2px 8px rgba(15, 23, 42, 0.02);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.08);
  --shadow-btn: 0 10px 25px rgba(255, 107, 0, 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.1rem;
  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.85rem;
  font-weight: bold;
  font-family: var(--font-family-numeric);
}

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

.header-badge {
  font-size: 0.7rem;
  background-color: var(--primary-light);
  color: var(--primary-color);
  padding: 4px 10px;
  border-radius: 30px;
  font-weight: 500;
  border: 1px solid rgba(255, 107, 0, 0.15);
}

/* --- Article Header --- */
.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;
  border: 1px solid rgba(255, 107, 0, 0.1);
}

h1.entry-title {
  font-size: 1.55rem;
  line-height: 1.45;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--secondary-color);
}

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

.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;
}

/* --- Article Content & Typography --- */
.article-body {
  padding-bottom: 110px; /* Space for sticky mobile 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,245,238,0.2) 100%);
  border-left: 5px solid var(--primary-color);
  border-radius: 0 var(--border-radius-md) var(--border-radius-md) 0;
  color: var(--secondary-color);
  position: relative;
  box-shadow: var(--shadow-sm);
}

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

/* 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;
}

/* Highlight Marker Styles */
.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%;
  }
}

/* Specialized Elements */

/* 1. Summary Box */
.summary-box {
  background-color: var(--primary-light);
  border: 1px solid rgba(255, 107, 0, 0.15);
  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, 107, 0, 0.25);
  padding-bottom: 6px;
}

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

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

.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: 1.05rem;
}

/* 2. Note Box */
.note {
  background-color: var(--accent-light);
  border-left: 4px solid var(--accent-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);
  box-shadow: var(--shadow-sm);
}

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

/* 3. Review Speech Balloon */
.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(--accent-color);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* 4. Custom Lists within Article body */
ul {
  margin-bottom: 24px;
  padding-left: 20px;
}

li {
  font-size: 1.05rem;
  color: var(--text-dark);
  margin-bottom: 8px;
}

ol {
  margin-bottom: 24px;
  padding-left: 20px;
}

ol li {
  margin-bottom: 12px;
}

/* 5. Spec Table (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);
  vertical-align: middle;
}

.spec-table th {
  background-color: var(--primary-light);
  color: var(--primary-color);
  font-weight: 700;
  font-size: 0.85rem;
  width: 25%;
}

.spec-table td {
  color: var(--text-dark);
  background-color: var(--card-bg);
  font-size: 0.85rem;
  line-height: 1.6;
}

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

/* --- Call to Action (CTA) --- */
.cta-area {
  background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 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;
  border: 1px solid rgba(255, 107, 0, 0.1);
}

.cta-button {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary-color) 0%, #ff5200 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 4.5s 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, 107, 0, 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.96);
  border-top: 1px solid var(--border-color);
  padding: 12px 20px 20px;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.06);
  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%, #ff5200 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;
}

/* --- Scroll Progress Bar --- */
.progress-bar-container {
  position: fixed;
  top: 57px; /* Matches sticky 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(--accent-color));
  width: 0%;
  transition: width 0.1s ease-out;
}

/* --- 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;
}

/* --- Related Articles Section --- */
.related-articles {
  margin: 56px 0 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 40px;
}

.related-articles-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 24px;
  position: relative;
  padding-left: 12px;
  border-left: 4px solid var(--primary-color);
  line-height: 1.4;
}

.article-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  margin-bottom: 20px;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.article-card a {
  display: flex;
  color: inherit;
  text-decoration: none;
}

.article-card-img {
  width: 110px;
  min-width: 110px;
  height: 110px;
  object-fit: cover;
  display: block;
}

@media (min-width: 480px) {
  .article-card-img {
    width: 150px;
    min-width: 150px;
    height: 120px;
  }
}

.article-card-content {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}

.article-card-tag {
  font-size: 0.65rem;
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}

.article-card-heading {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--secondary-color);
  margin-bottom: 6px;
  transition: color var(--transition-fast);
}

.article-card:hover .article-card-heading {
  color: var(--primary-color);
}

.article-card-excerpt {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

