/* ============================================
   Main Stylesheet
   Magazine-style design
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  --bg-base:       #ffffff;
  --bg-surface:    #f5f5f5;
  --bg-card:       #ffffff;
  --bg-overlay:    rgba(0,0,0,0.6);

  --accent:        #3880ff;
  --accent-hover:  #5a9bff;
  --accent-light:  rgba(56, 128, 255, 0.08);
  --affiliate-amazon: #f99a0c;
  --affiliate-rakuten: #e0423c;
  --affiliate-yahoo: #438ee8;
  --affiliate-highlight: #069A8E;
  --ui-info: #2f80ed;
  --ui-info-bg: #eaf4ff;
  --ui-info-border: #8fc2ff;
  --ui-pick: #0f9f77;
  --ui-pick-bg: #eaf9f3;
  --ui-pick-border: #87d8b9;
  --ui-warn: #f39c12;
  --ui-warn-bg: #fff5e8;
  --ui-warn-border: #f3c27a;
  --ui-soft: #e85d8e;
  --ui-soft-bg: #fff1f6;
  --ui-soft-border: #f4bdd0;
  --ui-note: #6b7a8c;
  --ui-note-bg: #f5f7fa;
  --ui-note-border: #d6dde7;

  --text-primary:  #1a1a1a;
  --text-secondary:#555555;
  --text-muted:    #999999;

  --border:        #e0e0e0;
  --border-light:  #ececec;

  --header-bg:     #ffffff;
  --header-height: 64px;

  --font-body:     system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display:  'MPLUS 1', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;

  --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.15);

  --transition: 0.22s ease;
}

@font-face {
  font-family: 'MPLUS 1';
  src: url('/fonts/MPLUS1-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

.affiliate-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 28px;
}

.affiliate-sale {
  margin: 18px 0 14px;
  padding: 14px 16px 16px;
  border: 1px solid color-mix(in srgb, var(--affiliate-highlight) 24%, white);
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--affiliate-highlight) 12%, white), #ffffff 60%);
}

.affiliate-sale-label {
  margin: 0 0 10px;
  color: var(--affiliate-highlight);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.5;
}

.affiliate-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition), color var(--transition);
}

.affiliate-link:hover {
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.16);
  filter: saturate(1.05) brightness(1.03);
}

.affiliate-link:visited,
.affiliate-link:active {
  color: #fff !important;
}

.affiliate-link:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--affiliate-highlight) 30%, white);
  outline-offset: 2px;
}

.affiliate-link-amazon {
  background: var(--affiliate-amazon);
}

.affiliate-link-rakuten {
  background: var(--affiliate-rakuten);
}

.affiliate-link-yahoo {
  background: var(--affiliate-yahoo);
}

.affiliate-link-sale {
  background: var(--affiliate-highlight);
}

.affiliate-compact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.affiliate-compact-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.affiliate-compact-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.affiliate-compact-thumb img {
  width: 64px;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: #f3f4f6;
  padding: 4px;
}

.affiliate-compact-thumb-link {
  display: block;
}

.affiliate-compact-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.affiliate-compact-note {
  margin: 0 0 6px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.affiliate-compact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.affiliate-link-compact {
  width: fit-content;
  min-width: 0;
  padding: 5px 9px;
  font-size: 11px;
  box-shadow: none;
  line-height: 1.2;
  white-space: nowrap;
}

.product-inline-image {
  width: min(180px, 100%);
  margin: 10px auto 0;
}

.product-inline-image-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid #e6eefc;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  padding: 10px;
  box-shadow: 0 6px 18px rgba(76, 141, 255, 0.08);
}

.product-inline-image-caption {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.article-photo {
  margin: 18px auto 20px;
  max-width: 760px;
}

.article-photo-img {
  width: 100%;
  display: block;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}

.article-photo-caption {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.control-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  justify-content: center;
  gap: 10px;
  margin: 10px 0 14px;
}

.control-compare-item {
  margin: 0;
  padding: 8px;
  border: 1px solid #d9e5fb;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 4px 14px rgba(76, 141, 255, 0.08);
}

.control-compare-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  border-radius: 10px;
  background: #ffffff;
}

.control-compare-caption {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-top: 6px;
  text-align: center;
}

.control-compare-caption strong {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

.control-compare-caption span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.control-compare-caption small {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}


.product-card {
  margin: 24px 0;
  padding: 20px;
  border: 1px solid #d0dff7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.product-card-header {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  grid-template-areas:
    "image title"
    "image spec"
    "image summary";
  gap: 20px;
  align-items: start;
  margin-bottom: 12px;
}

.product-card-header.is-text-only {
  display: block;
  margin-bottom: 12px;
}

.product-card-header .product-card-name {
  grid-area: title;
  align-self: end;
}

.product-card-image-wrap {
  grid-area: image;
  width: 196px;
  aspect-ratio: 1;
  border: 1px solid #e6eefc;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f6f9ff);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(76, 141, 255, 0.08);
}

.product-card-image-link {
  display: block;
  width: 100%;
  height: 100%;
}

.product-card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition);
}

.product-card-image-link:hover .product-card-image {
  transform: scale(1.03);
}

.product-card-rank {
  display: inline-block;
  background: #4c8dff;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 4px;
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}

.product-card-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 10px;
  line-height: 1.5;
  color: var(--text-primary);
}

.product-card-spec {
  grid-area: spec;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.product-card-spec span {
  background: #f0f5ff;
  color: #2563cc;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #c5d8ff;
}

.product-card-summary {
  margin: 0 0 14px;
  color: #7a3d00;
  background: #fff1df;
  border: 1px solid #ffc982;
  border-left: 5px solid #f59e0b;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  line-height: 1.7;
}

.product-card-summary-inline {
  grid-area: summary;
  margin: 2px 0 0;
}

.product-card-fit {
  position: relative;
  margin: 4px 0 16px;
  padding: 20px 14px 12px;
  border: 1px solid var(--ui-warn-border);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf2, var(--ui-warn-bg));
}

.product-card-fit-label {
  position: absolute;
  top: -12px;
  left: 14px;
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ui-warn);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.product-card-fit .product-card-summary {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #7a3d00;
  font-weight: 700;
}

.product-card-points {
  font-size: 14px;
  line-height: 1.75;
  margin: 0 0 14px;
  padding-left: 0;
  list-style: none;
}

.product-card-points li {
  list-style: none;
  padding-left: 1.4em;
  position: relative;
  margin-bottom: 4px;
}

.single-body .product-card-points,
.single-body .product-card-points li {
  list-style: none !important;
}

.single-body .product-card-points li::marker,
.product-card-points li::marker {
  content: "";
}

.product-card-points li::before {
  content: '\2714';
  position: absolute;
  left: 0;
  color: #4c8dff;
  font-size: 12px;
  top: 3px;
}

.product-card-body p {
  margin: 0;
}

.product-card-body > * + * {
  margin-top: 10px;
}

.product-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}

.product-index-grid-featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.product-index-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d9e5fb;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 4px 14px rgba(76, 141, 255, 0.08);
  color: var(--text-primary);
  text-decoration: none;
}

.product-index-item:hover {
  color: inherit;
  text-decoration: none;
  border-color: #b8cff8;
  box-shadow: 0 8px 18px rgba(76, 141, 255, 0.12);
}

.product-index-item:visited,
.product-index-item:active {
  color: var(--text-primary);
  text-decoration: none;
}

.product-index-thumb-wrap {
  width: 88px;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e6eefc;
  overflow: hidden;
}

.product-index-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-index-body {
  min-width: 0;
}

.product-index-title {
  margin: 0 0 6px;
  font-size: 0.98rem;
  line-height: 1.5;
}

.product-index-meta {
  margin: 0 0 4px;
  color: #2563cc;
  font-size: 0.8rem;
  font-weight: 700;
}

.product-index-feature {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.5;
}

.author-note {
  margin: 22px 0 26px;
  padding: 16px 18px;
  border-left: 4px solid var(--affiliate-highlight);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(6, 154, 142, 0.1), rgba(6, 154, 142, 0.03) 58%, #ffffff);
  box-shadow: 0 10px 24px rgba(6, 154, 142, 0.08);
}

.author-note-label {
  margin: 0 0 8px;
  color: var(--affiliate-highlight);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.author-note-body {
  color: var(--text-primary);
  font-size: 0.97rem;
  line-height: 1.8;
}

.author-note-body > *:first-child {
  margin-top: 0;
}

.author-note-body > *:last-child {
  margin-bottom: 0;
}

.ss-talk {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 20px 0;
}

.ss-talk-media {
  width: 72px;
  flex: 0 0 72px;
  text-align: center;
}

.ss-talk-media img {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 6px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ui-info-border);
  background: #f7fbff;
}

.ss-talk-name {
  font-size: 11px;
  line-height: 1.4;
  color: var(--ui-note);
}

.ss-talk-body {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--ui-info-border);
  background: var(--ui-info-bg);
  box-shadow: 0 8px 20px rgba(47, 128, 237, 0.08);
}

.ss-talk-body::before {
  content: "";
  position: absolute;
  top: 18px;
  width: 12px;
  height: 12px;
  background: inherit;
  border-top: 1px solid var(--ui-info-border);
  border-left: 1px solid var(--ui-info-border);
}

.ss-talk-body-right::before {
  left: -7px;
  transform: rotate(-45deg);
}

.ss-talk-body-left::before {
  right: -7px;
  transform: rotate(135deg);
}

.ss-talk-body p {
  margin: 0;
  line-height: 1.8;
}

.ss-talk-body > *:first-child {
  margin-top: 0;
}

.ss-talk-body > *:last-child {
  margin-bottom: 0;
}

.ss-talk-accent .ss-talk-body {
  background: var(--ui-warn-bg);
  border-color: var(--ui-warn-border);
}

.ss-talk-accent .ss-talk-body::before {
  border-top-color: var(--ui-warn-border);
  border-left-color: var(--ui-warn-border);
}

.ss-talk-soft .ss-talk-body {
  background: var(--ui-soft-bg);
  border-color: var(--ui-soft-border);
}

.ss-talk-soft .ss-talk-body::before {
  border-top-color: var(--ui-soft-border);
  border-left-color: var(--ui-soft-border);
}

.ss-panel {
  position: relative;
  margin: 24px 0;
  padding: 22px 18px 16px;
  border-radius: 16px;
}

.ss-panel-title {
  position: absolute;
  top: -12px;
  left: 18px;
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ss-panel-body > *:first-child {
  margin-top: 0;
}

.ss-panel-body > *:last-child {
  margin-bottom: 0;
}

.ss-panel-info {
  border: 1px solid var(--ui-info-border);
  background: linear-gradient(180deg, #f4faff, var(--ui-info-bg));
}

.ss-panel-info .ss-panel-title {
  background: var(--ui-info);
  color: #fff;
}

.ss-panel-plain {
  border: 1px solid var(--ui-note-border);
  background: #fff;
}

.ss-panel-plain .ss-panel-title {
  background: #fff;
  color: #314355;
  border: 1px solid var(--ui-note-border);
}

.ss-panel-accent {
  border: 1px solid var(--ui-warn-border);
  background: linear-gradient(180deg, #fffaf2, var(--ui-warn-bg));
}

.ss-panel-accent .ss-panel-title {
  background: var(--ui-warn);
  color: #fff;
}

.ss-box {
  margin: 18px 0;
  padding: 14px 16px;
  border-radius: 14px;
}

.ss-box-body > *:first-child {
  margin-top: 0;
}

.ss-box-body > *:last-child {
  margin-bottom: 0;
}

.ss-box-info {
  background: var(--ui-info-bg);
}

.ss-box-soft {
  background: var(--ui-soft-bg);
}

.ss-box-strong {
  background: var(--ui-pick-bg);
  border: 3px solid var(--ui-pick);
}

.ss-list-line,
.ss-list-arrow,
.ss-list-check,
.ss-list-note {
  margin: 18px 0;
  padding: 0;
}

.ss-list-line li,
.ss-list-arrow li,
.ss-list-check li,
.ss-list-note li {
  position: relative;
  list-style: none;
  margin: 0 0 8px;
  line-height: 1.65;
}

.ss-list-line li:last-child,
.ss-list-arrow li:last-child,
.ss-list-check li:last-child,
.ss-list-note li:last-child {
  margin-bottom: 0;
}

.ss-list-line li {
  padding: 10px 12px;
  border-left: 5px solid var(--ui-pick);
  border-bottom: 2px solid #dadada;
  background: whitesmoke;
  color: #404040;
  font-weight: 700;
}

.ss-list-arrow {
  border: 2px solid var(--ui-info-border);
  border-radius: 10px;
  padding: 10px 14px 10px 40px;
  background: #fbfeff;
}

.ss-list-arrow li {
  padding: 8px 0;
  margin: 0;
}

.ss-list-arrow li::before {
  content: "›";
  position: absolute;
  left: -24px;
  top: 8px;
  color: var(--ui-info);
  font-size: 20px;
  font-weight: 800;
}

.ss-list-check {
  border: 2px solid var(--ui-warn-border);
  border-radius: 10px;
  padding: 10px 14px 10px 40px;
  background: #fffdfa;
}

.ss-list-check li {
  padding: 8px 0;
  margin: 0;
}

.ss-list-check li::before {
  content: "✓";
  position: absolute;
  left: -24px;
  top: 8px;
  color: var(--ui-warn);
  font-size: 16px;
  font-weight: 800;
}

.ss-list-note {
  border: 2px solid var(--ui-note-border);
  border-radius: 10px;
  padding: 4px 14px;
  background: var(--ui-note-bg);
}

.ss-list-note li {
  padding: 10px 0 10px 22px;
  margin: 0;
  border-bottom: 1px dashed silver;
}

.ss-list-note li::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--ui-note);
  font-size: 18px;
  font-weight: 800;
}

.ss-list-note li:last-child {
  border-bottom: none;
}

.guide-summary {
  margin: 20px 0 22px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--affiliate-highlight) 18%, white);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(6, 154, 142, 0.1), rgba(6, 154, 142, 0.04) 55%, #ffffff);
}

.guide-summary-label {
  margin: 0 0 8px;
  color: var(--affiliate-highlight);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.guide-summary-body {
  color: var(--text-primary);
}

.guide-summary-body ul {
  margin: 0;
  padding-left: 1.2em;
}

.guide-summary-body li + li {
  margin-top: 4px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 26px;
}

.guide-card {
  padding: 16px 16px 14px;
  border: 1px solid #dbe7fb;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #fafcff);
  box-shadow: 0 6px 18px rgba(76, 141, 255, 0.06);
}

.guide-card-label {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef5ff;
  border: 1px solid #cddfff;
  color: #2563cc;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.guide-card-title {
  margin: 0 0 8px;
  font-size: 1.02rem;
  line-height: 1.5;
}

.guide-card-body {
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.75;
}

.guide-card-body > *:first-child {
  margin-top: 0;
}

.guide-card-body > *:last-child {
  margin-bottom: 0;
}

.post-link-cards {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.post-link-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px;
  gap: 14px;
  align-items: center;
  width: 100%;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #fbfbfd);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  color: inherit;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  box-sizing: border-box;
}

.post-link-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.09);
  border-color: var(--accent);
}

.post-link-card-thumb {
  width: 88px;
  overflow: hidden;
  border-radius: 10px;
  background: #f3f4f6;
  aspect-ratio: 1 / 1;
  justify-self: end;
}

.post-link-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-link-card-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.post-link-card-label {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

.post-link-card-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 700;
  color: var(--text-primary);
}

.post-link-card-desc {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.post-link-card-missing {
  border-style: dashed;
}

.product-map {
  margin: 18px 0 28px;
  padding: 18px;
  border: 1px solid #dbe7fb;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 10px 24px rgba(76, 141, 255, 0.06);
}

.product-map-head {
  margin-bottom: 14px;
}

.product-map-title {
  margin: 0 0 4px;
  font-size: 1.02rem;
  line-height: 1.5;
}

.product-map-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.product-map-stage {
  position: relative;
  min-height: 460px;
  padding: 20px 24px 48px 48px;
  border-radius: 16px;
  background:
    linear-gradient(to top, rgba(67, 142, 232, 0.07) 1px, transparent 1px) 0 0 / 25% 25%,
    linear-gradient(to right, rgba(67, 142, 232, 0.07) 1px, transparent 1px) 0 0 / 25% 25%,
    linear-gradient(180deg, #ffffff, #f6faff);
  overflow: hidden;
}

.product-map-stage::before,
.product-map-stage::after {
  content: "";
  position: absolute;
  background: #86a6d8;
}

.product-map-stage::before {
  left: 36px;
  right: 18px;
  bottom: 32px;
  height: 2px;
}

.product-map-stage::after {
  left: 36px;
  top: 18px;
  bottom: 32px;
  width: 2px;
}

.product-map-x-label,
.product-map-y-label {
  position: absolute;
  color: #2563cc;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.product-map-x-label {
  right: 18px;
  bottom: 8px;
}

.product-map-y-label {
  left: 8px;
  top: 22px;
  writing-mode: vertical-rl;
}

.product-map-item {
  position: absolute;
  width: 124px;
  transform: translate(-50%, 50%);
  text-align: center;
}

.product-map-thumb-wrap {
  width: 84px;
  height: 84px;
  margin: 0 auto 8px;
  border: 1px solid #d8e5fb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(76, 141, 255, 0.1);
  overflow: hidden;
}

.product-map-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-map-item-title {
  display: inline-block;
  margin: 0;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 6px 14px rgba(76, 141, 255, 0.08);
  color: var(--text-primary);
  font-size: 0.8rem;
  line-height: 1.45;
  font-weight: 700;
}

@media (max-width: 640px) {
  .product-map {
    padding: 14px;
    border-radius: 16px;
  }

  .product-map-stage {
    min-height: 660px;
    padding: 18px 14px 42px 38px;
  }

  .product-map-item {
    width: 104px;
  }

  .product-map-thumb-wrap {
    width: 68px;
    height: 68px;
    border-radius: 14px;
  }

  .product-map-item-title {
    font-size: 0.72rem;
  }

  .guide-summary {
    padding: 14px 14px 14px 16px;
    border-radius: 14px;
  }

  .guide-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .guide-card {
    padding: 14px;
    border-radius: 14px;
  }

  .post-link-card {
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 10px;
    padding: 12px;
  }

  .post-link-card-thumb {
    width: 72px;
    border-radius: 9px;
  }

  .post-link-card-title {
    font-size: 14px;
  }

  .post-link-card-desc {
    font-size: 11px;
  }

  .author-note {
    padding: 14px 14px 14px 16px;
    border-radius: 12px;
  }

  .author-note-body {
    font-size: 0.92rem;
    line-height: 1.75;
  }

  .ss-talk {
    gap: 10px;
    margin: 16px 0;
  }

  .ss-talk-media {
    width: 58px;
    flex-basis: 58px;
  }

  .ss-talk-media img {
    width: 48px;
    height: 48px;
  }

  .ss-talk-name {
    font-size: 10px;
  }

  .ss-talk-body {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .ss-panel {
    padding: 20px 14px 14px;
    border-radius: 14px;
  }

  .ss-panel-title {
    left: 14px;
    font-size: 0.8rem;
  }

  .ss-box {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .ss-list-arrow,
  .ss-list-check {
    padding: 8px 12px 8px 34px;
  }

  .ss-list-note {
    padding: 2px 12px;
  }

  .ss-list-arrow li::before,
  .ss-list-check li::before {
    left: -20px;
  }

  .product-index-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .product-index-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }

  .product-index-thumb-wrap {
    width: 72px;
  }

  .product-index-title {
    font-size: 0.93rem;
  }

  .product-index-feature {
    font-size: 0.82rem;
  }

  .affiliate-links {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .affiliate-link {
    width: 100%;
    min-width: 0;
  }

  .affiliate-compact-grid {
    grid-template-columns: 1fr;
  }

  .affiliate-compact-card {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 8px;
    padding: 10px;
  }

  .affiliate-compact-thumb img {
    width: 56px;
  }

  .product-card-header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "image"
      "spec"
      "summary";
    gap: 12px;
  }

  .product-card-image-wrap {
    width: min(180px, 100%);
    margin: 0 auto;
  }

  .product-card-name {
    font-size: 15px;
  }

  .product-card-spec {
    gap: 6px;
    margin-bottom: 10px;
  }

  .product-card-spec span {
    font-size: 11px;
    padding: 3px 8px;
  }

  .product-card-summary-inline {
    margin-top: 0;
  }
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background: #0d1b2a;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 6px 0;
  font-size: 12px;
}
.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header-tagline { color: var(--text-muted); }
.header-meta-nav { display: flex; gap: 16px; }
.header-meta-nav a { color: var(--text-muted); font-size: 12px; }
.header-meta-nav a:hover { color: var(--accent); }

.header-main { padding: 12px 0; }
.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  line-height: 0;
  font-size: 0;
  color: transparent;
  overflow: hidden;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: 3px;
  color: #ffffff;
  line-height: 1;
}
.logo-img {
  height: 52px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

/* Search */
.search-form {
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 340px;
}
.search-input {
  flex: 1;
  background: none;
  border: none;
  padding: 10px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-btn {
  padding: 10px 14px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}
.search-btn:hover { color: var(--accent); }

/* Navigation */
.site-nav {
  background: var(--accent);
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list li a {
  display: block;
  padding: 11px 18px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  transition: all var(--transition);
  border-bottom: 2px solid transparent;
}
.nav-list li a:hover,
.nav-list li.active a {
  color: #ffffff;
  background: rgba(0, 0, 0, 0.15);
  border-bottom-color: rgba(255, 255, 255, 0.6);
}
.nav-count {
  font-size: 11px;
  opacity: 0.6;
  font-weight: 400;
}

/* ============================================
   HERO / FEATURED
   ============================================ */
.hero-section {
  padding: 32px 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 16px;
  align-items: stretch;
}

.hero-main {
  display: flex;
  flex-direction: column;
}
.hero-main-link { display: block; position: relative; }
.hero-main-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
.hero-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.hero-main-link:hover .hero-main-image img { transform: scale(1.03); }
.hero-main-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}
.hero-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}
.hero-circle { font-size: 13px; color: var(--accent); margin-bottom: 4px; }
.hero-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}
.hero-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  margin-bottom: 14px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.hero-cta-btn {
  display: inline-block;
  background: #ff6600;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.hero-cta-btn:hover {
  background: #e55a00;
  transform: scale(1.04);
  color: #fff;
}

/* Hero Sub */
.hero-sub {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 0;
  min-height: 100%;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.hero-sub::-webkit-scrollbar { width: 4px; }
.hero-sub::-webkit-scrollbar-track { background: transparent; }
.hero-sub::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.hero-sub-item {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 10px;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.hero-sub-item:hover { border-color: var(--accent); transform: translateX(4px); }
.hero-sub-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-surface);
}
.hero-sub-image img { width: 100%; height: 100%; object-fit: cover; }
.hero-sub-info { flex: 1; min-width: 0; }
.hero-sub-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   CATEGORY NAV
   ============================================ */
.category-nav-section {
  padding: 20px 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}
.category-nav-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.category-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #e8f4fd;
  border: 1px solid #b3d9f5;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  transition: all var(--transition);
  min-width: 90px;
  text-align: center;
  color: #2a6496;
}
.category-nav-item:hover {
  border-color: #5baee0;
  background: #cce8f8;
  transform: translateY(-2px);
}
.category-nav-name { font-size: 13px; font-weight: 600; color: #2a6496; }
.category-nav-count { font-size: 11px; color: #6aaad4; margin-top: 2px; }

/* ============================================
   CONTENT LAYOUT
   ============================================ */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  padding: 32px 0;
}
.content-main { min-width: 0; }

/* ============================================
   SECTION
   ============================================ */
.section { margin-bottom: 48px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.section-header::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--accent);
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.section-more {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.section-more:hover { text-decoration: underline; }

/* ============================================
   WORKS GRID
   ============================================ */
.works-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.works-grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   WORK CARD
   ============================================ */
.work-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}
.work-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.work-card-link { display: block; }

.work-card-image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-surface);
}
.work-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.05) contrast(1.05) saturate(1.1);
  transition: transform 0.3s ease;
}
.work-card:hover .work-card-image img { transform: scale(1.03); }

.work-card-price {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.work-card-body { padding: 12px; }
.work-card-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.work-card-circle {
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 8px;
}
.work-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }

/* ============================================
   TAG PILLS
   ============================================ */
.tag-pill {
  display: inline-block;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 100px;
  transition: all var(--transition);
  white-space: nowrap;
}
.tag-pill:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}
.tag-pill--sm { font-size: 10px; padding: 1px 6px; }
.tag-pill--lg { font-size: 13px; padding: 4px 14px; }
.tag-pill--dark {
  background: rgba(0,0,0,0.5);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar { width: 280px; min-width: 0; }

.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar-widget-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.sidebar-widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--accent);
}

/* Category List */
.sidebar-category-list { display: flex; flex-direction: column; gap: 2px; }
.sidebar-category-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.sidebar-category-list li a:hover {
  background: var(--accent-light);
  color: var(--accent);
  padding-left: 14px;
}
.category-count {
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* Tag Cloud */
.sidebar-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* Popular List */
/* Popular List - 縦並び・画像フル幅 */
.sidebar-popular-list { display: flex; flex-direction: column; gap: 20px; }
.sidebar-popular-item a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity var(--transition);
}
.sidebar-popular-item a:hover { opacity: 0.8; }
.sidebar-popular-thumb {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
}
.sidebar-popular-thumb img {
  width: 100%;
  height: auto;
  display: block;
}
.sidebar-popular-info { width: 100%; }
.sidebar-popular-title {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: normal;
  overflow: visible;
}
.sidebar-popular-circle {
  display: block;
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
}

/* ============================================
   PAGE HERO
   ============================================ */
.page-hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 32px 0;
}
.page-hero--works { background: linear-gradient(135deg, #1a0a0e 0%, var(--bg-surface) 100%); }
.page-title {
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 8px;
}
.page-description {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================
   LIST CONTROLS
   ============================================ */
.list-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.list-count { font-size: 14px; color: var(--text-secondary); }
.list-count strong { color: var(--text-primary); font-weight: 700; }

.sort-select-wrapper { position: relative; }
.sort-select {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 6px 30px 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  outline: none;
  appearance: none;
}

/* ============================================
   WORK DETAIL
   ============================================ */
.work-detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 32px;
  padding: 32px 0;
}

/* 1. Title */
.work-detail-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}

/* 2. Tags at top */
.work-tags-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

/* 3. Intro text */
.work-intro {
  margin-bottom: 24px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-secondary);
}
.work-intro-circle {
  color: var(--accent);
  font-weight: 700;
}
.work-intro-circle:hover { text-decoration: underline; }

/* 4. Eyecatch */
.work-eyecatch { margin-bottom: 24px; }
.work-cover-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

/* ④ 作品紹介文 */
.work-description {
  margin-bottom: 28px;
  padding: 20px 24px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-secondary);
}

/* work-description / work-points / work-recommend: 段落間余白 */
.work-description p,
.work-points p,
.work-recommend p {
  margin-bottom: 1.5em;
}
.work-description p:last-child,
.work-points p:last-child,
.work-recommend p:last-child {
  margin-bottom: 0;
}

/* work-points / work-recommend: セクション間余白はpaddingで確保（margin collapsingを防ぐ） */
.work-points,
.work-recommend {
  padding-top: 2em;
}

/* work-sub-title: ポイント・おすすめ見出し */
.work-sub-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 1em;
}

/* work-summary: 締めの一言 */
.work-summary {
  padding-top: 24px;
  margin-bottom: 32px;
  display: block;
}

/* work-recommend: チェックリスト行間 */
.work-recommend ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 8px 0 0;
}
.work-recommend ul li {
  margin-bottom: 12px;
}

/* 5. Quote */
.work-quote {
  margin-bottom: 28px;
  padding: 20px 24px;
  background: var(--bg-surface);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.work-quote p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.work-quote cite {
  font-size: 12px;
  color: var(--text-muted);
  font-style: normal;
}

/* 6. Meta info list */
.work-meta-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 32px;
}
.work-meta-item {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}
.work-meta-item dt {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.work-meta-item dd {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}
.work-meta-item dd a { color: var(--accent); }
.work-price { font-size: 20px; color: var(--accent); font-weight: 700; }

/* 7. Sample Grid */
.work-samples { margin-bottom: 32px; }
.work-samples h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.work-samples h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.sample-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sample-item {
  display: block;
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sample-pswp-item { display: block; cursor: zoom-in; }
.sample-item img { width: 100%; height: auto; display: block; pointer-events: none; }

/* 8+12. CTA Buttons (orange) */
.work-cta-section { margin-bottom: 32px; }
.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-size: 20px;
  font-weight: 700;
  padding: 22px 32px;
  border-radius: var(--radius-md);
  background: #ff6600;
  color: #fff;
  transition: all var(--transition);
  text-align: center;
  letter-spacing: 0.05em;
}
.btn-cta:hover {
  background: #e55a00;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255,102,0,0.45);
}
.buy-disclaimer {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* 9. Review */
.work-review { margin-bottom: 32px; }
.work-review h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.work-review h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.review-quote {
  padding: 20px 24px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.review-quote p { font-size: 14px; line-height: 1.9; color: var(--text-secondary); }
.review-cite { font-size: 12px; color: var(--text-muted); text-align: right; }

/* ⑨ 無料で読める？ */
.work-free-section {
  margin-bottom: 40px;
  padding: 28px 28px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
.work-free-section h2 {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  color: var(--text-primary);
}
.work-free-section p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.work-free-section strong { color: var(--accent); }
.work-free-warning {
  margin-bottom: 16px;
  padding: 14px 18px;
  background: #fff3f3;
  border-left: 4px solid #e53e3e;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.work-free-warning-title {
  font-weight: 700;
  font-size: 13px;
  color: #c53030;
  margin-bottom: 8px !important;
}
.work-free-warning ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  color: #c53030;
}
.work-free-warning ul li { margin-bottom: 4px; }
.work-free-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}
.work-free-benefits li {
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.7;
  border-bottom: 1px solid var(--border);
}
.work-free-benefits li:last-child { border-bottom: none; }

/* Related Works (inline, below 無料で読める？) */
.work-related-inline { margin-top: 40px; padding-top: 32px; border-top: 2px solid var(--border); }
.work-related-inline h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  position: relative;
}
.work-related-inline h2::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}
.work-related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.work-related-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

/* Related Works (page bottom) */
.related-works { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); }

/* ============================================
   TAXONOMY (タグ・カテゴリ一覧)
   ============================================ */
.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.taxonomy-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}
.taxonomy-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.taxonomy-item-thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--bg-surface); }
.taxonomy-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.taxonomy-item-info {
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.taxonomy-item-name { font-size: 14px; font-weight: 600; }
.taxonomy-item-count {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-surface);
  padding: 2px 8px;
  border-radius: 100px;
  border: 1px solid var(--border);
}

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb { margin-bottom: 16px; }
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}
.breadcrumb-list li { color: var(--text-muted); }
.breadcrumb-list li + li::before { content: '›'; margin-right: 8px; color: var(--text-muted); }
.breadcrumb-list li a { color: var(--text-muted); }
.breadcrumb-list li a:hover { color: var(--accent); }
.breadcrumb-list li[aria-current="page"] { color: var(--text-secondary); }

/* ============================================
   PAGINATION
   ============================================ */
.pagination { margin-top: 40px; text-align: center; }
.pagination-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.pagination-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.pagination-link:hover,
.pagination-link--active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pagination-info { font-size: 12px; color: var(--text-muted); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #0d1b2a;
  border-top: none;
  margin-top: 60px;
}
.footer-top { padding: 48px 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 40px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 3px;
  color: #ffffff;
  margin-bottom: 12px;
}
.footer-logo-img {
  height: 96px;
  width: auto;
  display: block;
  margin-bottom: 12px;
}
.footer-about p { font-size: 13px; color: rgba(255,255,255,0.5); line-height: 1.7; }
.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.footer-col ul { display: flex; flex-direction: column; gap: 6px; }
.footer-col ul li a {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-col ul li a span { color: rgba(255,255,255,0.35); font-size: 11px; }
.footer-col ul li a:hover { color: #ffffff; }
.footer-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.footer-bottom {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-disclaimer {
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 8px;
  line-height: 1.7;
}
.footer-copyright { font-size: 12px; color: rgba(255,255,255,0.35); }

.footer-legal-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.footer-legal-nav a {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-legal-nav a:hover { color: #ffffff; }

/* 固定ページ（シングル） */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 40px;
  max-width: 1080px;
  margin: 0 auto;
  padding: 48px 0;
  align-items: start;
}

.single-content {
  min-width: 0;
}

.single-sidebar {
  min-width: 0;
}

.single-sidebar-sticky {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

@media (max-width: 860px) {
  .single-layout {
    grid-template-columns: 1fr;
    max-width: 720px;
  }
  .single-sidebar-sticky {
    position: static;
  }
}
.single-eyecatch {
  margin-bottom: 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.single-eyecatch img {
  width: 100%;
  height: auto;
  display: block;
}
.single-header {
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.single-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}
.single-date { font-size: 13px; color: var(--text-muted); }
.single-body { font-size: 16px; line-height: 1.9; color: var(--text-secondary); }
.single-body h2 {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 64px 0 16px;
  padding: 12px 16px;
  border-left: none;
  border-bottom: none;
  background: #0d1b2a;
  border-radius: var(--radius-sm);
}
.single-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: #0d1b2a;
  margin: 32px 0 10px;
  padding-bottom: 4px;
  border-bottom: 2px solid #0d1b2a;
}
.single-body h2 + p,
.single-body h3 + p {
  color: var(--text-primary);
}
.single-body p { margin-bottom: 32px; }
.single-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.single-body ul, .single-body ol { padding-left: 24px; margin-bottom: 16px; }
.single-body li { margin-bottom: 6px; list-style: disc; }
.single-body hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.single-body strong { color: var(--text-primary); font-weight: 700; }
.single-body table {
  width: 100%;
  margin: 20px 0 28px;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: #fff;
}
.single-body thead {
  background: var(--bg-surface);
}
.single-body th,
.single-body td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
  line-height: 1.7;
}
.single-body th {
  color: var(--text-primary);
  font-weight: 700;
}
.single-body tr:last-child td {
  border-bottom: none;
}
.single-body .product-card {
  margin: 24px 0 32px;
}
.single-body .product-card-body > .affiliate-links:last-child {
  margin-bottom: 0;
}
.single-related {
  margin-top: 40px;
  padding-top: 8px;
  border-top: 1px solid var(--border-light);
}

/* お問い合わせページ */
.contact-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px 32px;
  margin: 28px 0;
  display: inline-block;
}
.contact-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.contact-email {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.5px;
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 90;
  box-shadow: 0 4px 12px rgba(212,43,74,0.4);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--accent-hover); transform: translateY(-3px); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr 300px; }
  .works-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .content-layout,
  .work-detail-layout {
    grid-template-columns: 1fr;
  }
  .sidebar { width: 100%; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-sub { flex-direction: row; overflow-x: auto; }
  .hero-sub-item { min-width: 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
  .work-related-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .logo-text { font-size: 24px; }
  .search-form { width: 200px; }
  .works-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .works-grid--4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero-title { font-size: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-about { grid-column: auto; }
  .header-meta-nav { display: none; }
  .work-meta-list { grid-template-columns: 1fr; }
  .work-related-grid { grid-template-columns: repeat(2, 1fr); }
  /* サイドバー人気作品：スマホで2カラム */
  .sidebar-popular-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .sidebar-popular-title { font-size: 11px; }
  .work-detail-title { font-size: 20px; }
  .btn-cta { font-size: 17px; padding: 18px 20px; }
  .work-free-section h2 { font-size: 16px; }
}

/* ============================================
   まとめ記事カード（トップページ）
   ============================================ */
.roundup-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.roundup-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-primary, #fff);
  transition: box-shadow 0.2s, transform 0.2s;
}
.roundup-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.roundup-card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 99px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.roundup-card-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.roundup-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}
.roundup-card-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-muted, #999);
}
@media (max-width: 640px) {
  .roundup-card-grid { grid-template-columns: 1fr; }
}

/* ============================================
   まとめ記事 (roundup)
   ============================================ */

.roundup-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
}
.roundup-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 12px;
}
.roundup-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}
.roundup-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted, #999);
  align-items: center;
}
.roundup-count {
  background: var(--accent);
  color: #fff;
  padding: 2px 10px;
  border-radius: 99px;
  font-weight: 700;
}
.roundup-introduction {
  margin-bottom: 32px;
  font-size: 15px;
  line-height: 1.9;
  color: #444;
}
.roundup-introduction p {
  margin-bottom: 1em;
}
.roundup-introduction p:last-child {
  margin-bottom: 0;
}

/* ---- 紹介作品TOC ---- */
.roundup-toc {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin-bottom: 40px;
}
.roundup-toc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0 0 12px;
  letter-spacing: 0.03em;
}
.roundup-toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.roundup-toc-list li {
  font-size: 14px;
  line-height: 1.5;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.roundup-toc-num {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  min-width: 18px;
}
.roundup-toc-list a {
  color: var(--text-primary);
  text-decoration: none;
}
.roundup-toc-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.roundup-body {
  margin-bottom: 80px;
  font-size: 15px;
  line-height: 1.8;
}

/* まとめ後コンテンツ */
.roundup-conclusion {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 2px solid var(--border);
  font-size: 15px;
  line-height: 1.9;
}
.roundup-conclusion h3 {
  font-size: 18px;
  font-weight: 800;
  margin: 48px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--accent);
}
.roundup-conclusion h3:first-child {
  margin-top: 0;
}
.roundup-conclusion p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

/* その他の作品一覧 */
.roundup-extra {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 2px solid var(--border);
}
.roundup-extra-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 24px;
}
.roundup-extra-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 640px) {
  .roundup-extra-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* 作品リスト */
.roundup-works {
  display: flex;
  flex-direction: column;
  gap: 80px;
}
.roundup-work-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ヘッダーエリア（バッジ＋テキスト情報） */
.roundup-work-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 48px 24px;
  border-bottom: 1px solid var(--border);
}
.roundup-work-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* No.バッジ */
.roundup-rank-badge {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.roundup-rank-badge::before {
  content: "No.";
  font-size: 9px;
  font-weight: 400;
  opacity: 0.85;
  line-height: 1;
}

/* 作品名 */
.roundup-work-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
}
.roundup-work-title a { color: var(--text-primary); }
.roundup-work-title a:hover { color: var(--accent); }

/* サークル名（タグ風） */
.roundup-work-circle-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* 説明文（全文表示） */
.roundup-work-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* 横スワイプ画像ギャラリー */
.roundup-gallery-wrap {
  position: relative;
  background: #000;
}
.roundup-gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  width: 100%;
}
.roundup-gallery::-webkit-scrollbar { display: none; }
.roundup-gallery.is-dragging { cursor: grabbing; user-select: none; }

.roundup-gallery-item {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  scroll-snap-align: start;
}
.roundup-gallery-item img {
  width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
  background: #111;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.roundup-gallery-hint {
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  padding: 6px;
  background: rgba(0,0,0,0.5);
  position: absolute;
  bottom: 0;
  width: 100%;
  pointer-events: none;
}

/* CTAボタン */
.roundup-work-cta {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.btn-cta--roundup {
  width: 100%;
  font-size: 17px;
  padding: 18px;
}
.roundup-work-cta .buy-disclaimer { margin-top: 6px; }

/* レスポンシブ */
@media (max-width: 768px) {
  .roundup-title { font-size: 20px; }
}
@media (max-width: 640px) {
  .roundup-work-header { gap: 10px; padding: 12px; }
  .roundup-rank-badge { width: 38px; height: 38px; font-size: 16px; }
  .roundup-work-title { font-size: 14px; }
  /* .roundup-work-desc: 全文表示のため制限なし */
  .btn-cta--roundup { font-size: 15px; padding: 16px; }
}

/* ---- PhotoSwipe: グローバルimg resetの打ち消し ---- */
.pswp__img {
  max-width: none;
  height: auto;
}

/* ---- PhotoSwipe CTA スライド ---- */
.pswp-cta-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.pswp-cta-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-align: center;
  padding: 24px;
  box-sizing: border-box;
}
.pswp-cta-text {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
}
.pswp-cta-btn {
  display: inline-block;
  background: #ff6600;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 16px 36px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.pswp-cta-btn:hover {
  background: #e55a00;
  transform: scale(1.04);
  color: #fff;
}
.pswp-cta-note {
  color: rgba(255,255,255,0.5);
  font-size: 12px;
  margin-top: 16px;
}

/* ============================================
   Compare UI
   ============================================ */

/* ---- product-index-item ラッパー ---- */
.product-index-item-wrap {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  transition: box-shadow var(--transition);
}

.product-index-item-wrap .product-index-item {
  flex: 1;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom: none;
}

.product-index-item-wrap.is-compare-selected .product-index-item {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 4px 14px rgba(212,43,74,0.10);
}

/* ---- チェックボックスフッター ---- */
.compare-check-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #f5f8ff;
  border: 1px solid #d9e5fb;
  border-top: none;
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text-secondary);
  user-select: none;
  transition: background var(--transition);
}

.compare-check-label:hover {
  background: #eaf0ff;
}

.compare-check-input {
  accent-color: var(--accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
}

.is-compare-selected .compare-check-label {
  background: rgba(212, 43, 74, 0.06);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

/* product_card 内のチェックラベル */
.compare-check-label-card {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  border: 1px solid var(--border-light);
  border-top: none;
  margin-top: -1px;
}

/* ---- 固定バー ---- */
.compare-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: #1a1a1a;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.18);
}

body.has-compare-bar .site-main {
  padding-bottom: 72px;
}

.compare-bar-label {
  flex: 1;
  color: #fff;
  font-size: 0.9rem;
  margin: 0;
}

.compare-limit-msg {
  color: #ffb3bf;
  font-size: 0.8rem;
  white-space: nowrap;
}

.compare-bar-btn {
  padding: 9px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background var(--transition);
}

.compare-bar-btn:hover {
  background: var(--accent-hover);
}

/* ---- 比較パネル（記事内インライン） ---- */
.compare-panel {
  margin: 20px 0 28px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #fff;
  overflow: hidden; /* border-radius のクリップ。overflow: hidden は scroll container ではないので sticky に影響しない */
}

.compare-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  background: #fff;
}

.compare-panel-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.compare-panel-close {
  padding: 5px 12px;
  border-radius: 6px;
  background: var(--bg-surface);
  font-size: 0.82rem;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
}

.compare-panel-close:hover {
  background: var(--border-light);
}

/* ---- 比較テーブル ---- */
/*
 * .compare-panel-body が唯一の overflow-x: auto コンテナ。
 * sticky の基準がここ1つになるため、ネストによる干渉がない。
 */
.compare-panel-body {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
}

.compare-table-wrap {
  /* overflow なし。スクロールは .compare-panel-body に任せる */
}

.compare-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: 0.78rem;
  table-layout: fixed;
  white-space: normal;
}

/* 全セルに明示的な背景と下ボーダー */
.compare-table th,
.compare-table td {
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-card);
  border-right: 1px solid var(--border-light);
  white-space: normal;
}

.compare-table tr > *:last-child {
  border-right: none;
}

/* ---- 左固定ラベル列 ---- */
/* .compare-table th/td (0,1,1) より高くするため .compare-table を親に足す (0,2,0 > 0,1,1) */
.compare-table .compare-th-label,
.compare-table .compare-td-label {
  position: sticky;
  left: 0;
  z-index: 4;
  background: #fff;
  white-space: normal;
  padding: 10px 10px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 700;
  width: 110px;
  min-width: 110px;
  max-width: 110px;
  line-height: 1.35;
  word-break: break-word;
  box-shadow: 4px 0 10px -3px rgba(0,0,0,.12);
}

.compare-th-label-top {
  top: 0;
  z-index: 5;
}

/* ---- ヘッダ行 ---- */
.compare-th-col {
  text-align: center;
  vertical-align: top;
  padding: 10px 8px;
  min-width: 108px;
  max-width: 108px;
  width: 108px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.compare-thumb {
  width: 40px;
  height: 40px;
  object-fit: contain;
  margin: 0 auto 5px;
  display: block;
}

.compare-col-name {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  word-break: break-word;
}

/* ---- データ行 ---- */
.compare-row td {
  padding: 9px 8px;
  vertical-align: top;
  line-height: 1.45;
  color: var(--text-primary);
  min-width: 108px;
  max-width: 108px;
  width: 108px;
  font-size: 0.73rem;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.compare-row.is-highlight td {
  background: var(--accent-light);
}

.compare-table .compare-row.is-highlight .compare-td-label {
  background: #fff;
  color: var(--accent);
}

.compare-table-rows {
  width: 100%;
  min-width: 100%;
}

.compare-table-rows .compare-th-col,
.compare-table-rows .compare-td {
  position: static;
  min-width: 0;
  max-width: none;
  width: auto;
  box-shadow: none;
}

.compare-table-rows .compare-th-col-item {
  min-width: 180px;
  width: 180px;
}

.compare-table-rows .compare-td-item {
  text-align: left;
  vertical-align: top;
  padding: 12px 10px;
  background: #fff;
}

.compare-table-rows .compare-thumb {
  margin: 0 0 8px;
}

.compare-table-rows .compare-col-name {
  font-size: 0.76rem;
}

.compare-table-rows .compare-td-highlight {
  background: var(--accent-light);
}

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

/* ---- レスポンシブ切り替え ---- */
@media (max-width: 639px) {
  .compare-table {
    min-width: 940px;
  }

  .compare-table .compare-th-label,
  .compare-table .compare-td-label {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    padding: 9px 8px;
    font-size: 0.7rem;
  }
}

@media (max-width: 480px) {
  .product-index-grid {
    grid-template-columns: 1fr;
  }

  .product-index-grid-featured {
    grid-template-columns: 1fr;
  }
}

/* ---- Author Card ---- */
.author-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 20px 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--accent);
}

.author-card-avatar {
  flex-shrink: 0;
}

.author-card-avatar img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.author-card-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--border);
}

.author-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.author-card-bio {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: left;
}

/* スマホ：記事下部に横並び */
@media (max-width: 860px) {
  .author-card {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    border-top: none;
    border-left: 4px solid var(--accent);
    margin-top: 40px;
  }
  .author-card-body {
    flex: 1;
  }
}
