/*
Theme Name: 人生後半の再起動ラウンジ
Theme URI: https://www.instagram.com/hiro_semi_retired/
Author: ヒロ
Author URI: https://www.instagram.com/hiro_semi_retired/
Description: 仕事・家族・組織を頑張りすぎた人が、心と体を整え、自分らしい後半生を取り戻す場所。Earth Ground / Wabi-Sabi デザイン。
Version: 3.7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: reboot-lounge
Tags: one-column, custom-menu, custom-logo, featured-images, translation-ready
*/

/* ==========================================================================
   0. CSS Custom Properties (Design Tokens)
   ========================================================================== */
:root {
  /* Brand Colors */
  --amber: #b87333;
  --amber-light: #d4a574;
  --amber-glow: rgba(184, 115, 51, 0.3);
  --earth-dark: #2c2418;
  --earth-mid: #4a3f35;
  --earth-light: #e8ddd0;
  --moss: #4a6741;
  --warm-white: #f5f0e8;
  --warm-white-alt: #faf7f2;
  --line-green: #06C755;
  --line-green-hover: #05b34d;

  /* Semantic */
  --bg-primary: var(--warm-white);
  --bg-secondary: var(--warm-white-alt);
  --bg-dark: var(--earth-dark);
  --text-primary: var(--earth-dark);
  --text-secondary: #6b5e52;
  --text-muted: #8a7e72;
  --text-on-dark: rgba(255, 255, 255, 0.85);
  --border-color: #d4cdc4;
  --border-light: rgba(212, 205, 196, 0.5);
  --card-bg: var(--warm-white-alt);

  /* Typography */
  --font-serif: "Noto Serif JP", "Georgia", serif;
  --font-sans: "Noto Sans JP", "Helvetica Neue", sans-serif;

  /* Spacing */
  --section-py: 6rem;
  --section-py-lg: 8rem;
  --container-max: 1280px;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  font-feature-settings: "palt";
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.4;
  font-weight: 500;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* ==========================================================================
   2. Layout
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
}

@media (min-width: 768px) {
  .section {
    padding-top: var(--section-py-lg);
    padding-bottom: var(--section-py-lg);
  }
}

/* ==========================================================================
   3. Header / Navigation
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  background: transparent;
}

.site-header.scrolled {
  background: rgba(245, 240, 232, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.site-logo span {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: white;
  transition: color 0.5s ease;
}

.scrolled .site-logo span {
  color: var(--text-primary);
}

.main-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }
}

.main-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: var(--amber);
}

.scrolled .main-nav a {
  color: var(--text-secondary);
}

.scrolled .main-nav a:hover {
  color: var(--amber);
}

.header-cta {
  display: none;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: white;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

@media (min-width: 640px) {
  .header-cta {
    display: inline-flex;
  }
}

.header-cta:hover {
  background: rgba(255, 255, 255, 0.25);
}

.scrolled .header-cta {
  background: var(--amber);
  color: white;
  border-color: var(--amber);
}

.scrolled .header-cta:hover {
  background: #a0622d;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
}

.scrolled .mobile-menu-toggle {
  color: var(--text-primary);
}

@media (min-width: 768px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 36, 24, 0.97);
  z-index: 100;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: white;
}

.mobile-nav a:hover {
  color: var(--amber-light);
}

.mobile-nav-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
}

/* ==========================================================================
   4. Hero Section
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  padding: 0 1rem;
}

.hero-label {
  font-size: 0.875rem;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
}

@media (min-width: 768px) {
  .hero-label {
    font-size: 1rem;
  }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 1.875rem;
  line-height: 1.3;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 3.75rem;
  }
}

.hero-title .accent {
  color: var(--amber-light);
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 42rem;
  margin: 0 auto 1rem;
  line-height: 1.8;
  font-family: var(--font-sans);
}

@media (min-width: 768px) {
  .hero-subtitle {
    font-size: 1.125rem;
  }
}

.hero-sub-label {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 3rem;
  font-family: var(--font-sans);
}

/* ==========================================================================
   5. Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  font-family: var(--font-sans);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.97);
}

.btn-amber {
  background: var(--amber);
  color: white;
  box-shadow: 0 0 20px var(--amber-glow), 0 0 60px rgba(184, 115, 51, 0.1);
}

.btn-amber:hover {
  background: #a0622d;
  box-shadow: 0 0 30px rgba(184, 115, 51, 0.5), 0 0 80px rgba(184, 115, 51, 0.2);
}

.btn-line {
  background: var(--line-green);
  color: white;
  padding: 1rem 2rem;
  border-radius: var(--radius-xl);
  font-size: 1rem;
  font-weight: 500;
  box-shadow: 0 4px 14px rgba(6, 199, 85, 0.2);
}

.btn-line:hover {
  background: var(--line-green-hover);
}

.btn-line svg {
  width: 20px;
  height: 20px;
}

.btn-outline {
  background: transparent;
  color: var(--amber);
  border: 2px solid var(--amber);
}

.btn-outline:hover {
  background: var(--amber);
  color: white;
}

/* ==========================================================================
   6. Section Styles
   ========================================================================== */

/* --- Section Header (common) --- */
.section-label {
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--amber);
  margin-bottom: 1rem;
  font-family: var(--font-sans);
  text-align: center;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  text-align: center;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 2.25rem;
  }
}

.section-desc {
  color: var(--text-muted);
  text-align: center;
  max-width: 42rem;
  margin: 0 auto;
  font-family: var(--font-sans);
  line-height: 1.8;
}

/* --- Problem Section --- */
.bg-warm {
  background-color: var(--bg-primary);
}

.bg-warm-alt {
  background-color: var(--bg-secondary);
}

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

.problem-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  transition: border-color 0.3s ease;
}

.problem-card:hover {
  border-color: rgba(184, 115, 51, 0.3);
}

.problem-card .icon {
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 2px;
}

.problem-card p {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.6;
}

.problem-grid {
  max-width: 56rem;
  margin: 0 auto;
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .problem-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Solution Section --- */
.solution-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .solution-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.solution-text .section-label,
.solution-text .section-title {
  text-align: left;
}

.solution-text .accent {
  color: var(--amber-light);
}

.solution-text p {
  color: var(--text-on-dark);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
}

.solution-image {
  position: relative;
}

.solution-image img {
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  width: 100%;
}

.solution-image::after {
  content: "";
  position: absolute;
  bottom: -1rem;
  left: -1rem;
  width: 6rem;
  height: 6rem;
  background: rgba(184, 115, 51, 0.2);
  border-radius: 50%;
  filter: blur(20px);
}

/* --- Services Section --- */
.services-grid {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.service-card:hover {
  border-color: rgba(184, 115, 51, 0.4);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.service-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.service-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  background: rgba(184, 115, 51, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
}

.service-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--amber);
  background: rgba(184, 115, 51, 0.08);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-family: var(--font-sans);
}

.service-card h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.service-card .price {
  font-size: 0.875rem;
  color: var(--amber);
  font-weight: 500;
  margin-bottom: 0.75rem;
  font-family: var(--font-sans);
}

.service-card .desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-family: var(--font-sans);
}

/* --- Profile Section --- */
.profile-grid {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  gap: 3rem;
  align-items: flex-start;
}

@media (min-width: 1024px) {
  .profile-grid {
    grid-template-columns: 2fr 3fr;
  }
}

.profile-image {
  position: relative;
}

.profile-image img {
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.profile-image::after {
  content: "";
  position: absolute;
  bottom: -0.75rem;
  right: -0.75rem;
  width: 5rem;
  height: 5rem;
  background: rgba(184, 115, 51, 0.15);
  border-radius: 50%;
  filter: blur(15px);
}

.profile-info h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.profile-info .role {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  margin-bottom: 1.5rem;
}

.profile-info .bio p {
  font-size: 0.875rem;
  color: rgba(44, 36, 24, 0.8);
  line-height: 1.8;
  margin-bottom: 1rem;
  font-family: var(--font-sans);
}

.profile-info .bio p.highlight {
  color: var(--amber);
  font-weight: 500;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .profile-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-item {
  text-align: center;
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--border-light);
}

.stat-item .value {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--amber);
}

.stat-item .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
}

/* --- Values Section --- */
.values-grid {
  max-width: 56rem;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .values-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.value-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  background: var(--card-bg);
  transition: border-color 0.3s ease;
}

.value-card:hover {
  border-color: rgba(184, 115, 51, 0.3);
}

.value-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  background: rgba(184, 115, 51, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--amber);
  margin-bottom: 1rem;
}

.value-card h3 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.value-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  font-family: var(--font-sans);
}

/* --- Message / Testimonial Section --- */
.message-section {
  position: relative;
  overflow: hidden;
}

.message-bg {
  position: absolute;
  inset: 0;
}

.message-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-bg .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.message-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 48rem;
  margin: 0 auto;
}

.message-content blockquote {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: white;
  line-height: 1.6;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .message-content blockquote {
    font-size: 1.875rem;
  }
}

.message-content p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.8;
  max-width: 36rem;
  margin: 0 auto;
  font-family: var(--font-sans);
}

/* --- CTA Section --- */
.cta-box {
  max-width: 42rem;
  margin: 0 auto;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-align: center;
}

@media (min-width: 768px) {
  .cta-box {
    padding: 2.5rem;
  }
}

.cta-box-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.cta-box-header .icon {
  color: var(--amber);
}

.cta-box-header h3 {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 500;
}

.cta-box .subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-family: var(--font-sans);
}

.cta-box .subtitle strong {
  color: var(--text-primary);
}

.cta-list {
  list-style: none;
  text-align: left;
  max-width: 24rem;
  margin: 0 auto 2rem;
}

.cta-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(44, 36, 24, 0.8);
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
}

.cta-list li .icon {
  color: var(--amber);
  flex-shrink: 0;
  margin-top: 2px;
}

.cta-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1rem;
  font-family: var(--font-sans);
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
.site-footer {
  padding: 3rem 0;
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.7);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.footer-logo span {
  font-family: var(--font-serif);
  font-size: 0.875rem;
  color: white;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--font-sans);
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.75rem;
  font-family: var(--font-sans);
}

/* ==========================================================================
   8. Animations (Scroll Reveal)
   ========================================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.08s; }
.fade-in-delay-2 { transition-delay: 0.16s; }
.fade-in-delay-3 { transition-delay: 0.24s; }
.fade-in-delay-4 { transition-delay: 0.32s; }
.fade-in-delay-5 { transition-delay: 0.4s; }

/* Bounce arrow */
@keyframes bounce {
  0%, 100% { transform: translateY(0) translateX(-50%); }
  50% { transform: translateY(10px) translateX(-50%); }
}

.bounce {
  animation: bounce 2s infinite;
}

/* Glow effect */
.glow-amber {
  box-shadow: 0 0 20px var(--amber-glow), 0 0 60px rgba(184, 115, 51, 0.1);
  transition: box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.glow-amber:hover {
  box-shadow: 0 0 30px rgba(184, 115, 51, 0.5), 0 0 80px rgba(184, 115, 51, 0.2);
}

/* ==========================================================================
   9. Custom Scrollbar
   ========================================================================== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--earth-light);
}

::-webkit-scrollbar-thumb {
  background: #9a8b7a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--amber);
}

/* ==========================================================================
   10. Utility Classes
   ========================================================================== */
.text-amber { color: var(--amber); }
.text-amber-light { color: var(--amber-light); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-16 { margin-bottom: 4rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-2xl { max-width: 42rem; }

/* ==========================================================================
   11. Responsive Adjustments
   ========================================================================== */
@media (max-width: 767px) {
  .hero-title {
    font-size: 1.75rem;
  }
  .section-title {
    font-size: 1.375rem;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .solution-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   12. Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bounce {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ==========================================================================
   Mobile LINE Sticky Bar
   ========================================================================== */
.line-sticky-bar {
  display: none;
}

@media (max-width: 768px) {
  .line-sticky-bar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-light);
    padding: 0.75rem 1rem;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .line-sticky-bar a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--line-green);
    color: #fff;
    border-radius: 0.75rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(6, 199, 85, 0.25);
    transition: transform 0.15s ease-out;
  }

  .line-sticky-bar a:active {
    transform: scale(0.97);
  }

  /* Prevent footer from being hidden behind sticky bar */
  .site-footer {
    padding-bottom: 5rem;
  }
}

/* ==========================================================================
   15. Board Filter Buttons
   ========================================================================== */
.board-filter-btn.active {
  background: var(--amber) !important;
  color: white !important;
  border-color: var(--amber) !important;
}

.board-filter-btn:hover {
  border-color: var(--amber) !important;
}

/* ==========================================================================
   16. Quest Card Flip Animation
   ========================================================================== */
#quest-card {
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

#quest-fav-btn {
  transition: transform 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   17. Insights X Share Button Hover
   ========================================================================== */
#insights-x-share-btn:hover {
  background: #272c30 !important;
}

/* Retreat Gallery responsive */
@media (min-width: 768px) {
  #retreat-gallery {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}
#retreat-gallery > div:hover img {
  transform: scale(1.05);
}

/* Retreat Reaction Buttons */
.retreat-react-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  border: none;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(4px);
  color: white;
}
.retreat-react-btn:hover {
  background: rgba(255,255,255,0.25) !important;
}
.retreat-react-btn .react-count {
  font-size: 0.625rem;
  font-weight: 600;
}

/* RETREAT Category Grid - Responsive */
@media (max-width: 640px) {
  .container [style*="grid-template-columns:repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ========== Loading Screen ========== */
.loading-flame::before,
.loading-flame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flicker 1.5s ease-in-out infinite alternate;
}
.loading-flame::before {
  width: 40px;
  height: 70px;
  margin-left: -20px;
  background: linear-gradient(to top, #ff6600 0%, #ff9900 40%, #ffcc00 70%, #fff3b0 100%);
  opacity: 0.9;
  animation-duration: 1.2s;
}
.loading-flame::after {
  width: 24px;
  height: 50px;
  margin-left: -12px;
  bottom: 5px;
  background: linear-gradient(to top, #ff4400 0%, #ff8800 50%, #ffdd44 100%);
  opacity: 0.7;
  animation-duration: 0.9s;
  animation-delay: 0.2s;
}
@keyframes flicker {
  0% { transform: scaleX(1) scaleY(1) rotate(-1deg); }
  25% { transform: scaleX(0.95) scaleY(1.02) rotate(1deg); }
  50% { transform: scaleX(1.02) scaleY(0.98) rotate(-0.5deg); }
  75% { transform: scaleX(0.98) scaleY(1.01) rotate(0.5deg); }
  100% { transform: scaleX(1.01) scaleY(0.99) rotate(-1deg); }
}
.loading-embers span {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #ff9900;
  border-radius: 50%;
  bottom: 0;
  animation: ember-rise 2.5s ease-out infinite;
  opacity: 0;
}
.loading-embers span:nth-child(1) { left: 40%; animation-delay: 0s; }
.loading-embers span:nth-child(2) { left: 55%; animation-delay: 0.4s; }
.loading-embers span:nth-child(3) { left: 45%; animation-delay: 0.8s; }
.loading-embers span:nth-child(4) { left: 60%; animation-delay: 1.2s; }
.loading-embers span:nth-child(5) { left: 50%; animation-delay: 1.6s; }
.loading-embers span:nth-child(6) { left: 35%; animation-delay: 2.0s; }
@keyframes ember-rise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  60% { opacity: 0.6; }
  100% { transform: translateY(-120px) translateX(20px) scale(0.3); opacity: 0; }
}
.loading-logs::before,
.loading-logs::after {
  content: '';
  position: absolute;
  background: linear-gradient(to right, #3d2b1f, #5c3d2e, #3d2b1f);
  border-radius: 3px;
}
.loading-logs::before {
  width: 50px;
  height: 8px;
  bottom: 0;
  left: 5px;
  transform: rotate(-5deg);
}
.loading-logs::after {
  width: 45px;
  height: 7px;
  bottom: 3px;
  left: 10px;
  transform: rotate(8deg);
}
.loading-text {
  animation: pulse-text 2s ease-in-out infinite;
}
@keyframes pulse-text {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

/* Time Mode Switcher */
.hidden { display: none !important; }
.time-mode-opt:hover { background: rgba(180,120,60,0.15) !important; color: #fcd34d !important; }
