/* ==========================================================================
   shizuku media — Base Styles
   CSS Custom Properties, Reset, Typography, Utilities
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  /* Brand Gradient */
  --gradient: linear-gradient(90deg, #02C1D4, #D1A7EB);
  --gradient-diagonal: linear-gradient(135deg, #02C1D4, #D1A7EB);
  --gradient-vertical: linear-gradient(180deg, #02C1D4, #D1A7EB);

  /* Brand Colors */
  --color-teal: #02C1D4;
  --color-purple: #D1A7EB;
  --color-purple-dark: #9B6BC2;

  /* Text Colors */
  --color-text-primary: #1A1A1A;
  --color-text-dark: #333333;
  --color-text-medium: #444444;
  --color-text-body: #555555;
  --color-text-muted: #666666;
  --color-text-light: #999999;
  --color-text-faint: #CCCCCC;

  /* Backgrounds */
  --color-bg-white: #FFFFFF;
  --color-bg-light: #F8F9FA;
  --color-bg-gray: #F2F3F0;
  --color-bg-teal-tint: #EEFBFC;
  --color-bg-purple-tint: #F9F0FC;

  /* Category Backgrounds (section tints) */
  --color-bg-rose: #FEF5F8;
  --color-bg-coral: #FEF7F4;
  --color-bg-blue: #F3F6FE;
  --color-bg-green: #F3FAF5;
  --color-bg-lavender: #F8F5FC;

  /* Category Accents */
  --color-cat-teal: #0AABB8;
  --color-cat-rose: #D4648A;
  --color-cat-purple: #9B5FBF;
  --color-cat-coral: #D4785A;
  --color-cat-blue: #5A7FD4;
  --color-cat-green: #4EA870;
  --color-cat-lavender: #A86CC1;

  /* Borders */
  --color-border: #E0E0E0;
  --color-border-light: #EEF0F2;
  --color-border-row: #F0F0F0;

  /* Alert / Functional Colors */
  --color-info: #02C1D4;
  --color-info-bg: #EEFBFC;
  --color-warning: #F59E0B;
  --color-warning-bg: #FFF8E1;
  --color-success: #22C55E;
  --color-success-bg: #E8F5E9;
  --color-danger: #EF4444;
  --color-danger-bg: #FFEBEE;

  /* Star / Rating */
  --color-star: #D4A017;
  --color-star-gold: #F59E0B;

  /* Fonts */
  --font-display: 'Funnel Sans', sans-serif;
  --font-body: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Geist Mono', monospace;
  --font-serif: 'Newsreader', serif;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.03), 0 6px 16px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  margin-block: 0;
  padding: 0;
}

/* Article Body styles are in single.css (loaded only on singular posts) */

/* wpautop の <p> ラッパーによるマージン崩れをリセット */
.step-flow p, .highlight p, .sv-comment p,
.balloon p, .stat-callout p, .cta-block p,
.faq-card p, .def-item p, .link-card p {
  margin: 0;
  font-size: inherit;
  color: inherit;
  line-height: inherit;
}

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

body {
  font-family: var(--font-body);
  color: var(--color-text-primary);
  background: var(--color-bg-gray);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Layout Container — SP-optimized, centered on PC
   -------------------------------------------------------------------------- */
.sp-container {
  max-width: 430px;
  margin: 0 auto;
  background: var(--color-bg-white);
  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  overflow-x: hidden;
  min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Gradient Text Utility
   -------------------------------------------------------------------------- */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --------------------------------------------------------------------------
   Badge System
   -------------------------------------------------------------------------- */
.badge {
  display: inline-block;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

/* Solid badges (category primary) */
.badge--teal {
  background: var(--color-cat-teal);
  color: #FFFFFF;
}

.badge--rose {
  background: var(--color-cat-rose);
  color: #FFFFFF;
}

.badge--purple {
  background: var(--color-cat-purple);
  color: #FFFFFF;
}

.badge--coral {
  background: var(--color-cat-coral);
  color: #FFFFFF;
}

.badge--blue {
  background: var(--color-cat-blue);
  color: #FFFFFF;
}

.badge--green {
  background: var(--color-cat-green);
  color: #FFFFFF;
}

.badge--lavender {
  background: var(--color-cat-lavender);
  color: #FFFFFF;
}

/* Soft badges (category tint + accent text) */
.badge--teal-soft {
  background: #E4F7F9;
  color: var(--color-cat-teal);
}

.badge--rose-soft {
  background: #FDEEF3;
  color: var(--color-cat-rose);
}

.badge--purple-soft {
  background: #F3EAFA;
  color: var(--color-cat-purple);
}

.badge--coral-soft {
  background: #FDF0EB;
  color: var(--color-cat-coral);
}

.badge--blue-soft {
  background: #EAF0FD;
  color: var(--color-cat-blue);
}

.badge--green-soft {
  background: #E8F5EC;
  color: var(--color-cat-green);
}

.badge--lavender-soft {
  background: #F2ECF9;
  color: var(--color-cat-lavender);
}

/* --------------------------------------------------------------------------
   Section Common
   -------------------------------------------------------------------------- */
.section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 20px 32px 20px;
}

.pillar-nav-wrapper + .section,
.pillar-nav-wrapper + .scroll-section {
  padding-top: 0;
}

.section--white {
  background: var(--color-bg-white);
}

.section--light-teal {
  background: var(--color-bg-teal-tint);
}

.section--light-purple {
  background: var(--color-bg-purple-tint);
}

.section--bg-rose {
  background: var(--color-bg-rose);
}

.section--bg-coral {
  background: var(--color-bg-coral);
}

.section--bg-blue {
  background: var(--color-bg-blue);
}

.section--bg-green {
  background: var(--color-bg-green);
}

.section--bg-lavender {
  background: var(--color-bg-lavender);
}

.section__eyebrow {
  display: inline-block;
  width: fit-content;
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.5px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section__title,
.section__header .section__title,
h2.section__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.4;
  position: relative;
  margin: 0;
  margin-block: 0;
}

/* Gradient bar only on single/detail pages (not front page) */
.single .section__title,
.single .section__header .section__title,
.single h2.section__title {
  padding-left: 14px;
}

.single .section__title::before,
.single .section__header .section__title::before,
.single h2.section__title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--color-teal), var(--color-purple));
}

.section__sub {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.section__header {
  display: flex;
  flex-direction: column;
  position: relative;
}

/* Scroll hint (injected via JS for horizontal-scroll sections) */
.scroll-hint {
  position: absolute;
  right: 20px;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  gap: 0px;
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.2px;
  color: var(--color-teal);
  pointer-events: none;
}

.scroll-section .section__header .scroll-hint {
  right: 20px;
}

.section .section__header .scroll-hint {
  right: 0;
}

.scroll-hint__arrow {
  width: 14px;
  height: 14px;
  color: var(--color-teal);
  animation: scroll-hint-slide 1.6s ease-in-out infinite;
}

@keyframes scroll-hint-slide {
  0%, 100% {
    transform: translateX(0);
    opacity: 0.7;
  }
  50% {
    transform: translateX(5px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint__arrow {
    animation: none;
  }
}

.section__header--loose {
  gap: 0;
}

.section__header--loose .section__sub {
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   Scroll Section (horizontal scrollable)
   -------------------------------------------------------------------------- */
.scroll-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 32px 0;
}

.scroll-section .section__header {
  padding: 0 20px;
}

.scroll-row {
  display: flex;
  gap: 12px;
  padding: 0 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

/* --------------------------------------------------------------------------
   More Button (secondary / outline)
   -------------------------------------------------------------------------- */
.more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-white);
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.more-btn:active {
  background: var(--color-bg-light);
}

.more-btn__text {
  font-size: 13px;
  font-weight: 600;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.more-btn__icon {
  width: 14px;
  height: 14px;
}

.more-btn--no-border {
  border: none;
  background: transparent;
}

.more-btn--inline {
  width: auto;
  padding: 10px 24px;
}

.more-btn-wrap {
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.scroll-section .more-btn {
  margin: 0 20px;
  width: calc(100% - 40px);
}

/* --------------------------------------------------------------------------
   CTA Button (primary / gradient)
   -------------------------------------------------------------------------- */
.cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  border-radius: 999px;
  background: var(--gradient) !important;
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  width: 100%;
  text-decoration: none !important;
  transition: opacity 0.15s ease;
}

.cta-btn:active {
  opacity: 0.85;
}

.cta-btn svg {
  width: 16px;
  height: 16px;
  margin-right: 6px;
}

/* --------------------------------------------------------------------------
   Pillar Nav (shared: front page + footer)
   -------------------------------------------------------------------------- */
.pillar-nav-wrapper {
  padding: 12px 16px;
}

.pillar-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-radius: 14px;
  border: 1px solid #EDE0F0;
  background: var(--color-bg-white);
  overflow: hidden;
}

.pillar-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease;
}

.pillar-nav__item:active {
  background: #F8F5FA;
}

/* border: 右線（4列目以外）+ 上線（2行目=5〜8番目） */
.pillar-nav__item:not(:nth-child(4n)) {
  border-right: 1px solid var(--color-border-light);
}

.pillar-nav__item:nth-child(n+5) {
  border-top: 1px solid var(--color-border-light);
}

/* --- Icon circle --- */
.pillar-nav__icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.pillar-nav__icon svg {
  width: 18px;
  height: 18px;
}

/* --- Label --- */
.pillar-nav__label {
  font-size: 10px;
  font-weight: 600;
  color: var(--color-text-primary);
  text-align: center;
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Section CTA Link
   -------------------------------------------------------------------------- */
.section-cta {
  padding: 0;
}

.scroll-section > .section-cta {
  padding: 0 20px;
}

.section-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-white);
  font-size: 13px;
  font-weight: 600;
  width: 100%;
  text-decoration: none;
  color: var(--color-teal);
}

/* --------------------------------------------------------------------------
   Tabs
   -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  gap: 8px;
  padding: 0 20px;
}

.tab {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 12px;
  border: none;
  cursor: pointer;
}

.tab--active {
  background: var(--gradient);
  color: #FFFFFF;
  font-weight: 700;
}

.tab--inactive {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Screen reader text
   -------------------------------------------------------------------------- */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

/* --------------------------------------------------------------------------
   Breadcrumb (shared: single post, shop, etc.)
   -------------------------------------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  padding: 10px 20px;
  font-size: 12px;
  color: var(--color-text-light);
}

.breadcrumb__link {
  color: var(--color-teal);
  font-weight: 400;
}

.breadcrumb__sep {
  display: flex;
  align-items: center;
  color: var(--color-text-faint);
}

.breadcrumb__sep svg {
  width: 14px;
  height: 14px;
}

.breadcrumb__current {
  color: var(--color-text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

/* --------------------------------------------------------------------------
   Helpful / Share (shared: single post, shop, etc.)
   -------------------------------------------------------------------------- */
.helpful-share {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 20px;
  text-align: center;
}

.helpful-share__q {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.helpful-share__btns {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.helpful-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--color-border-light);
  background: var(--color-bg-white);
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

/* 投票後: ボタンを無効化し、選択した方をブランドカラーで強調。 */
.helpful-share.is-voted .helpful-btn {
  cursor: default;
  opacity: 0.55;
}
.helpful-share.is-voted .helpful-btn.is-selected {
  opacity: 1;
  color: #fff;
  border-color: transparent;
  background: var(--gradient, linear-gradient(90deg, #02C1D4, #D1A7EB));
}

/* --------------------------------------------------------------------------
   E-E-A-T Byline
   -------------------------------------------------------------------------- */
.byline {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 10px 20px;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
  font-size: 11px;
  color: var(--color-text-muted);
}

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

.byline__label {
  font-weight: 700;
  color: var(--color-text-light);
}

.byline__value {
  color: var(--color-text-primary);
}

.byline__value--link {
  text-decoration: underline;
  font-weight: 600;
}

.byline__role {
  color: var(--color-text-light);
}

.byline__sep {
  color: var(--color-border);
}

/* --------------------------------------------------------------------------
   Bottom Navigation (SP fixed)
   -------------------------------------------------------------------------- */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: flex;
  background: var(--color-bg-white);
  border-top: 1px solid var(--color-border-light);
  z-index: 90;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 0;
  text-decoration: none;
  color: var(--color-text-light);
  font-size: 9px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.bottom-nav__item--active {
  color: var(--color-teal);
}

.bottom-nav__icon {
  width: 20px;
  height: 20px;
}

.bottom-nav__icon svg {
  width: 20px;
  height: 20px;
}

.bottom-nav__label {
  line-height: 1;
}

/* bottom-nav 分の余白をフッターに確保 */
.sp-container {
  padding-bottom: 56px;
}

/* --------------------------------------------------------------------------
   Rank Badge — shared across all card / ranking components
   -------------------------------------------------------------------------- */
.rank-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
  /* Defaults: 24px circle, absolute positioned */
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 12px;
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 1;
}

/* Size variants */
.rank-badge--xs { width: 20px; height: 20px; font-size: 10px; top: 4px; left: 4px; }
.rank-badge--sm { width: 22px; height: 22px; font-size: 11px; }
.rank-badge--lg { width: 28px; height: 28px; font-size: 13px; }

/* Shape variants */
.rank-badge--square  { border-radius: 6px; }
.rank-badge--square-sm { border-radius: 4px; }

/* Position variants */
.rank-badge--static { position: static; }

/* Color variants */
.rank-badge--gold    { background: linear-gradient(135deg, #F59E0B, #D97706); box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35); }
.rank-badge--silver  { background: linear-gradient(135deg, #9CA3AF, #6B7280); }
.rank-badge--bronze  { background: linear-gradient(135deg, #D97706, #92400E); }
.rank-badge--teal    { background: var(--color-teal); }
.rank-badge--gradient { background: var(--gradient); }
.rank-badge--muted   { background: #999; }
.rank-badge--dark    { background: rgba(0, 0, 0, 0.6); }
.rank-badge--default { background: rgba(0, 0, 0, 0.4); }

/* Score grade colors */
.rank-badge--s { background: linear-gradient(135deg, #02C1D4, #8B5CF6); box-shadow: 0 2px 6px rgba(2, 193, 212, 0.3); }
.rank-badge--a { background: linear-gradient(135deg, #22c55e, #02C1D4); box-shadow: 0 2px 6px rgba(34, 197, 94, 0.25); }
.rank-badge--b { background: linear-gradient(135deg, #f59e0b, #f97316); }
.rank-badge--c { background: #9ca3af; }
.rank-badge--d { background: #d1d5db; color: #6b7280; }

/* --------------------------------------------------------------------------
   Coming Soon — placeholder for unreleased features
   -------------------------------------------------------------------------- */
.coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 20px;
}
.coming-soon__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-bg-teal-tint);
  margin-bottom: 8px;
}
.coming-soon__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-teal);
  letter-spacing: 0.04em;
}
.coming-soon__text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--color-text-body);
  text-align: center;
  max-width: 360px;
}
