/* --- Reset & Base Styles (2026 Trend: Clean & Readable) --- */
:root {
  --primary-color: #222;
  --secondary-color: #444;
  --accent-color: #000;
  --brand-color: #ff421a;
  --bg-color: #f9f9f9;
  /* 目に優しいオフホワイト */
  --white: #ffffff;
  --border-color: #ddd;
  --spacing-sm: 16px;
  --spacing-md: 32px;
  --spacing-lg: 60px;
  --font-base: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  color: var(--primary-color);
  background-color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.7;
}

/* --- Components --- */
.page-container {
  width: 100%;
  max-width: 1024px;
  /* 2026 Standard for reading content */
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

/* サムネイル画像 */
.issue-cover-thumb {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  color: #999;
  font-size: 14px;
  aspect-ratio: 3/4;
  /* 雑誌の比率 */
  width: 100%;
  display: block;
  object-fit: cover;
}

/* --- Header --- */
.magazine-header {
  background-color: var(--brand-color);
  padding: 20px 0;
  margin-bottom: var(--spacing-md);
  color: var(--white);
}

.magazine-header h1 {
  font-size: 18px;
  font-weight: bold;
  text-align: left;
  color: inherit;
}

/* --- Subscription Notice --- */
.subscription-notice-section {
  margin: -16px 0 16px;
}

.subscription-notice-text {
  margin-bottom: var(--spacing-md);
  font-size: 14px;
  line-height: 1.6;
  color: var(--primary-color);
}

.subscription-notice-text a {
  color: #1f5fbf;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Header Notice --- */
.header-notice-section {
  margin: -16px 0 var(--spacing-md);
}

.header-notice-box {
  border: 1px solid #d8d8d8;
  background: #f8f8f8;
  border-radius: 4px;
  padding: 10px 14px;
}

.header-notice-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #c73a1b;
  margin-bottom: 4px;
}

.header-notice-label::before {
  content: "";
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: url("../images/info.svg") center / contain no-repeat;
}

.header-notice-text {
  font-size: 14px;
  color: var(--primary-color);
  line-height: 1.5;
}

/* --- Section Common --- */
.section-heading {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: var(--spacing-sm);
  border-left: 4px solid var(--brand-color);
  /* アクセント装飾 */
  padding-left: 10px;
}

/* --- Latest Issue --- */
.latest-issue-section {
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: var(--spacing-md);
}

.latest-issue-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.latest-issue-cover {
  width: 220px;
  /* SP default */
  max-width: 100%;
  margin: 0 auto;
}

.latest-issue-meta {
  flex: 1;
}

.latest-issue-date {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  display: block;
}

.latest-issue-date-note {
  font-size: 14px;
  /* margin-bottom: 20px; */
}

.latest-issue-notice {
  font-size: 12px;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.issue-read-button {
  display: block;
  border: 1px solid #1f5fbf;
  padding: 12px 40px 12px 16px;
  background: #2f7de1;
  color: #fff;
  border-radius: 6px;
  /* 少し丸みを持たせるのがトレンド */
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  min-width: 0;
  width: 100%;
  margin: 0;
  position: relative;
  transition: opacity 0.3s ease, background-color 0.2s ease;
}

.issue-read-button::after {
  content: "";
  width: 18px;
  height: 18px;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background-color: currentColor;
  -webkit-mask: url("../images/external-link.svg") center / contain no-repeat;
  mask: url("../images/external-link.svg") center / contain no-repeat;
}

.issue-read-button:hover {
  background: #1f5fbf;
  color: #fff;
  opacity: 0.7;
}

/* --- Back Number --- */
.back-issues-section {
  margin-bottom: var(--spacing-lg);
}

.back-issues-filter {
  margin-bottom: var(--spacing-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

.back-issues-note {
  font-size: 12px;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.back-issues-year {
  padding: 8px 12px;
  font-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  min-width: 120px;
  cursor: pointer;
}

.back-issues-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.is-loading .back-issues-grid {
  visibility: hidden;
}

.back-issue-card {
  cursor: pointer;
}

.back-issue-card[hidden] {
  display: none;
}

.back-issue-link {
  display: block;
  background: #f5f5f5;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  padding: 10px 40px 10px 16px;
  font-size: 14px;
  font-weight: bold;
  line-height: 1.4;
  position: relative;
  white-space: nowrap;
}

.back-issue-link::after {
  content: "\003E";
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
}

/* --- Footer --- */
.magazine-footer {
  background-color: var(--brand-color);
  padding: 20px 0;
  text-align: center;
  font-size: 12px;
  color: var(--white);
  margin-top: auto;
}

.footer-links {
  margin: 8px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
}

.footer-links a {
  color: inherit;
  padding: 2px 0;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  text-decoration-thickness: 2px;
}

/* --- Responsive (PC Breakpoint: 768px+) --- */
@media screen and (min-width: 768px) {
  .page-container {
    padding: 0 var(--spacing-md);
  }

  .magazine-header h1 {
    font-size: 22px;
  }

  .header-notice-section {
    margin-top: -18px;
  }

  /* Latest Issue: PC Layout */
  .latest-issue-body {
    flex-direction: row;
    align-items: flex-start;
    gap: 40px;
  }

  .latest-issue-cover {
    width: 240px;
    flex-shrink: 0;
    margin: 0;
  }

  .latest-issue-date {
    font-size: 22px;
  }

  .latest-issue-date-note {
    font-size: 16px;
  }

  .issue-read-button {
    display: inline-block;
    width: auto;
    min-width: 200px;
    font-size: 14px;
    font-weight: 700;
  }

  /* Back Number: PC Layout */
  .back-issues-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 8px;
  }

  .back-issue-link {
    font-size: 14px;
    padding: 12px 44px 12px 16px;
  }
}
