/*
Theme Name: ORIPA LAB
Theme URI: http://localhost/oripa/
Author: Antigravity
Author URI: 
Description: A premium trading card portal theme resembling Apple/Stripe/Notion styles.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: oripa-lab
*/

/* ==========================================================================
   CSS Variables & Design System
   ========================================================================== */
:root {
  /* Colors */
  --color-black: #0F0F11;
  --color-black-light: #1A1A1D;
  --color-white: #FFFFFF;
  --color-white-dim: #F5F5F7;
  --color-gray: #86868B;
  --color-gray-light: #E5E5EA;
  --color-gold: #D4AF37;
  --color-gold-light: #F3E5AB;
  --color-blue: #0071E3;
  --color-blue-hover: #0077ED;
  --color-blue-light: #E8F0FE;
  
  /* Backgrounds & Surfaces */
  --bg-primary: var(--color-white-dim);
  --bg-secondary: var(--color-white);
  --bg-card: var(--color-white);
  
  /* Text */
  --text-primary: var(--color-black);
  --text-secondary: #4a4a4e; /* Darker gray for readability on light */
  --text-inverse: var(--color-white);
  
  /* Typography */
  --font-family-sans: "Meiryo", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 5rem;
  
  /* Borders & Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --border-color: rgba(0, 0, 0, 0.1);
  
  /* Shadows & Glassmorphism */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.05);
  
  /* Layout */
  --container-width: 1200px;
  --site-header-offset: 76px;
  --header-logo-scale: 1.2;
  --header-logo-bleed: 34px;
}

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

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

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: var(--space-md);
  font-weight: 600;
  line-height: 1.2;
}

p {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-blue);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

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

ul, ol {
  margin-top: 0;
  margin-bottom: var(--space-md);
  padding-left: var(--space-xl);
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-md);
  padding-left: var(--space-md);
}

.text-center { text-align: center; }
.text-gold { color: var(--color-gold); }
.text-gray { color: var(--text-secondary); }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

/* ==========================================================================
   Components
   ========================================================================== */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--color-blue);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-blue-hover);
  color: var(--color-white);
  transform: translateY(-1px);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-gold {
  background-color: var(--color-gold);
  color: var(--color-black);
}

.btn-gold:hover {
  background-color: #E6C247;
  color: var(--color-black);
}

.shop-comparison-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  max-width: 11.25rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  box-sizing: border-box;
}

/* Cards */
.card {
  background-color: var(--bg-card);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.8) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 113, 227, 0.3);
}

.card:hover::before {
  opacity: 1;
}

/* オリパ詳細: 情報カードはリンクではないのでホバー演出なし */
.single-oripa .card:hover {
  transform: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.single-oripa .card:hover::before {
  opacity: 0;
}

/* ログイン・新規登録 */
.page-template-page-login .card.auth-card:hover,
.page-template-page-register .card.auth-card:hover {
  transform: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

.page-template-page-login .card.auth-card:hover::before,
.page-template-page-register .card.auth-card:hover::before {
  opacity: 0;
}

.auth-card__switch {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.auth-card__switch-lead {
  margin: 0 0 var(--space-md);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.auth-card__switch .btn {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}

/* オリパ詳細: セクション見出し ↔ カード */
.single-oripa .oripa-single-page > div h2.text-xl.mb-md,
.single-oripa .oripa-single-page .section h2.text-xl.mb-md {
  margin-bottom: var(--space-sm);
}

/* オリパ詳細: カード内 h3 ↔ 本文 */
.single-oripa .oripa-single-page .card > h3 {
  margin: 0 0 0.2rem;
  line-height: 1.35;
}

.single-oripa .oripa-single-page .card > h3:not(:first-child) {
  margin-top: calc(var(--space-md) + 10px);
}

.single-oripa .oripa-single-page .card > h3 + p {
  margin-top: 0;
}

/* オリパ詳細: コンテンツ幅（1カラム時の横伸びを抑える） */
.single-oripa main.container {
  max-width: 1000px;
}

/* オリパ詳細: パンくず ↔ ヒーローカードの間を詰める */
.single-oripa main.container > .breadcrumbs {
  margin-bottom: 0.375rem;
  padding-top: 0.25rem;
  padding-bottom: 0;
}

.single-oripa .oripa-single-hero.section {
  padding-top: 0.5rem;
}

@media (min-width: 768px) {
  .single-oripa .oripa-single-hero.section {
    padding-top: 0.75rem;
  }
}

/* オリパ詳細: 本文エリアの typography を約 90% */
body.single-oripa .oripa-single-page {
  zoom: 0.9;
}

@supports not (zoom: 0.9) {
  body.single-oripa .oripa-single-page {
    font-size: 90%;
  }

  body.single-oripa .oripa-single-page .text-3xl {
    font-size: 1.6875rem;
  }

  body.single-oripa .oripa-single-page .text-xl {
    font-size: 1.125rem;
  }

  body.single-oripa .oripa-single-page .text-lg {
    font-size: 1.0125rem;
  }

  body.single-oripa .oripa-single-page .text-sm {
    font-size: 0.7875rem;
  }

  body.single-oripa .oripa-single-page .text-xs {
    font-size: 0.675rem;
  }
}

/* オリパ詳細: プレイ実績（グリッド＋項目ラベルピル） */
.oripa-play-stats__card {
  padding: 0;
  overflow: hidden;
}

.oripa-play-stats__grid {
  display: grid;
  gap: 0;
  background: var(--border-color);
}

.oripa-play-stats__grid--primary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--border-color);
}

.oripa-play-stats__grid--secondary {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .oripa-play-stats__grid--primary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .oripa-play-stats__grid--secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.oripa-stat {
  padding: var(--space-md) var(--space-sm);
  text-align: center;
  background: var(--bg-card);
  border: none;
  box-shadow: none;
}

.oripa-play-stats__grid--primary .oripa-stat:not(:last-child) {
  border-right: 1px solid var(--border-color);
}

.oripa-play-stats__grid--secondary .oripa-stat:not(:last-child) {
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 640px) {
  .oripa-play-stats__grid--secondary .oripa-stat {
    border-bottom: none;
  }

  .oripa-play-stats__grid--secondary .oripa-stat:not(:last-child) {
    border-right: 1px solid var(--border-color);
  }
}

@media (max-width: 639px) {
  nav.breadcrumbs,
  nav.breadcrumbs.text-sm,
  nav[aria-label="パンくず"]:not(.card-single-breadcrumbs) {
    font-size: 0.7rem;
  }
}

@media (max-width: 639px) {
  .oripa-play-stats__grid--primary .oripa-stat:nth-child(2n) {
    border-right: none;
  }

  .oripa-play-stats__grid--primary .oripa-stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--border-color);
  }
}

.oripa-stat__label {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.25;
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(15, 15, 17, 0.06);
}

.oripa-stat--play .oripa-stat__label {
  color: #0a4d9e;
  background: #e8f0fe;
}

.oripa-stat--rate .oripa-stat__label {
  color: #0d6e4f;
  background: #e6f6ef;
}

.oripa-stat--win .oripa-stat__label {
  color: #1a5fb4;
  background: #e8f2ff;
}

.oripa-stat--huge .oripa-stat__label {
  color: #b42318;
  background: #ffeceb;
}

.oripa-stat--spent .oripa-stat__label {
  color: #5b4b8a;
  background: #f0ecff;
}

.oripa-stat--profit .oripa-stat__label {
  color: #1e7e34;
  background: #e8f5ec;
}

.oripa-stat--best .oripa-stat__label {
  color: #8a6d1a;
  background: var(--color-gold-light);
}

.oripa-stat__value {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

.oripa-stat__value--text {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  word-break: break-word;
}

.oripa-stat--wide {
  text-align: center;
}

/* Stars */
.stars {
  color: var(--color-gold);
  letter-spacing: 2px;
}

/* Glass Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.65rem 0;
}

.site-header .container {
  position: relative;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  width: 100%;
  min-width: 0;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.site-brand__logo {
  flex: 0 0 auto;
  height: 40px;
  display: flex;
  align-items: center;
  line-height: 0;
}

.site-brand-tagline {
  margin: 0;
  padding: 0;
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  max-height: 40px;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  min-width: 0;
}

.site-brand-tagline__line {
  display: block;
  white-space: nowrap;
}

.site-brand-tagline__line:first-child {
  color: var(--text-primary);
}

.header-search {
  flex: 1 1 320px;
  max-width: 420px;
  min-width: 0;
  margin: 0 var(--space-md);
}

.header-search .hero-search-form {
  margin: 0;
  max-width: none;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  text-decoration: none;
  line-height: 1;
}

.site-logo span {
  color: var(--color-gold);
}

.site-logo__image {
  display: block;
  width: auto;
  height: 40px;
  max-width: 180px;
  max-height: 40px;
  object-fit: contain;
}

.site-logo--header {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 40px;
}

.site-logo--header::after {
  content: '';
  flex: 0 0 var(--header-logo-bleed);
  width: var(--header-logo-bleed);
  min-width: var(--header-logo-bleed);
  height: 1px;
}

.site-logo--header .site-logo__image {
  height: 40px;
  max-height: 40px;
  max-width: 216px;
  transform: scale(var(--header-logo-scale));
  transform-origin: left center;
}

.site-logo--auth .site-logo__image {
  height: 48px;
  max-height: 48px;
  max-width: 220px;
  margin: 0 auto;
}

.site-logo--footer .site-logo__image {
  display: block;
  height: 28px;
  max-height: 28px;
  max-width: 130px;
}

.site-brand__logo .site-logo {
  flex-shrink: 0;
}

.primary-navigation--desktop {
  flex: 0 0 auto;
  margin-left: auto;
}

.primary-navigation--mobile {
  display: none;
}

.primary-navigation__list {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin: 0;
}

.primary-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.25rem;
  padding: 0 0.3rem;
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  vertical-align: middle;
  background: #c9342a;
  border-radius: 999px;
}

.primary-navigation__list a {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-blue);
  text-decoration: none;
}

.primary-navigation__list a:not(.btn):hover {
  color: var(--color-blue-hover);
}

.primary-navigation__list .btn-outline {
  padding: 0.3rem 1rem;
  border-radius: var(--radius-full);
  color: var(--text-primary);
}

.primary-navigation__list .btn-outline:hover {
  color: var(--text-primary);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.is-nav-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.site-header.is-nav-open .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 45;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.mobile-nav-backdrop.is-visible {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  .hidden-mobile {
    display: none !important;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-inner {
    gap: var(--space-sm);
  }

  .site-brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 0;
  }

  .site-brand__logo {
    height: 28px;
    flex-shrink: 0;
  }

  .site-brand-tagline {
    max-height: 28px;
    font-size: 8px;
    line-height: 1.15;
    letter-spacing: 0;
  }

  .site-logo--header {
    height: 28px;
  }

  .site-logo--header::after {
    flex-basis: 22px;
    width: 22px;
    min-width: 22px;
  }

  .site-logo--header .site-logo__image {
    height: 28px;
    max-height: 28px;
    max-width: 144px;
    transform: scale(var(--header-logo-scale));
    transform-origin: left center;
  }

  .primary-navigation--desktop {
    display: none !important;
  }

  .primary-navigation--mobile {
    position: absolute;
    top: calc(100% + 0.65rem);
    left: var(--space-md);
    right: var(--space-md);
    margin-left: 0;
    display: none;
    z-index: 51;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-sm);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
  }

  .site-header.is-nav-open .primary-navigation--mobile {
    display: block;
  }

  .primary-navigation__list {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-sm);
  }

  .primary-navigation__list li {
    width: 100%;
  }

  .primary-navigation__list a {
    display: block;
    padding: 0.75rem var(--space-md);
    border-radius: var(--radius-md);
    text-decoration: none;
  }

  .primary-navigation__list a:hover {
    background: var(--bg-primary);
  }

  .primary-navigation__list .btn {
    width: 100%;
    text-align: center;
    margin-top: var(--space-xs);
  }

  body.is-mobile-nav-open {
    overflow: hidden;
  }
}

/* Search Bar (Hero) */
.hero-search-form {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.hero-search-input {
  width: 100%;
  padding: 1.2rem 1.5rem 1.2rem 3rem;
  font-size: 1.1rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  transition: all 0.3s ease;
  outline: none;
}

.hero-search-input:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.2);
  background-color: rgba(255, 255, 255, 0.05);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

/* Ajax Search Results Dropdown */
.ajax-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  display: none;
  overflow: hidden;
}

.ajax-search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* Hero Section */
.hero-section {
  padding: var(--space-3xl) 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
  background: radial-gradient(circle at 50% -20%, rgba(0, 113, 227, 0.15), transparent 60%);
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -1px;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, #fff 0%, #a5a5a5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-2xl);
  font-weight: 400;
}

/* Sections */
.section {
  padding: var(--space-2xl) 0;
  border-bottom: 1px solid var(--border-color);
}
.section-title {
  font-size: 1.75rem;
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Grids */
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.grid-oripas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* Blog single post */
body.single-post main.container.mt-2xl,
body.single main.container.mt-2xl {
  margin-top: var(--space-md);
}

body.single-post main.container > .breadcrumbs,
body.single main.container > .breadcrumbs {
  margin-bottom: var(--space-sm);
  padding-top: 0;
  padding-bottom: 0;
}

@media (min-width: 769px) {
  body.single-post main.container.mt-2xl,
  body.single main.container.mt-2xl {
    margin-top: var(--space-xl);
  }
}

@media (max-width: 768px) {
  body.single-post .mobile-page-search,
  body.single .mobile-page-search {
    padding-bottom: var(--space-sm);
  }
}

.single-post-layout {
  display: grid;
  gap: var(--space-xl);
  align-items: stretch;
}

.single-post-layout--none {
  display: block;
}

.single-post-layout--sidebar-right {
  grid-template-columns: minmax(0, 1fr) min(300px, 30vw);
}

.single-post-layout--sidebar-left {
  grid-template-columns: min(300px, 30vw) minmax(0, 1fr);
}

.single-post-article {
  max-width: 760px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}

.single-post-layout--sidebar-right .single-post-article,
.single-post-layout--sidebar-left .single-post-article {
  max-width: none;
  margin: 0;
}

.post-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  align-self: stretch;
  min-height: 100%;
}

.post-sidebar-static {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
}

.post-sidebar-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: var(--site-header-offset);
  align-self: flex-start;
  flex: 0 0 auto;
  width: 100%;
  z-index: 2;
}

.admin-bar .post-sidebar-sticky {
  top: calc(var(--site-header-offset) + 32px);
}

@media screen and (max-width: 782px) {
  .admin-bar .post-sidebar-sticky {
    top: calc(var(--site-header-offset) + 46px);
  }
}

.post-sidebar-widget {
  background: var(--bg-secondary);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 0;
  margin-bottom: var(--space-md);
  overflow: hidden;
}

.post-sidebar-widget:last-child {
  margin-bottom: 0;
}

.post-sidebar-widget__head {
  padding: var(--space-md) var(--space-lg) var(--space-sm);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 245, 247, 0.6) 100%);
}

.post-sidebar-widget__title,
.post-sidebar .widget-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  line-height: 1.4;
}

.post-sidebar-widget__body {
  padding: var(--space-sm) 0;
}

.post-sidebar-widget__body > :first-child {
  margin-top: 0;
}

.post-sidebar-widget__body > :last-child {
  margin-bottom: 0;
}

.post-sidebar-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-sidebar-widget li {
  margin: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.post-sidebar-widget li:last-child {
  border-bottom: none;
}

.post-sidebar-widget li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.65rem var(--space-lg);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-primary);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.post-sidebar-widget li a:hover {
  background: var(--color-white-dim);
  color: var(--color-blue);
}

.post-sidebar-widget li a::after {
  content: "";
  flex-shrink: 0;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: auto;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.28;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.post-sidebar-widget li a:hover::after {
  opacity: 0.55;
  transform: rotate(45deg) translate(1px, -1px);
}

.post-sidebar-widget .children {
  padding-left: 0;
  background: rgba(0, 0, 0, 0.02);
}

.post-sidebar-widget .children li a {
  padding-left: calc(var(--space-lg) + 0.5rem);
  font-size: 0.8125rem;
  font-weight: 400;
}

.post-sidebar-widget select {
  display: block;
  width: calc(100% - var(--space-lg) * 2);
  margin: var(--space-sm) var(--space-lg) var(--space-md);
  padding: 0.55rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.post-sidebar-widget p {
  margin: 0;
  padding: var(--space-sm) var(--space-lg) var(--space-md);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.post-sidebar-widget .wp-block-heading {
  font-size: 0.875rem;
  margin: var(--space-sm) var(--space-lg);
}

@media (max-width: 960px) {
  .single-post-layout--sidebar-right,
  .single-post-layout--sidebar-left {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .post-sidebar-sticky {
    position: static;
    top: auto;
  }

  .post-sidebar {
    min-height: 0;
    align-self: start;
    width: 100%;
  }

  .single-post-layout--sidebar-right .post-sidebar,
  .single-post-layout--sidebar-left .post-sidebar {
    margin-bottom: 0;
  }

  body.single-post.post-layout-sidebar-right main.container,
  body.single-post.post-layout-sidebar-left main.container {
    padding-bottom: var(--space-lg);
  }
}

.single-post-content {
  font-size: 1.02rem;
  line-height: 1.85;
  color: var(--text-primary);
  min-width: 0;
  max-width: 100%;
}

.single-post-content div[style*="overflow-x"] {
  max-width: 100%;
}

@media (max-width: 768px) {
  .single-post-layout {
    min-width: 0;
  }

  .single-post-content :is(div, figure):has(> table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .single-post-content img[style*="max-width"],
  .single-post-content img[style*="width"] {
    max-width: 100% !important;
    height: auto !important;
  }
}

.single-post-content > :first-child {
  margin-top: 0;
}

.single-post-content p,
.single-post-content ul,
.single-post-content ol,
.single-post-content blockquote {
  margin-bottom: var(--space-md);
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  line-height: 1.4;
}

.single-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.single-post-content a {
  color: var(--color-blue);
}

/* Footer */
.site-footer {
  padding: var(--space-lg) 0 var(--space-lg);
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  text-align: center;
  color: var(--text-secondary);
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.site-footer-brand {
  line-height: 0;
}

.site-footer-brand .site-logo {
  display: inline-block;
  line-height: 0;
}

.site-footer-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-xl);
}

.site-footer-nav__list a,
.site-footer-nav .menu-item a {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.25rem 0;
}

.site-footer-nav__list a:hover,
.site-footer-nav .menu-item a:hover {
  color: var(--color-blue);
  text-decoration: underline;
}

.site-footer-copy {
  margin: 0;
}

@media (max-width: 640px) {
  .site-footer {
    padding: var(--space-md) 0 var(--space-md);
  }

  .site-footer-inner {
    gap: var(--space-md);
  }

  .site-footer-nav {
    width: 100%;
    max-width: 360px;
  }

  .site-footer-nav__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-primary);
  }

  .site-footer-nav__list li {
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
  }

  .site-footer-nav__list li:nth-child(2n) {
    border-right: none;
  }

  .site-footer-nav__list li:last-child {
    border-bottom: none;
  }

  .site-footer-nav__list li:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    border-right: none;
  }

  .site-footer-nav__list:has(> li:last-child:nth-child(even)) > li:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .site-footer-nav__list a,
  .site-footer-nav .menu-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: 9px;
    font-size: 0.74rem;
    line-height: 1.35;
    text-align: center;
  }
}

/* Release polish */
.hidden-desktop {
  display: none;
}

.card-detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.hero-title {
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.mobile-page-search {
  padding: var(--space-sm) 0 var(--space-md);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.ranking-table {
  width: 100%;
  text-align: left;
  border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
  padding: var(--space-md);
}

.ranking-table thead tr {
  border-bottom: 1px solid var(--border-color);
}

.ranking-table th {
  color: var(--text-secondary);
}

.ranking-table tbody tr {
  border-bottom: 1px solid var(--glass-border);
}

.ranking-table__rank {
  font-weight: bold;
  font-size: 1.2rem;
}

.ranking-table__rank--top {
  color: var(--color-gold);
}

.ranking-table__thumb {
  width: 40px;
  height: 56px;
  background: var(--color-gray-light);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .hidden-desktop {
    display: block;
  }

  .card-detail-layout {
    grid-template-columns: 1fr;
  }

  .card-detail-layout .price-cards-grid {
    grid-template-columns: 1fr !important;
  }

  .ranking-table th:nth-child(5),
  .ranking-table td:nth-child(5) {
    display: none;
  }
}
