/* SERENE JAPANESE NATURE THEME & RESPONSIVE MOBILE/DESKTOP STYLESHEET */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;900&family=Noto+Serif+JP:wght@400;700;900&family=Plus+Jakarta+Sans:wght@400;600;700;800&family=Fira+Code:wght@500;700&display=swap');

:root {
  --bg-primary: #0f121d;
  --bg-card: rgba(26, 31, 48, 0.85);
  --accent-pink: #ff7597;
  --accent-crimson: #dc2626;
  --accent-gold: #f59e0b;
  --text-main: #f8fafc;
  --border-color: rgba(244, 114, 182, 0.35);
  --font-display: 'Cinzel', serif;
  --font-jp: 'Noto Serif JP', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
}

[data-theme="shrine"] {
  --bg-primary: #120b0d;
  --bg-card: rgba(41, 19, 24, 0.85);
  --accent-pink: #f59e0b;
  --accent-crimson: #e11d48;
  --border-color: rgba(245, 158, 11, 0.35);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-main);
  overflow-x: hidden;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* CUSTOM CURSOR - HIDDEN ON TOUCH DEVICES FOR CLEAN MOBILE UX */
#customCursor {
  width: 24px;
  height: 24px;
  background: radial-gradient(circle, rgba(255, 117, 151, 0.8) 0%, rgba(255, 117, 151, 0) 70%);
  border: 2px solid var(--accent-pink);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.08s ease-out, width 0.2s, height 0.2s;
  box-shadow: 0 0 15px var(--accent-pink);
}

@media (hover: none) or (pointer: coarse) {
  #customCursor {
    display: none !important;
  }
}

.font-display { font-family: var(--font-display); }
.font-jp { font-family: var(--font-jp); }

/* INTRO OVERLAY SCREEN STYLING */
#shojiIntroContainer {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* GLASSMOPHISM & WASHI PANEL CARDS */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.washi-panel {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.washi-panel:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(255, 117, 151, 0.25);
  border-color: var(--accent-pink);
}

/* 3D FLIP MEMBER CARDS */
.flip-card {
  perspective: 1000px;
  height: 380px;
}

@media (max-width: 640px) {
  .flip-card {
    height: 360px;
  }
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 1.5rem;
  border: 2px solid var(--border-color);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.flip-card-back {
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
}

/* HERO PASSPORT / MEMBERSHIP CERTIFICATE CARD */
.passport-card {
  background: linear-gradient(160deg, rgba(26, 31, 48, 0.95) 0%, rgba(15, 18, 29, 0.95) 100%);
  border: 2px solid var(--accent-gold);
  border-radius: 1.75rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(245, 158, 11, 0.15) inset;
  position: relative;
}

.passport-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(245, 158, 11, 0.35);
  border-radius: 1.4rem;
  pointer-events: none;
}

.passport-card:hover {
  border-color: var(--accent-pink);
  box-shadow: 0 24px 55px rgba(255, 117, 151, 0.25), 0 0 0 1px rgba(255, 117, 151, 0.2) inset;
}

/* THEME SWITCHER PILL WIDGET */
.theme-switcher-widget {
  background: rgba(15, 18, 29, 0.9);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

/* SUBWAY TIMELINE ALIGNMENT */
.subway-line {
  position: relative;
  padding-left: 2rem;
}

@media (min-width: 640px) {
  .subway-line {
    padding-left: 0;
  }
}

.subway-line::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, var(--accent-pink), var(--accent-gold));
  border-radius: 9999px;
}

@media (min-width: 640px) {
  .subway-line::before {
    left: 50%;
    transform: translateX(-50%);
  }
}

/* EMA WOODEN PLAQUE */
.ema-wooden-plaque {
  background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
  border: 3px solid #b45309;
  border-radius: 1.25rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.6);
  position: relative;
  clip-path: polygon(15% 0%, 85% 0%, 100% 25%, 100% 100%, 0% 100%, 0% 25%);
  transition: transform 0.3s ease;
}

.ema-wooden-plaque:hover {
  transform: scale(1.03) rotate(1deg);
}

/* SCROLL REVEAL ANIMATIONS */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* RESPONSIVE SCROLLBAR */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0f121d;
}
::-webkit-scrollbar-thumb {
  background: var(--accent-pink);
  border-radius: 9999px;
}

/* MOBILE NAVIGATION DRAWER ANIMATIONS */
#mobileNavMenu {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobileNavMenu.closed {
  transform: translateX(100%);
}
#mobileNavMenu.open {
  transform: translateX(0);
}

/* ULTRA-COMPACT HEADER WHEN LOGGED IN FOR PROMINENT LOGOUT VISIBILITY */
body.is-logged-in header {
  padding-top: 1px;
  padding-bottom: 1px;
}

body.is-logged-in header .max-w-7xl {
  height: 48px;
}

@media (min-width: 640px) {
  body.is-logged-in header .max-w-7xl {
    height: 52px;
  }
}

body.is-logged-in #userNavContainer {
  display: flex !important;
}
