:root {
  --bg: #f8f5f0;
  --surface: #ffffff;
  --surface-hover: #f3efe8;
  --border: rgba(0,0,0,0.07);
  --border-glow: rgba(107,79,187,0.2);
  --text: #1a1a2e;
  --text-dim: #7a7590;
  --accent: #6b4fbb;
  --accent-sakura: #e8a0b4;
  --accent-gold: #c9a96e;
  --accent-indigo: #3d5a99;
  --accent-teal: #5a9e8f;
  --accent-red: #c75050;
  --glow: rgba(107,79,187,0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --sakura: #f8b4c8;
  --wisteria: #b48ec6;
  --indigo: #3d5a99;
  --gold: #c9a96e;
  --matcha: #7daa6d;
  --sky: #6ba3c7;
}
html.lang-loading body { opacity: 0; }
html.lang-ready body { opacity: 1; transition: opacity 0.15s; }

/* Page transitions — header stays, content fades */
@view-transition { navigation: auto; }
::view-transition-old(page-content) { animation: fade-out 0.15s ease-out; }
::view-transition-new(page-content) { animation: fade-in 0.2s ease-in; }
@keyframes fade-out { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(6px); } }
@keyframes fade-in  { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
main { view-transition-name: page-content; }
.header { view-transition-name: site-header; }
footer { view-transition-name: site-footer; }
body.page-exiting main { opacity: 0; transform: translateY(6px); transition: opacity 0.15s, transform 0.15s; }
body.page-entering main { animation: fade-in 0.2s ease-in; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overscroll-behavior: none; overflow: hidden; height: 100%; }
body {
  font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Hiragino Kaku Gothic ProN', 'Segoe UI', sans-serif;
  background: var(--bg); color: var(--text); height: 100%;
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: none;
  line-height: 1.7; -webkit-font-smoothing: antialiased;
}
.container { max-width: 720px; margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 24px;
  background: rgba(248,245,240,0.88);
  backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
}
.logo {
  font-size: 1.1rem; font-weight: 700; color: var(--accent);
  text-decoration: none; letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 6px;
}
.logo-icon { font-size: 1.2rem; }
.lang-toggle { display: flex; gap: 3px; background: rgba(0,0,0,0.04); border-radius: 8px; padding: 3px; }
.lang-toggle button {
  background: none; border: none; color: var(--text-dim); font-size: 0.78rem;
  padding: 5px 10px; border-radius: 6px; cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.lang-toggle button.active { background: var(--accent); color: #fff; }
.lang-toggle button:hover:not(.active) { color: var(--text); background: rgba(0,0,0,0.06); }

/* Credits Badge */
.credits-badge {
  display: flex; align-items: center; gap: 4px;
  background: rgba(107,79,187,0.08); border: 1px solid rgba(107,79,187,0.15);
  padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; font-weight: 600;
}
.credits-icon { color: var(--accent); font-size: 0.9rem; }
.credits-count { color: var(--accent); }
.credits-label { color: var(--text-dim); font-size: 0.7rem; }
.credits-badge.credits-empty { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); }
.credits-badge.credits-empty .credits-icon,
.credits-badge.credits-empty .credits-count { color: var(--text-dim); }

/* Sections */
.section { position: relative; z-index: 1; padding: 80px 0 40px; }
#hero { padding-top: 110px; }
.section-title {
  font-size: 1.6rem; font-weight: 700; text-align: center; margin-bottom: 8px;
  letter-spacing: 0.02em; color: var(--text);
}
.section-sub { text-align: center; color: var(--text-dim); margin-bottom: 32px; font-size: 0.9rem; }
.hero-title {
  font-size: 2rem; font-weight: 800; text-align: center; margin-bottom: 10px;
  letter-spacing: 0.02em; line-height: 1.3; color: var(--text);
}
.hero-sub { text-align: center; color: var(--text-dim); font-size: 0.95rem; margin-bottom: 36px; }

/* Hero background — subtle sakura gradient */
.hero-bg {
  position: relative;
}
.hero-bg::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 480px;
  background: linear-gradient(180deg,
    rgba(248,180,200,0.08) 0%,
    rgba(107,79,187,0.06) 40%,
    rgba(201,169,110,0.04) 70%,
    transparent 100%);
  z-index: 0; pointer-events: none;
}
.hero-bg::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 480px;
  background: radial-gradient(ellipse at 70% 20%, rgba(248,180,200,0.1) 0%, transparent 60%),
              radial-gradient(ellipse at 30% 60%, rgba(107,79,187,0.06) 0%, transparent 50%);
  z-index: 0; pointer-events: none;
  animation: gentleShift 12s ease-in-out infinite;
}
.hero-bg > * { position: relative; z-index: 1; }
@keyframes gentleShift {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 1; }
}

/* Floating particles — subtle */
.particles-layer {
  position: absolute; top: 0; left: 0; right: 0; height: 480px;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
  position: absolute; border-radius: 50%;
  background: var(--sakura);
  opacity: 0.2;
  animation: particleFloat var(--dur) ease-in-out infinite;
  animation-delay: var(--delay);
}
@keyframes particleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.15; }
  50% { transform: translateY(-20px) scale(1.2); opacity: 0.3; }
}

/* Section back link */
.section-back {
  display: inline-flex; align-items: center; gap: 4px; color: var(--text-dim);
  font-size: 0.82rem; cursor: pointer; background: none; border: none;
  font-family: inherit; margin-bottom: 20px; transition: color 0.2s;
  text-decoration: none;
}
.section-back:hover { color: var(--accent); }

/* Theme Cards (homepage) */
.theme-cards {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 14px; max-width: 480px; margin: 0 auto 48px;
}
.theme-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px 14px; text-align: center; cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
  text-decoration: none; color: inherit; position: relative; overflow: visible;
}
.theme-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.07);
  border-color: var(--border-glow);
}
.theme-card:active { transform: translateY(-1px); }
.theme-card-icon { font-size: 2.2rem; line-height: 1; margin-bottom: 10px; display: inline-block; }
.theme-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 3px; color: var(--text); }
.theme-card-sub { font-size: 0.72rem; color: var(--text-dim); }

/* Card border-top accent colors */
.theme-card:nth-child(1) { border-top: 2px solid var(--sakura); }
.theme-card:nth-child(2) { border-top: 2px solid var(--accent-red); }
.theme-card:nth-child(3) { border-top: 2px solid var(--wisteria); }
.theme-card:nth-child(4) { border-top: 2px solid var(--gold); }
.theme-card:nth-child(5) { border-top: 2px solid var(--indigo); }
.theme-card:nth-child(6) { border-top: 2px solid var(--matcha); }

.theme-card:nth-child(1):hover { background: linear-gradient(180deg, rgba(248,180,200,0.06), var(--surface)); }
.theme-card:nth-child(2):hover { background: linear-gradient(180deg, rgba(199,80,80,0.05), var(--surface)); }
.theme-card:nth-child(3):hover { background: linear-gradient(180deg, rgba(180,142,198,0.06), var(--surface)); }
.theme-card:nth-child(4):hover { background: linear-gradient(180deg, rgba(201,169,110,0.06), var(--surface)); }
.theme-card:nth-child(5):hover { background: linear-gradient(180deg, rgba(61,90,153,0.05), var(--surface)); }
.theme-card:nth-child(6):hover { background: linear-gradient(180deg, rgba(125,170,109,0.05), var(--surface)); }

/* Animated entrance */
.theme-card { animation: cardFadeIn 0.4s ease both; }
.theme-card:nth-child(1) { animation-delay: 0.05s; }
.theme-card:nth-child(2) { animation-delay: 0.1s; }
.theme-card:nth-child(3) { animation-delay: 0.15s; }
.theme-card:nth-child(4) { animation-delay: 0.2s; }
.theme-card:nth-child(5) { animation-delay: 0.25s; }
.theme-card:nth-child(6) { animation-delay: 0.3s; }

/* Badge */
.badge {
  position: absolute; top: -6px; right: -6px; z-index: 2;
  padding: 2px 8px; border-radius: 12px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.03em;
  color: #fff; line-height: 1.4;
  animation: badgeFadeIn 0.4s ease both;
}
.badge-hot { background: linear-gradient(135deg, var(--accent-red), #d06060); }
.badge-popular { background: linear-gradient(135deg, var(--gold), #dbb87a); color: #2d2a3e; }
.badge-new { background: linear-gradient(135deg, var(--matcha), #8dba7d); }

/* Card */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

/* Sign Grid (zodiac) */
.sign-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; max-width: 480px; margin: 0 auto;
}
.sign-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 14px 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.25s ease; color: var(--text); font-family: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}
.sign-btn:hover {
  transform: translateY(-3px); background: var(--surface-hover);
  border-color: var(--border-glow); box-shadow: 0 6px 20px rgba(107,79,187,0.08);
}
.sign-btn.selected {
  border-color: var(--accent); background: rgba(107,79,187,0.06);
  box-shadow: 0 0 16px rgba(107,79,187,0.1);
}
.sign-symbol { font-size: 1.6rem; line-height: 1; }
.sign-name { font-size: 0.68rem; color: var(--text-dim); white-space: nowrap; }

/* Blood Type Grid */
.blood-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 12px; max-width: 400px; margin: 0 auto;
}
.blood-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.25s ease; color: var(--text); font-family: inherit;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}
.blood-btn:hover {
  transform: translateY(-3px); background: var(--surface-hover);
  border-color: rgba(199,80,80,0.25);
}
.blood-btn.selected {
  border-color: var(--accent-red); background: rgba(199,80,80,0.06);
}
.blood-type-label { font-size: 1.4rem; font-weight: 800; color: var(--accent-red); }
.blood-type-name { font-size: 0.7rem; color: var(--text-dim); }

/* Rokusei (Six Star) Grid */
.rokusei-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; max-width: 420px; margin: 0 auto;
}
.rokusei-btn {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 16px 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.25s ease; color: var(--text); font-family: inherit;
}
.rokusei-btn:hover {
  transform: translateY(-3px); border-color: var(--border-glow);
  box-shadow: 0 6px 20px rgba(107,79,187,0.08);
}
.rokusei-btn.selected {
  border-color: var(--accent); background: rgba(107,79,187,0.06);
}
.rokusei-icon { font-size: 1.6rem; }
.rokusei-name { font-size: 0.75rem; font-weight: 600; }
.rokusei-sub { font-size: 0.62rem; color: var(--text-dim); }

/* Fortune Card */
.fortune-card { animation: fadeSlideUp 0.5s ease; }
.fortune-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.fortune-header-left { display: flex; align-items: center; gap: 12px; }
.fortune-sign-icon { font-size: 2.4rem; line-height: 1; }
.fortune-sign-name { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.01em; }
.fortune-date { color: var(--text-dim); font-size: 0.8rem; }

/* Score Circle */
.score-circle-wrap {
  position: relative; width: 130px; height: 130px; margin: 0 auto 18px;
  display: flex; align-items: center; justify-content: center;
}
.score-circle { width: 130px; height: 130px; }
.score-circle-inner {
  position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.score-total-num { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--text); }
.score-total-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-dim); }

/* Advice */
.fortune-advice {
  font-size: 0.95rem; line-height: 1.8; margin-bottom: 22px; padding: 14px 16px;
  background: rgba(107,79,187,0.04); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Score bars */
.score-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.score-item { display: flex; align-items: center; gap: 10px; }
.score-label { font-size: 0.8rem; min-width: 72px; display: flex; align-items: center; gap: 5px; }
.score-emoji { font-size: 0.9rem; }
.score-track { flex: 1; height: 7px; background: rgba(0,0,0,0.04); border-radius: 4px; overflow: hidden; }
.score-bar { height: 100%; border-radius: 4px; width: 0; transition: width 1s cubic-bezier(0.22, 1, 0.36, 1); }
.score-bar.love { background: linear-gradient(90deg, var(--accent-sakura), #f0b8cc); }
.score-bar.career { background: linear-gradient(90deg, var(--accent), #8a70d0); }
.score-bar.money { background: linear-gradient(90deg, var(--accent-gold), #dcc08a); }
.score-bar.health { background: linear-gradient(90deg, var(--accent-teal), #7ab8a8); }
.score-num { font-size: 0.78rem; font-weight: 600; min-width: 28px; text-align: right; color: var(--text-dim); }

/* Lucky row */
.lucky-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.lucky-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 6px; background: rgba(201,169,110,0.05); border: 1px solid rgba(201,169,110,0.1);
  border-radius: var(--radius-sm); text-align: center;
}
.lucky-label { font-size: 0.6rem; letter-spacing: 0.05em; color: var(--text-dim); }
.lucky-value { font-size: 0.8rem; font-weight: 600; }

/* Tomorrow Preview */
.tomorrow-preview {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 16px;
  background: linear-gradient(90deg, rgba(90,158,143,0.05), rgba(107,79,187,0.04));
  border: 1px solid rgba(90,158,143,0.1); border-radius: var(--radius-sm);
}
.tomorrow-label { font-size: 0.68rem; letter-spacing: 0.06em; color: var(--accent-teal); font-weight: 600; white-space: nowrap; }
.tomorrow-text { font-size: 0.82rem; color: var(--text-dim); }

/* Compatibility */
.compat-picker { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 32px; }
.compat-side { flex: 1; text-align: center; }
.compat-label { font-size: 0.78rem; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 10px; }
.compat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.compat-btn {
  display: flex; align-items: center; justify-content: center; padding: 9px 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: 1.1rem; transition: all 0.2s; color: var(--text); font-family: inherit;
}
.compat-btn:hover { background: var(--surface-hover); transform: scale(1.08); }
.compat-btn.selected { border-color: var(--accent); background: rgba(107,79,187,0.06); }
.compat-selected-name { margin-top: 6px; font-size: 0.82rem; color: var(--accent); min-height: 1.3em; }
.compat-heart-col { display: flex; align-items: center; padding-top: 36px; }
.compat-heart { font-size: 1.8rem; animation: pulse 2.5s ease-in-out infinite; }
.compat-result { text-align: center; animation: fadeSlideUp 0.5s ease; }
.compat-score {
  font-size: 3rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent-sakura), var(--accent), var(--accent-teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 10px;
}
.compat-desc { font-size: 0.95rem; line-height: 1.7; margin-bottom: 14px; }
.compat-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.compat-tag {
  padding: 4px 12px; background: rgba(107,79,187,0.05); border: 1px solid rgba(107,79,187,0.1);
  border-radius: 16px; font-size: 0.78rem; color: var(--accent);
}

/* Blood Type selector for compat */
.compat-blood-row { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.compat-blood-btn {
  padding: 6px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s; font-family: inherit; color: var(--text);
}
.compat-blood-btn.selected {
  border-color: var(--accent-red); background: rgba(199,80,80,0.06); color: var(--accent-red);
}

/* Tarot */
.tarot-spread { display: flex; justify-content: center; gap: 18px; margin-bottom: 32px; }
.tarot-position { text-align: center; }
.tarot-pos-label { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-dim); margin-bottom: 8px; }
.tarot-card { width: 105px; height: 165px; perspective: 800px; cursor: pointer; }
.tarot-card-inner {
  width: 100%; height: 100%; position: relative;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1); transform-style: preserve-3d;
}
.tarot-card.flipped .tarot-card-inner { transform: rotateY(180deg); }
.tarot-card-back, .tarot-card-front {
  position: absolute; inset: 0; border-radius: var(--radius-sm);
  backface-visibility: hidden; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.tarot-card-back {
  background: linear-gradient(135deg, #3d5a99, #6b4fbb, #e8a0b4);
  border: 2px solid rgba(61,90,153,0.3);
  font-size: 2rem; color: rgba(255,255,255,0.8);
  box-shadow: 0 4px 16px rgba(61,90,153,0.15);
}
.tarot-card-back::before {
  content: ''; position: absolute; inset: 5px;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 6px;
}
.tarot-card-front {
  background: var(--surface); border: 2px solid var(--accent-gold);
  transform: rotateY(180deg); padding: 10px 8px; gap: 5px;
  box-shadow: 0 4px 16px rgba(201,169,110,0.1);
}
.tarot-card-num { font-size: 0.68rem; color: var(--accent-gold); font-weight: 600; }
.tarot-card-symbol { font-size: 2rem; line-height: 1.2; }
.tarot-card-name { font-size: 0.62rem; color: var(--accent-gold); text-align: center; line-height: 1.3; font-weight: 500; }
.tarot-card:not(.flipped):hover .tarot-card-inner { transform: rotateY(10deg); }
.tarot-reading { animation: fadeSlideUp 0.5s ease; margin-top: 22px; margin-bottom: 22px; }
.tarot-reading h3 { font-size: 1rem; margin-bottom: 10px; color: var(--accent-gold); }
.tarot-reading p { line-height: 1.8; white-space: pre-line; }

/* Rokusei Form */
.rokusei-form {
  max-width: 400px; margin: 0 auto 32px; display: flex; flex-direction: column; gap: 14px;
}
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-field label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.form-field select,
.form-field input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 0.9rem;
  transition: border-color 0.2s; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 5l3 3 3-3' fill='none' stroke='%237a7590' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.form-field select:focus,
.form-field input:focus { outline: none; border-color: var(--accent); }
.date-row { display: flex; gap: 10px; align-items: flex-end; }
.date-row .form-field { flex: 1; min-width: 0; }

/* Gender selector */
.gender-row { display: flex; gap: 8px; }
.gender-btn {
  flex: 1; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 0.85rem;
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.gender-btn.selected { border-color: var(--accent); background: rgba(107,79,187,0.06); color: var(--accent); font-weight: 600; }

/* Reading sections */
.reading-section { margin-bottom: 16px; animation: fadeSlideUp 0.5s ease; }
.reading-label { font-size: 0.78rem; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.reading-text { font-size: 0.92rem; line-height: 1.8; }

/* Dream / Question input */
.text-input {
  width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 0.9rem;
  line-height: 1.7; resize: vertical; transition: border-color 0.2s;
}
.text-input:focus { outline: none; border-color: var(--accent); }

/* Buttons */
.btn-primary {
  display: block; margin: 0 auto;
  background: linear-gradient(135deg, var(--accent), #8066cc);
  border: none; color: #fff; padding: 12px 28px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 600; cursor: pointer; font-family: inherit;
  transition: all 0.25s; box-shadow: 0 4px 14px rgba(107,79,187,0.18);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(107,79,187,0.25); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  display: block; margin: 0 auto; background: none; border: 1px solid var(--border);
  color: var(--text-dim); padding: 8px 20px; border-radius: 8px; cursor: pointer;
  font-size: 0.82rem; font-family: inherit; transition: all 0.2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* Loading dots */
.dot-anim { display: inline-block; animation: dotPulse 1.4s infinite steps(4,end); overflow: hidden; vertical-align: bottom; width: 0; }
@keyframes dotPulse { 0% { width: 0; } 25% { width: .4em; } 50% { width: .7em; } 75% { width: 1em; } }

/* Rokusei Chart */
.rokusei-chart {
  max-width: 400px; margin: 0 auto 22px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.03); animation: fadeSlideUp 0.5s ease;
}
.rokusei-chart-title { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-dim); text-align: center; margin-bottom: 14px; }

/* Premium Gate */
.premium-gate { position: relative; }
.premium-gate.locked > *:not(.premium-lock-overlay) {
  filter: blur(6px); user-select: none; pointer-events: none;
}
.premium-lock-overlay {
  display: none; position: absolute; inset: 0; z-index: 5;
  align-items: center; justify-content: center; gap: 8px;
  font-size: 0.9rem; font-weight: 600; color: var(--accent); cursor: pointer;
  background: rgba(248,245,240,0.5); border-radius: var(--radius-sm);
  transition: background 0.2s;
}
.premium-gate.locked .premium-lock-overlay { display: flex; }
.premium-lock-overlay:hover { background: rgba(248,245,240,0.7); }
.lock-icon { font-size: 1.1rem; }

/* Paywall Modal */
.paywall-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.25); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.paywall-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 30px; max-width: 380px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.1); animation: fadeSlideUp 0.3s ease;
}
.paywall-title { font-size: 1.3rem; font-weight: 700; text-align: center; margin-bottom: 6px; color: var(--accent); }
.paywall-desc { text-align: center; color: var(--text-dim); font-size: 0.85rem; margin-bottom: 22px; }
.paywall-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.paywall-btn {
  display: block; width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s; text-align: center;
}
.paywall-btn:hover { border-color: var(--accent); background: rgba(107,79,187,0.04); transform: translateY(-1px); }
.paywall-btn-best { border-color: var(--matcha); background: rgba(125,170,109,0.04); }
.paywall-btn-best:hover { background: rgba(125,170,109,0.08); border-color: var(--matcha); }
.paywall-best-tag {
  display: inline-block; font-size: 0.6rem; letter-spacing: 0.05em;
  background: var(--matcha); color: #fff; padding: 2px 7px; border-radius: 4px;
  font-weight: 700; margin-bottom: 3px;
}
.paywall-restore { text-align: center; margin-bottom: 14px; }
.paywall-restore-link {
  background: none; border: none; color: var(--text-dim); font-size: 0.72rem;
  cursor: pointer; font-family: inherit; transition: color 0.2s;
}
.paywall-restore-link:hover { color: var(--accent); }
.paywall-restore-form { display: flex; gap: 8px; margin-top: 8px; }
.paywall-restore-form input {
  flex: 1; background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 12px; color: var(--text); font-family: inherit; font-size: 0.82rem;
}
.paywall-restore-form input:focus { outline: none; border-color: var(--accent); }
.paywall-restore-submit {
  background: var(--accent); border: none; color: #fff; padding: 8px 14px;
  border-radius: 8px; font-family: inherit; font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.paywall-restore-msg { font-size: 0.78rem; margin-top: 6px; }
.paywall-restore-msg.ok { color: var(--matcha); }
.paywall-restore-msg.err { color: var(--accent-red); }
.paywall-trust { text-align: center; margin-bottom: 14px; }
.paywall-trust p { font-size: 0.68rem; color: var(--text-dim); opacity: 0.7; line-height: 1.8; }
.paywall-later {
  display: block; width: 100%; background: none; border: none; color: var(--text-dim);
  font-size: 0.82rem; font-family: inherit; cursor: pointer; padding: 8px;
  transition: color 0.2s; text-align: center;
}
.paywall-later:hover { color: var(--text); }

/* Credit Confirm Dialog */
.credit-confirm-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.35);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.15s ease;
}
.credit-confirm-card {
  background: #fff; border-radius: 14px; padding: 26px 22px 20px;
  text-align: center; max-width: 280px; width: 88%;
  box-shadow: 0 12px 36px rgba(0,0,0,0.15);
}
.credit-confirm-icon { font-size: 1.4rem; margin-bottom: 6px; }
.credit-confirm-text { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.credit-confirm-balance { font-size: 0.8rem; color: var(--text-dim); margin-bottom: 16px; }
.credit-confirm-btns { display: flex; gap: 10px; justify-content: center; }
.credit-confirm-ok {
  flex: 1; background: linear-gradient(135deg, var(--accent), #8066cc);
  color: #fff; border: none; padding: 10px 0; border-radius: 10px;
  font-size: 0.88rem; font-weight: 600; cursor: pointer; font-family: inherit;
}
.credit-confirm-cancel {
  flex: 1; background: transparent; color: var(--text-dim);
  border: 1px solid rgba(0,0,0,0.1); padding: 10px 0; border-radius: 10px;
  font-size: 0.88rem; cursor: pointer; font-family: inherit;
}

/* Ranking */
.rank-crown {
  text-align: center; margin-bottom: 20px; padding: 18px;
  background: linear-gradient(135deg, rgba(201,169,110,0.08), rgba(107,79,187,0.05));
  border: 1px solid rgba(201,169,110,0.15); border-radius: var(--radius);
}
.crown-sign { font-size: 2.6rem; margin-bottom: 4px; }
.crown-name { font-size: 1rem; font-weight: 700; color: var(--accent-gold); }
.crown-score { font-size: 1.8rem; font-weight: 800; color: var(--text); }
.crown-score small { font-size: 0.75rem; color: var(--text-dim); font-weight: 500; }
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.rank-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px;
  background: var(--surface); border: 1px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; transition: all 0.2s; animation: fadeSlideUp 0.4s ease both;
}
.rank-row:hover { background: var(--surface-hover); border-color: var(--border); }
.rank-row.rank-mine { border-color: var(--accent); background: rgba(107,79,187,0.04); }
.rank-row.rank-top3 { background: rgba(201,169,110,0.04); border-left: 3px solid var(--gold); }
.rank-pos { min-width: 26px; font-size: 0.85rem; font-weight: 700; color: var(--text-dim); text-align: center; }
.rank-symbol { font-size: 1.1rem; }
.rank-name { flex: 1; font-size: 0.85rem; }
.rank-score { font-size: 0.85rem; font-weight: 700; }
.rank-score small { font-size: 0.68rem; color: var(--text-dim); font-weight: 400; }

/* Decorative divider */
.divider {
  text-align: center; margin: 8px 0 20px; color: var(--text-dim); font-size: 0.7rem;
  opacity: 0.4; letter-spacing: 0.3em;
}

/* Footer */
.footer {
  position: relative; z-index: 1; text-align: center; padding: 36px 20px 28px;
  border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.82rem;
}
.footer-note { font-size: 0.72rem; margin-top: 5px; opacity: 0.5; }
.footer-seo { margin-top: 8px; font-size: 0.68rem; opacity: 0.3; }
.footer-seo a { color: inherit; text-decoration: none; }
.footer-seo a:hover { opacity: 0.6; }
.footer-cross {
  text-align: center; padding: 28px 20px 0; margin-top: 20px;
  border-top: 1px solid var(--border);
}
.footer-cross-title { font-size: 0.82rem; font-weight: 600; color: var(--text-dim); margin-bottom: 12px; }
.footer-cross-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.footer-cross-links a {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 14px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 0.8rem; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
}
.footer-cross-links a:hover { background: var(--surface-hover); border-color: var(--accent); color: var(--accent); }

/* Rainbow top-bar for result cards */
.fortune-card::before, .compat-result::before, .tarot-reading::before,
.reading-section::first-child::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--sakura), var(--wisteria), var(--indigo), var(--gold));
  border-radius: var(--radius) var(--radius) 0 0;
}
.fortune-card, .compat-result, .tarot-reading { position: relative; overflow: hidden; }

/* Animations */
@keyframes fadeSlideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes cardFadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes badgeFadeIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.field-error { border-color: var(--accent-red) !important; animation: shake 0.3s; }

/* Responsive */
@media (max-width: 600px) {
  .hero-title { font-size: 1.5rem; }
  .hero-sub { font-size: 0.85rem; margin-bottom: 28px; }
  .theme-cards { gap: 10px; }
  .theme-card { padding: 20px 10px; }
  .theme-card-icon { font-size: 1.8rem; margin-bottom: 8px; }
  .theme-card-title { font-size: 0.9rem; }
  .sign-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .sign-symbol { font-size: 1.3rem; }
  .sign-name { font-size: 0.6rem; }
  .section { padding: 70px 0 28px; }
  .section-title { font-size: 1.3rem; }
  .card { padding: 18px; }
  .score-circle-wrap { width: 110px; height: 110px; }
  .score-circle { width: 110px; height: 110px; }
  .score-total-num { font-size: 2rem; }
  .lucky-row { grid-template-columns: repeat(2, 1fr); }
  .compat-picker { gap: 6px; }
  .compat-grid { gap: 3px; }
  .compat-btn { font-size: 0.95rem; padding: 7px 2px; }
  .tarot-spread { gap: 10px; }
  .tarot-card { width: 88px; height: 138px; }
  .tarot-card-symbol { font-size: 1.5rem; }
  .tarot-card-name { font-size: 0.58rem; }
  .rank-row { padding: 7px 10px; gap: 8px; }
  .crown-sign { font-size: 2rem; }
  .crown-score { font-size: 1.4rem; }
  .paywall-card { padding: 22px 16px; }
  .header { gap: 6px; padding: 10px 14px; }
  .credits-badge { padding: 3px 8px; font-size: 0.7rem; }
  .credits-label { display: none; }
  .blood-grid { gap: 8px; }
  .blood-btn { padding: 16px 6px; }
  .blood-type-label { font-size: 1.2rem; }
  .rokusei-grid { grid-template-columns: repeat(2, 1fr); }
  .particles-layer { height: 360px; }
  .hero-bg::before, .hero-bg::after { height: 360px; }
}
