/* ============================================
   kenkou kiroku APP — Design System
   「蓄積が意味を持つ体験設計」
   上品・静か・知的・女性的
   ブーゲンビリア × 白壁 × ターコイズ
   ============================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Zen+Kaku+Gothic+New:wght@300;400&family=Noto+Serif+JP:wght@300;400;500&family=Noto+Sans+JP:wght@300;400;500&display=swap');

/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
  /* ── Luminous Path Color Palette ── */
  --app-bg:           #06080f;
  --app-bg-sub:       #0b1025;
  --app-bg-card:      rgba(255,255,255,0.045);
  --app-bg-air:       rgba(90,240,208,0.05);
  --app-bg-deep:      rgba(176,127,255,0.08);

  /* Brand Colors */
  --pink:             #b07fff;
  --pink-soft:        #c9a8ff;
  --pink-light:       rgba(176,127,255,0.12);
  --pink-pale:        rgba(176,127,255,0.06);
  --teal:             #5af0d0;
  --teal-soft:        #8df5e0;
  --teal-light:       rgba(90,240,208,0.12);
  --teal-pale:        rgba(90,240,208,0.06);
  --teal-dark:        #3dd4b0;
  --gold:             #ffd97a;
  --gold-light:       rgba(255,217,122,0.12);
  --plum:             #c9a8ff;
  --plum-light:       rgba(176,127,255,0.25);
  --plum-pale:        rgba(176,127,255,0.06);

  /* Luminous Path Exclusive */
  --sacral:           #ff7a3c;
  --sacral-glow:      rgba(255,122,60,0.35);
  --crystal-blue:     #6ecfff;
  --crystal-violet:   #b07fff;
  --crystal-rose:     #ff6eb0;
  --crystal-gold:     #ffd97a;
  --crystal-teal:     #5af0d0;
  --midnight:         #06080f;
  --deep-navy:        #0b1025;
  --glass:            rgba(255,255,255,0.045);
  --glass-border:     rgba(255,255,255,0.08);

  /* Text */
  --text-primary:     #e8e4f0;
  --text-secondary:   rgba(232,228,240,0.75);
  --text-muted:       rgba(232,228,240,0.45);
  --text-accent:      #b07fff;
  --text-teal:        #5af0d0;
  --white:            #FFFFFF;

  /* Borders */
  --border:           rgba(255,255,255,0.10);
  --border-light:     rgba(255,255,255,0.06);
  --border-pink:      rgba(176,127,255,0.25);
  --border-teal:      rgba(90,240,208,0.25);

  /* Shadows */
  --shadow-xs:        0 1px 4px rgba(0,0,0,0.3);
  --shadow-sm:        0 2px 10px rgba(0,0,0,0.3);
  --shadow-md:        0 6px 24px rgba(0,0,0,0.4);
  --shadow-lg:        0 12px 40px rgba(0,0,0,0.5);
  --shadow-glow-pink: 0 0 20px rgba(176,127,255,0.30);
  --shadow-glow-teal: 0 0 20px rgba(90,240,208,0.30);

  /* ── Typography ── */
  --font-serif:  'Noto Serif JP', 'Georgia', serif;
  --font-sans:   'Zen Kaku Gothic New', 'Noto Sans JP', sans-serif;
  --font-accent: 'Cormorant Garamond', Georgia, serif;

  /* （以下 --sp-*, --radius-*, --ease-*, --duration-* はそのまま変更なし） */


  /* ── Spacing ── */
  --sp-1:  0.25rem;
  --sp-2:  0.5rem;
  --sp-3:  0.75rem;
  --sp-4:  1rem;
  --sp-5:  1.25rem;
  --sp-6:  1.5rem;
  --sp-8:  2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;

  /* ── Radii ── */
  --radius-sm:   0.5rem;
  --radius-md:   1rem;
  --radius-lg:   1.5rem;
  --radius-xl:   2rem;
  --radius-full: 9999px;

  /* ── Transitions ── */
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:    cubic-bezier(0.5, 0, 0.75, 0);
  --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   500ms;
  --duration-slower: 800ms;

  /* ── App Layout ── */
  --app-max-width: 430px;
  --nav-height:    72px;
  --header-height: 60px;
}

/* ============================================
   BASE RESET & BODY
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--app-bg);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   APP SHELL — MAX WIDTH CONTAINER
   ============================================ */
#app-shell {
  max-width: var(--app-max-width);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--app-bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(108, 74, 103, 0.08);
}

/* ── Page Screens ── */
.app-screen {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  background: var(--app-bg);
  animation: screenFadeIn var(--duration-normal) var(--ease-out) both;
}
.app-screen.active {
  display: flex;
}

@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.app-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: var(--nav-height);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: stretch;
  z-index: 100;
  box-shadow: 0 -4px 24px rgba(108, 74, 103, 0.08);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  cursor: pointer;
  background: none;
  border: none;
  padding: var(--sp-2) var(--sp-1);
  position: relative;
  transition: all var(--duration-normal) var(--ease-out);
  color: var(--text-muted);
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 32px;
  height: 2px;
  background: var(--pink);
  border-radius: 0 0 var(--radius-full) var(--radius-full);
  transition: transform var(--duration-normal) var(--ease-out);
}

.nav-item.active {
  color: var(--pink);
}
.nav-item.active::before {
  transform: translateX(-50%) scaleX(1);
}

.nav-icon {
  font-size: 1.375rem;
  line-height: 1;
}
/* テキストナビアイコン */
.nav-icon-text {
  font-family: var(--font-accent);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  line-height: 1;
}
.nav-label {
  font-size: 0.625rem;
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Record nav special button */
.nav-item.nav-record {
  position: relative;
}
.nav-record-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--teal));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(230, 63, 168, 0.35);
  margin-bottom: var(--sp-1);
  transition: all var(--duration-normal) var(--ease-out);
}
.nav-item.nav-record:hover .nav-record-ring,
.nav-item.nav-record.active .nav-record-ring {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(230, 63, 168, 0.45);
}
.nav-record-ring .nav-icon {
  color: white;
  font-size: 1.25rem;
}
/* 記録ボタン中央の十字（アイコンレス） */
.nav-record-cross {
  display: block;
  width: 18px;
  height: 18px;
  position: relative;
}
.nav-record-cross::before,
.nav-record-cross::after {
  content: '';
  position: absolute;
  background: white;
  border-radius: 2px;
}
.nav-record-cross::before {
  width: 2px;
  height: 18px;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}
.nav-record-cross::after {
  width: 18px;
  height: 2px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

/* ============================================
   COMMON APP HEADER
   ============================================ */
.app-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-5);
  background: transparent;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background var(--duration-normal) var(--ease-out);
}
.app-header.scrolled {
  background: rgba(251, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.app-header-logo {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.08em;
  text-decoration: none;
}
.app-header-logo .logo-i {
  color: var(--pink);
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.125rem;
  transition: all var(--duration-fast) var(--ease-out);
}
.btn-icon:hover {
  background: var(--plum-pale);
  color: var(--plum);
}

/* ============================================
   SCROLL CONTENT AREA
   ============================================ */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(var(--nav-height) + var(--sp-8));
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.text-serif {
  font-family: var(--font-serif);
}
.text-accent-font {
  font-family: var(--font-accent);
}

.app-section-title {
  font-family: var(--font-serif);
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.app-section-sub {
  font-family: var(--font-accent);
  font-size: 0.6875rem;
  color: var(--pink);
  letter-spacing: 0.12em;
  text-transform: lowercase;
  margin-bottom: var(--sp-1);
}

/* ============================================
   CARDS
   ============================================ */
.app-card {
  background: var(--app-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}
.app-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.app-card-padded {
  padding: var(--sp-5);
}

/* ── Gradient Cards ── */
.card-pink {
  background: linear-gradient(135deg, var(--pink-light) 0%, var(--pink-pale) 100%);
  border-color: var(--border-pink);
}
.card-teal {
  background: linear-gradient(135deg, var(--teal-light) 0%, var(--teal-pale) 100%);
  border-color: var(--border-teal);
}
.card-plum {
  background: linear-gradient(135deg, #F2ECF1 0%, #FAF6F9 100%);
  border-color: var(--border);
}
.card-gold {
  background: linear-gradient(135deg, #FBF4E4 0%, #FFFBF3 100%);
  border-color: rgba(201, 164, 74, 0.20);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink) 0%, #C02E8E 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(230, 63, 168, 0.30);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(230, 63, 168, 0.40);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-teal {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(39, 183, 179, 0.30);
}
.btn-teal:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(39, 183, 179, 0.40);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-outline:hover {
  background: var(--plum-pale);
  border-color: var(--plum-light);
  color: var(--plum);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: var(--sp-2) var(--sp-4);
}
.btn-ghost:hover {
  background: var(--plum-pale);
  color: var(--plum);
}

.btn-lg {
  padding: var(--sp-4) var(--sp-8);
  font-size: 1rem;
}
.btn-sm {
  padding: var(--sp-2) var(--sp-4);
  font-size: 0.8125rem;
}
.btn-full {
  width: 100%;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group {
  margin-bottom: var(--sp-5);
}
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
  letter-spacing: 0.03em;
}
.form-sub-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
  display: block;
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--app-bg-card);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: all var(--duration-fast) var(--ease-out);
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(230, 63, 168, 0.10);
}
.form-textarea {
  resize: none;
  line-height: 1.7;
  min-height: 100px;
}

/* ── Chip / Tag selectors ── */
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}
.chip {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  background: var(--app-bg-sub);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  user-select: none;
}
.chip:hover {
  background: var(--pink-light);
  border-color: var(--border-pink);
  color: var(--pink);
}
.chip.selected {
  background: var(--pink-light);
  border-color: var(--pink);
  color: var(--pink);
  font-weight: 500;
}
.chip.chip-teal.selected {
  background: var(--teal-light);
  border-color: var(--teal);
  color: var(--teal-dark);
}

/* ── Slider ── */
.range-group {
  margin-bottom: var(--sp-5);
}
.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: var(--sp-1);
}
.range-value-display {
  text-align: center;
  font-family: var(--font-accent);
  font-size: 1.25rem;
  color: var(--pink);
  font-weight: 500;
  margin-bottom: var(--sp-2);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, var(--pink) 0%, var(--pink) 50%, var(--border) 50%);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--pink);
  box-shadow: 0 2px 8px rgba(230, 63, 168, 0.25);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(230, 63, 168, 0.35);
}

/* ── Toggle ── */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--duration-normal) var(--ease-out);
}
.toggle-track::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-xs);
  transition: all var(--duration-normal) var(--ease-out);
}
.toggle-switch input:checked + .toggle-track {
  background: linear-gradient(135deg, var(--pink), var(--pink-soft));
}
.toggle-switch input:checked + .toggle-track::after {
  left: calc(100% - 25px);
}

/* ============================================
   PROGRESS & STREAKS
   ============================================ */
.progress-bar-wrap {
  height: 6px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--pink), var(--pink-soft));
  transition: width 1s var(--ease-out);
}
.progress-bar-fill.teal {
  background: linear-gradient(90deg, var(--teal), var(--teal-soft));
}
.progress-bar-fill.gold {
  background: linear-gradient(90deg, var(--gold), #E8C880);
}

/* ── Week Dots ── */
.week-dots {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}
.week-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--duration-normal) var(--ease-out);
}
.week-dot.done {
  background: linear-gradient(135deg, var(--pink), var(--teal));
}
.week-dot.today {
  background: var(--pink);
  box-shadow: 0 0 0 3px rgba(230, 63, 168, 0.20);
}

/* ── Streak Ring ── */
.streak-ring {
  position: relative;
  width: 64px;
  height: 64px;
}
.streak-ring svg {
  transform: rotate(-90deg);
  width: 64px;
  height: 64px;
}
.streak-ring-track {
  fill: none;
  stroke: var(--border-light);
  stroke-width: 5;
}
.streak-ring-fill {
  fill: none;
  stroke: url(#streakGrad);
  stroke-width: 5;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s var(--ease-out);
}
.streak-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.streak-number {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  color: var(--pink);
  line-height: 1;
}
.streak-unit {
  font-size: 0.5rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ============================================
   WELCOME / ONBOARDING SCREEN
   ============================================ */
#screen-welcome {
  background: linear-gradient(160deg, #FBF7F2 0%, #F2E4D2 40%, #EAF7F7 100%);
  min-height: 100vh;
}

.welcome-deco {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.welcome-deco-1 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(230, 63, 168, 0.12) 0%, transparent 70%);
  top: -80px;
  right: -80px;
}
.welcome-deco-2 {
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(39, 183, 179, 0.10) 0%, transparent 70%);
  bottom: 80px;
  left: -60px;
}
.welcome-deco-3 {
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(201, 164, 74, 0.10) 0%, transparent 70%);
  top: 200px;
  left: 20px;
}

.welcome-slides {
  height: 100vh;
  overflow: hidden;
  position: relative;
width:100% !important;
}
.welcome-slide {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--sp-10) var(--sp-8);
  text-align: center;
  opacity: 0;
  transform: translateX(30px);
  transition: all var(--duration-slow) var(--ease-out);
  pointer-events: none;
  word-break: normal;
  white-space: normal;
}

.welcome-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
.welcome-slide.prev {
  opacity: 0;
  transform: translateX(-30px);
}

.welcome-petal-group {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 0 auto var(--sp-8);
}
.welcome-petal-group svg {
  width: 140px;
  height: 140px;
  animation: floatGently 4s ease-in-out infinite;
}
@keyframes floatGently {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-8px) rotate(3deg); }
}

.welcome-emoji-icon {
  font-size: 4rem;
  margin: 0 auto var(--sp-8);
  animation: floatGently 4s ease-in-out infinite;
  display: block;
}

.welcome-tag {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--pink);
  letter-spacing: 0.15em;
  text-transform: lowercase;
  margin-bottom: var(--sp-4);
}
.welcome-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: var(--sp-5);
  letter-spacing: 0.02em;
}
.welcome-desc{
 font-size:0.9375rem;
 color:var(--text-secondary);
 line-height:1.9;
 width:100vw !important;
 max-width:100% !important;
 display: block !important;
}
.welcome-dots {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  margin: var(--sp-8) 0;
}
.welcome-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--duration-normal) var(--ease-out);
}
.welcome-dot.active {
  width: 20px;
  border-radius: var(--radius-full);
  background: var(--pink);
}

.welcome-actions {
  padding: 0 var(--sp-8) var(--sp-10);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

/* ── Onboarding Name Input ── */
.welcome-name-slide {
  padding: var(--sp-10) var(--sp-8);
}
.welcome-name-label {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-6);
  text-align: center;
}

/* ============================================
   HOME SCREEN
   ============================================ */
#screen-home .app-content {
  padding-top: var(--sp-4);
}

/* ── Daily Greeting Banner ── */
.home-greeting {
  padding: var(--sp-5) var(--sp-5) 0;
  margin-bottom: var(--sp-5);
}
.home-greeting-date {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.10em;
  margin-bottom: var(--sp-2);
}
.home-greeting-name {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.home-greeting-msg {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.8;
}
.home-greeting-time-msg {
  font-size: 0.875rem;
  font-style: italic;
  color: #6C4A67;
  line-height: 1.8;
  margin-bottom: var(--sp-2);
}

/* ── Seasonal Quote Card ── */
.season-quote-card {
  margin: 0 var(--sp-5) var(--sp-5);
  padding: var(--sp-5);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #F8F1F8 0%, #EAF7F7 100%);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}
.season-quote-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, rgba(230, 63, 168, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.season-quote-label {
  font-family: var(--font-accent);
  font-size: 0.6875rem;
  color: var(--pink);
  letter-spacing: 0.12em;
  margin-bottom: var(--sp-2);
}
.season-quote-text {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.85;
}
.season-quote-sub {
  margin-top: var(--sp-2);
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Streak & Stats Row ── */
.home-stats-row {
  padding: 0 var(--sp-5);
  margin-bottom: var(--sp-5);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--sp-3);
}
.home-stat-card {
  background: var(--app-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: var(--sp-4) var(--sp-3);
  text-align: center;
  box-shadow: var(--shadow-xs);
}
.home-stat-number {
  font-family: var(--font-accent);
  font-size: 1.625rem;
  color: var(--pink);
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.home-stat-number.teal {
  color: var(--teal);
}
.home-stat-number.gold {
  color: var(--gold);
}
.home-stat-label {
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* ── Week Calendar ── */
.home-week-section {
  padding: 0 var(--sp-5);
  margin-bottom: var(--sp-5);
}
.home-week-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-accent);
  letter-spacing: 0.10em;
  margin-bottom: var(--sp-3);
}
.week-calendar {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-1);
}
.week-day {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-1);
}
.week-day-label {
  font-size: 0.625rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.week-day-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--app-bg-sub);
  border: 1.5px solid transparent;
  transition: all var(--duration-normal) var(--ease-out);
}
.week-day.recorded .week-day-circle {
  background: linear-gradient(135deg, var(--pink-light), var(--teal-light));
  color: var(--plum);
  border-color: var(--border-pink);
}
.week-day.today .week-day-circle {
  background: linear-gradient(135deg, var(--pink), var(--teal));
  color: white;
  box-shadow: 0 4px 12px rgba(230, 63, 168, 0.30);
}
.week-day-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: transparent;
}
.week-day.recorded .week-day-dot {
  background: var(--pink);
}

/* ── Today's Log Summary ── */
.home-today-section {
  padding: 0 var(--sp-5);
  margin-bottom: var(--sp-5);
}
.home-today-card {
  background: var(--app-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.home-today-header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.home-today-header-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.home-today-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.625rem;
  font-family: var(--font-accent);
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.today-icon-chakra   { background: var(--pink-light);  color: #C02E8E; }
.today-icon-food     { background: var(--teal-light);  color: var(--teal-dark); }
.today-icon-fasting  { background: var(--gold-light);  color: #8C6B00; }
.today-icon-emotion  { background: var(--plum-pale);   color: var(--plum); }

.home-today-item-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}
.home-today-item-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}
.home-today-log-rows {
  display: flex;
  flex-direction: column;
}
.home-today-log-row {
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--duration-fast);
}
.home-today-log-row:last-child {
  border-bottom: none;
}
.home-today-log-row:hover {
  background: var(--app-bg);
}

/* ── Accumulation Milestone ── */
.milestone-banner {
  margin: 0 var(--sp-5) var(--sp-5);
  padding: var(--sp-5) var(--sp-5);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #FFF8E7 0%, #FFF0F8 50%, #EAFAFA 100%);
  border: 1px solid rgba(201, 164, 74, 0.25);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  box-shadow: var(--shadow-xs);
}
.milestone-icon {
  font-size: 2rem;
  flex-shrink: 0;
  animation: sparkle 2s ease-in-out infinite;
  font-family: var(--font-accent);
  color: var(--gold);
  min-width: 44px;
  text-align: center;
  line-height: 1;
}
@keyframes sparkle {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%       { transform: scale(1.15) rotate(8deg); }
}
.milestone-text-label {
  font-family: var(--font-accent);
  font-size: 0.6875rem;
  color: var(--gold);
  letter-spacing: 0.10em;
  margin-bottom: var(--sp-1);
}
.milestone-text-main {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.5;
}
.milestone-text-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--sp-1);
}

/* ── Quick Record Button ── */
.home-quick-record {
  padding: 0 var(--sp-5);
  margin-bottom: var(--sp-5);
}

/* ============================================
   RECORD SCREEN
   ============================================ */
.record-header-section {
  background: linear-gradient(160deg, var(--pink-pale) 0%, var(--app-bg) 100%);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  border-bottom: 1px solid var(--border-light);
}
.record-header-date {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--pink);
  letter-spacing: 0.12em;
  margin-bottom: var(--sp-2);
}
.record-header-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-primary);
}
.record-header-subtitle {
  margin-top: var(--sp-2);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Record Tabs ── */
.record-tabs {
  display: flex;
  gap: 0;
  background: var(--app-bg-sub);
  padding: var(--sp-1);
  border-radius: var(--radius-md);
  margin: var(--sp-5) var(--sp-5) 0;
}
.record-tab {
  flex: 1;
  padding: var(--sp-2) var(--sp-2);
  font-size: 0.75rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  text-align: center;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}
.record-tab.active {
  background: var(--app-bg-card);
  color: var(--pink);
  box-shadow: var(--shadow-xs);
}

/* ── Record Tab Panels ── */
.record-panel {
  display: none;
  padding: var(--sp-5);
  position: relative; /* ロックオーバーレイの基準点 */
}
.record-panel.active {
  display: block;
  animation: screenFadeIn var(--duration-normal) var(--ease-out) both;
}

/* ── Chakra Panel ── */
.chakra-section-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.chakra-section-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-5);
  line-height: 1.7;
}

.chakra-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.chakra-item {
  background: var(--app-bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--sp-4) var(--sp-3);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
}
.chakra-item:hover {
  border-color: var(--border-pink);
  background: var(--pink-pale);
}
.chakra-item.selected {
  border-color: var(--pink);
  background: var(--pink-pale);
  box-shadow: 0 0 0 3px rgba(230, 63, 168, 0.10);
}
.chakra-item-color {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin: 0 auto var(--sp-2);
}
.chakra-item-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}
.chakra-item-area {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* ── Intensity Meter ── */
.intensity-row {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
}
.intensity-btn {
  flex: 1;
  padding: var(--sp-3);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: none;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all var(--duration-fast) var(--ease-out);
}
.intensity-btn:hover,
.intensity-btn.selected {
  border-color: var(--pink);
  background: var(--pink-pale);
  color: var(--pink);
  font-weight: 500;
}

/* ── Food Panel ── */
.food-time-row {
  display: flex;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.food-time-card {
  flex: 1;
  background: var(--app-bg-card);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--sp-5) var(--sp-3);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}
.food-time-card.selected {
  border-color: var(--teal);
  background: var(--teal-pale);
}
.food-time-card.selected .food-time-label {
  color: var(--teal-dark);
  font-weight: 500;
}
.food-time-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-serif);
}

.body-feel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.body-feel-chip {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  background: var(--app-bg-sub);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.body-feel-chip:hover { background: var(--teal-pale); border-color: var(--teal); color: var(--teal-dark); }
.body-feel-chip.selected { background: var(--teal-pale); border-color: var(--teal); color: var(--teal-dark); font-weight: 500; }

/* ── Fasting Panel ── */
.fasting-timer {
  text-align: center;
  padding: var(--sp-8) 0 var(--sp-6);
}
.fasting-ring-wrap {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto var(--sp-6);
}
.fasting-ring-wrap svg {
  transform: rotate(-90deg);
  width: 160px;
  height: 160px;
}
.fasting-ring-track {
  fill: none;
  stroke: var(--border-light);
  stroke-width: 10;
}
.fasting-ring-fill {
  fill: none;
  stroke: url(#fastingGrad);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s var(--ease-out);
}
.fasting-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.fasting-time-display {
  font-family: var(--font-accent);
  font-size: 2rem;
  color: var(--text-primary);
  line-height: 1;
}
.fasting-time-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  margin-top: var(--sp-1);
}
.fasting-status {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-5);
}

.fasting-goal-select {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  margin-bottom: var(--sp-6);
}
.fasting-goal-btn {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}
.fasting-goal-btn:hover,
.fasting-goal-btn.selected {
  background: var(--gold-light);
  border-color: var(--gold);
  color: #8A6800;
}

/* ── Emotion Panel ── */
.emotion-selector {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
}
.emotion-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  cursor: pointer;
  padding: var(--sp-4) var(--sp-2);
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  background: var(--app-bg-sub);
  transition: all var(--duration-normal) var(--ease-out);
  min-height: 64px;
}
.emotion-item:hover {
  background: var(--pink-pale);
  border-color: var(--border-pink);
}
.emotion-item.selected {
  background: var(--pink-pale);
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(230, 63, 168, 0.10);
}
.emotion-label {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
  font-family: var(--font-serif);
}
.emotion-item.selected .emotion-label {
  color: var(--pink);
  font-weight: 500;
}

/* ============================================
   INSIGHT SCREEN
   ============================================ */
.insight-hero {
  padding: var(--sp-6) var(--sp-5) var(--sp-4);
  background: linear-gradient(160deg, var(--pink-pale) 0%, var(--teal-pale) 100%);
  border-bottom: 1px solid var(--border-light);
}
.insight-hero-tag {
  font-family: var(--font-accent);
  font-size: 0.6875rem;
  color: var(--pink);
  letter-spacing: 0.12em;
  margin-bottom: var(--sp-2);
}
.insight-hero-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.insight-hero-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Insight Period Tabs ── */
.insight-period-tabs {
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-light);
  background: var(--app-bg-card);
}
.insight-period-tab {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}
.insight-period-tab.active {
  background: var(--pink-light);
  border-color: var(--pink);
  color: var(--pink);
}

/* ── Chart Area ── */
.insight-chart-section {
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
}
.insight-chart-title {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--sp-4);
}
.insight-chart-wrap {
  background: var(--app-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-xs);
  padding: var(--sp-4);
}

/* ── Insight Summary Cards ── */
.insight-summary-grid {
  padding: 0 var(--sp-5);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.insight-summary-card {
  background: var(--app-bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: var(--sp-4);
  box-shadow: var(--shadow-xs);
}
.insight-summary-icon {
  font-size: 1.25rem;
  margin-bottom: var(--sp-2);
  display: none; /* アイコンレスデザイン */
}
.insight-summary-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}
.insight-summary-value {
  font-family: var(--font-accent);
  font-size: 1.375rem;
  color: var(--text-primary);
  line-height: 1;
}
.insight-summary-trend {
  font-size: 0.6875rem;
  color: var(--teal);
  margin-top: var(--sp-1);
}

/* ── AI Message / Season Message ── */
.insight-ai-message {
  margin: 0 var(--sp-5) var(--sp-5);
  padding: var(--sp-5);
  background: linear-gradient(135deg, #FFF8F5 0%, #F5F8FF 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--pink);
}
.insight-ai-tag {
  font-family: var(--font-accent);
  font-size: 0.6875rem;
  color: var(--pink);
  letter-spacing: 0.12em;
  margin-bottom: var(--sp-3);
}
.insight-ai-text {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.9;
}
.insight-ai-sub {
  margin-top: var(--sp-3);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ── Pattern Cards ── */
.insight-patterns-section {
  padding: 0 var(--sp-5);
  margin-bottom: var(--sp-5);
}
.insight-pattern-card {
  background: var(--app-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  padding: var(--sp-5);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-xs);
}
.insight-pattern-head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  padding-left: var(--sp-1);
  border-left: 3px solid var(--pink);
}
.insight-pattern-title {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  color: var(--text-primary);
}
.insight-pattern-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ============================================
   SETTINGS SCREEN
   ============================================ */
.settings-profile-section {
  background: linear-gradient(160deg, var(--pink-pale) 0%, var(--app-bg) 100%);
  padding: var(--sp-8) var(--sp-5) var(--sp-6);
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}
.settings-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink-light), var(--teal-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto var(--sp-4);
  border: 2px solid white;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}
.settings-avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}
.settings-name {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}
.settings-since {
  font-family: var(--font-accent);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.settings-section {
  padding: var(--sp-5);
}
.settings-section-title {
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.10em;
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
  margin-bottom: var(--sp-3);
}
.settings-list {
  background: var(--app-bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--duration-fast);
  cursor: pointer;
}
.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: var(--app-bg); }
.settings-row-left {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.settings-row-icon {
  font-size: 1.125rem;
  width: 24px;
  text-align: center;
}
.settings-row-label {
  font-size: 0.9375rem;
  color: var(--text-primary);
}
.settings-row-value {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.settings-row-arrow {
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.px-5  { padding-left: var(--sp-5); padding-right: var(--sp-5); }
.py-5  { padding-top: var(--sp-5); padding-bottom: var(--sp-5); }
.mt-4  { margin-top: var(--sp-4); }
.mt-5  { margin-top: var(--sp-5); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-5  { margin-bottom: var(--sp-5); }
.mb-6  { margin-bottom: var(--sp-6); }
.text-center { text-align: center; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.w-full { width: 100%; }

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: var(--sp-5) 0;
}

/* ── Toast notification ── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-height) + var(--sp-4));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(61, 46, 58, 0.92);
  color: white;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  backdrop-filter: blur(10px);
  opacity: 0 !important;
  display: none;
  transition: all var(--duration-normal) var(--ease-out);
  z-index: 200;
  max-width: calc(var(--app-max-width) - var(--sp-10));
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show {
  display: block;
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0);
}

/* ── Loading Spinner ── */
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: var(--sp-8) auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}
.badge-pink { background: var(--pink-light); color: var(--pink); }
.badge-teal { background: var(--teal-light); color: var(--teal-dark); }
.badge-gold { background: var(--gold-light); color: #8A6800; }

/* ── Section spacer ── */
.section-gap {
  height: var(--sp-5);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.anim-fade-in-up { animation: fadeInUp 0.5s var(--ease-out) both; }
.anim-delay-1    { animation-delay: 0.1s; }
.anim-delay-2    { animation-delay: 0.2s; }
.anim-delay-3    { animation-delay: 0.3s; }
.anim-delay-4    { animation-delay: 0.4s; }

/* ============================================
   FASTING LIVE TIMER — 断食タイマー
   ============================================ */
.fasting-live-section {
  margin: var(--sp-4) var(--sp-5) 0;
  padding: 24px;
  background: #f7f5f0;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}
.fasting-live-presets {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.fasting-live-preset-btn {
  flex: 1;
  padding: 9px 0;
  background: var(--bg);
  border: 1.5px solid var(--border-light);
  border-radius: 20px;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.fasting-live-preset-btn.selected,
.fasting-live-preset-btn:hover {
  border-color: #7DB8B4;
  color: #3a7d7a;
  background: rgba(125,184,180,0.12);
}
.fasting-live-ring-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto var(--sp-4);
}
.fasting-live-track {
  fill: none;
  stroke: #e8e4de;
  stroke-width: 10;
}
.fasting-live-fill {
  fill: none;
  stroke: #7DB8B4;
  stroke-width: 10;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 100px 100px;
  transition: stroke-dashoffset 1s linear;
}
.fasting-live-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.fasting-live-time {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}
.fasting-live-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0 16px;
  line-height: 1.5;
}
.fasting-live-msg {
  text-align: center;
  font-size: 0.8125rem;
  color: #6C4A67;
  font-style: italic;
  line-height: 1.75;
  min-height: 1.5em;
  margin-bottom: var(--sp-4);
}
.fasting-live-btns {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.fasting-live-start-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #7DB8B4, #5a9e9a);
  color: white;
  border: none;
  border-radius: 25px;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(125,184,180,0.28);
}
.fasting-live-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(125,184,180,0.36);
}
.fasting-live-stop-btn {
  width: 100%;
  padding: 13px;
  background: none;
  border: 1.5px solid #bbb;
  border-radius: 25px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}
.fasting-live-stop-btn:hover {
  border-color: #E63FA8;
  color: #E63FA8;
}

/* ============================================
   CONDITION MEMO — 体調メモセクション
   ============================================ */
.condition-memo-section {
  margin: var(--sp-5) var(--sp-5) 0;
  padding: 24px;
  background: #f7f5f0;
  border-radius: 8px;
  border: 1px solid var(--border-light);
}
.condition-memo-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-2);
}
.condition-memo-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--sp-5);
}

/* 5段階ボタン */
.condition-scale-row {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.condition-scale-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  background: var(--bg);
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  line-height: 1.3;
  text-align: center;
}
.condition-scale-btn:hover {
  border-color: #7DB8B4;
  background: rgba(125,184,180,0.07);
}
.condition-scale-btn.selected {
  border-color: #7DB8B4;
  background: rgba(125,184,180,0.15);
  color: #3a7d7a;
  font-weight: 500;
}
.condition-scale-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.condition-scale-num {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: inherit;
  display: block;
  line-height: 1;
}

/* テキストエリア */
.condition-memo-section .form-textarea {
  width: 100%;
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg);
  resize: none;
  line-height: 1.7;
  transition: border-color 0.2s;
  margin-bottom: var(--sp-4);
}
.condition-memo-section .form-textarea:focus {
  outline: none;
  border-color: #7DB8B4;
}
.condition-save-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #7DB8B4, #5a9e9a);
  color: white;
  border: none;
  border-radius: 25px;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(125,184,180,0.28);
}
.condition-save-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(125,184,180,0.36);
}

/* ============================================
   GRAPH LOCK OVERLAY — グラフロック
   ============================================ */
.chart-lock-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
}
.chart-blur-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  z-index: 10;
}
.chart-lock-text {
  font-size: 0.875rem;
  color: #2d3a2e;
  font-family: var(--font-serif);
}
.chart-unlock-btn {
  padding: 10px 22px;
  background: #8b7d5e;
  color: #fff;
  border: none;
  border-radius: 25px;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
  text-decoration: none;
  display: inline-block;
}
.chart-unlock-btn:hover {
  background: #6f6349;
  transform: translateY(-1px);
}

/* ============================================
   REPORT LOCK CARDS — レポートカード
   ============================================ */
.report-lock-card {
  margin: var(--sp-4) var(--sp-5) 0;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}
.report-lock-inner {
  padding: var(--sp-5);
  background: linear-gradient(135deg, #FAF8F5, #EDF5F5);
  filter: blur(3px);
  user-select: none;
}
.report-lock-en {
  font-family: var(--font-accent);
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.report-lock-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.report-lock-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.report-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* ============================================
   PREMIUM MODAL — Premiumモーダル
   ============================================ */
.premium-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.52);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.premium-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.premium-modal-card {
  background: #fff;
  border-radius: 12px;
  max-width: 360px;
  width: 100%;
  padding: 32px 28px 28px;
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 12px 40px rgba(0,0,0,0.18);
}
.premium-modal-overlay.open .premium-modal-card {
  transform: translateY(0);
}
.premium-modal-logo {
  height: 48px;
  width: auto;
  margin: 0 auto var(--sp-4);
  display: block;
}
.premium-modal-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: #2d3a2e;
  margin-bottom: var(--sp-3);
  line-height: 1.5;
}
.premium-modal-desc {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.85;
  margin-bottom: var(--sp-5);
}
.premium-modal-line-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: #8b7d5e;
  color: #fff;
  border-radius: 25px;
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-3);
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}
.premium-modal-line-btn:hover {
  background: #6f6349;
  transform: translateY(-2px);
}
.premium-modal-close {
  font-size: 0.875rem;
  color: #888;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  padding: 4px 8px;
}

/* ============================================
   FEEDBACK MODAL
   ============================================ */

/* ── オーバーレイ ── */
.feedback-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 46, 58, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}
.feedback-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── モーダル本体（下から出る） ── */
.feedback-modal {
  width: 100%;
  max-width: var(--app-max-width);
  background: var(--app-bg-card);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--sp-6) var(--sp-5) var(--sp-10);
  transform: translateY(100%);
  transition: transform var(--duration-slow) var(--ease-out);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.feedback-overlay.open .feedback-modal {
  transform: translateY(0);
}

/* ── ドラッグバー ── */
.feedback-drag-bar {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin: 0 auto var(--sp-5);
}

/* ── ヘッダー ── */
.feedback-header {
  text-align: center;
  margin-bottom: var(--sp-6);
}
.feedback-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: var(--sp-3);
  animation: floatFeedback 3s ease-in-out infinite;
}
@keyframes floatFeedback {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}
.feedback-trigger-label {
  font-family: var(--font-accent);
  font-size: 0.6875rem;
  color: var(--pink);
  letter-spacing: 0.12em;
  margin-bottom: var(--sp-2);
}
.feedback-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: var(--sp-2);
}
.feedback-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── 質問ステップ ── */
.feedback-step {
  display: none;
  animation: screenFadeIn var(--duration-normal) var(--ease-out) both;
}
.feedback-step.active {
  display: block;
}

/* ── 質問文 ── */
.feedback-question {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-4);
  line-height: 1.7;
}

/* ── 選択肢（評価ボタン） ── */
.feedback-rating-row {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  margin-bottom: var(--sp-5);
}
.feedback-rating-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--app-bg-sub);
  font-size: 1.375rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) var(--ease-out);
  flex-direction: column;
  gap: 2px;
}
.feedback-rating-btn:hover,
.feedback-rating-btn.selected {
  border-color: var(--pink);
  background: var(--pink-pale);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(230, 63, 168, 0.20);
}
.feedback-rating-label {
  font-size: 0.5rem;
  color: var(--text-muted);
  letter-spacing: 0;
}

/* ── 選択肢（チップ） ── */
.feedback-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}
.feedback-chip {
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  background: var(--app-bg-sub);
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  font-family: var(--font-sans);
}
.feedback-chip:hover,
.feedback-chip.selected {
  background: var(--pink-light);
  border-color: var(--pink);
  color: var(--pink);
  font-weight: 500;
}

/* ── テキストエリア ── */
.feedback-textarea {
  width: 100%;
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--app-bg);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text-primary);
  resize: none;
  line-height: 1.7;
  min-height: 100px;
  outline: none;
  transition: all var(--duration-fast) var(--ease-out);
  margin-bottom: var(--sp-4);
}
.feedback-textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(230, 63, 168, 0.10);
  background: white;
}
.feedback-textarea::placeholder {
  color: var(--text-muted);
}

/* ── プログレスバー ── */
.feedback-progress {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
  margin-bottom: var(--sp-5);
}
.feedback-progress-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--duration-normal) var(--ease-out);
}
.feedback-progress-dot.done {
  background: var(--pink);
}
.feedback-progress-dot.active {
  width: 20px;
  border-radius: var(--radius-full);
  background: var(--pink);
}

/* ── アクション ── */
.feedback-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* ── 送信完了 ── */
.feedback-complete {
  text-align: center;
  padding: var(--sp-8) 0;
  display: none;
}
.feedback-complete.show {
  display: block;
  animation: screenFadeIn var(--duration-slow) var(--ease-out) both;
}
.feedback-complete-emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--sp-4);
}
.feedback-complete-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-3);
}
.feedback-complete-msg {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ── 閉じるボタン ── */
.feedback-close-btn {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--app-bg-sub);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  transition: all var(--duration-fast) var(--ease-out);
}
.feedback-close-btn:hover {
  background: var(--pink-light);
  color: var(--pink);
}

/* ── 設定画面のフィードバックボタン ── */
.settings-feedback-btn {
  margin: var(--sp-5);
  padding: var(--sp-5);
  background: linear-gradient(135deg, var(--pink-pale), var(--teal-pale));
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
}
.settings-feedback-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.settings-feedback-emoji {
  font-size: 1.75rem;
  display: block;
  margin-bottom: var(--sp-2);
}
.settings-feedback-title {
  font-family: var(--font-serif);
  font-size: 0.9375rem;
  color: var(--text-primary);
  margin-bottom: var(--sp-1);
}
.settings-feedback-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   RESPONSIVE — DESKTOP CENTERING
   ============================================ */
@media (min-width: 768px) {
  body {
    background: #F0EAE8;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
  }
  #app-shell {
    margin-top: 0;
  }
}

/* ============================================
   DESIGN IMPROVEMENT v2
   全体デザイン改善
   ============================================ */

/* ── 【1】全体カードスタイル統一 ── */
.record-panel,
.condition-memo-section,
.insight-summary-card,
.report-lock-card,
.chakra-item,
.home-stat-card,
.season-quote-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e4de;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
}

.record-panel { margin-bottom: 24px; }

/* 見出し統一 */
.section-title,
.record-panel-title,
.home-section-label,
.insight-hero-title {
  font-weight: 600;
  color: #2d3a2e;
}

/* 本文統一 */
.form-label,
.record-panel p,
.home-greeting-msg {
  font-weight: 400;
  color: #555;
}

/* 補足テキスト統一 */
.form-hint,
.chakra-note,
.record-panel-sub {
  color: #999;
}

/* ── 【2】ホーム画面改善 ── */
.home-greeting {
  background: linear-gradient(135deg, #f7f5f0 0%, #eaf7f7 100%);
  border-radius: 12px;
  border: 1px solid #e8e4de;
  margin-bottom: 24px;
}

.home-stat-card .stat-value,
.home-stat-card .stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2d3a2e;
}

.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

/* 今日を記録するボタン */
.home-record-btn,
#homeRecordBtn {
  background: linear-gradient(135deg, #7DB8B4, #5a9e9a) !important;
  color: #fff !important;
  border-radius: 25px !important;
  padding: 14px !important;
  font-size: 1rem !important;
  box-shadow: 0 4px 12px rgba(125,184,180,0.3) !important;
  border: none !important;
  transition: all 0.2s ease !important;
}
.home-record-btn:hover,
#homeRecordBtn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 18px rgba(125,184,180,0.4) !important;
}

/* チャクラ診断バナー */
.chakra-test-banner,
.home-chakra-banner {
  border-left: 4px solid #C7879E;
  border-radius: 0 12px 12px 0;
  background: #fff;
  padding: 16px;
  margin-bottom: 24px;
}

/* ── 【3】記録画面改善 ── */

/* タブ */
.record-tab {
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 0.8125rem;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #888;
}
.record-tab.active {
  background: #7DB8B4;
  color: #fff;
}

/* チャクラ選択カード */
.chakra-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chakra-item:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* チップ（タグ）ボタン */
.chip,
.body-feel-chip,
.symptom-chip,
.fasting-feel-chip {
  border-radius: 20px !important;
  transition: all 0.2s ease !important;
  border: 1px solid #e8e4de !important;
  background: #f5f3ef !important;
  color: #666 !important;
  cursor: pointer;
}
.chip.selected,
.chip.active,
.body-feel-chip.selected,
.symptom-chip.selected,
.fasting-feel-chip.selected {
  background: #7DB8B4 !important;
  color: #fff !important;
  border-color: #7DB8B4 !important;
}

/* テキストエリア */
textarea,
.record-textarea {
  border-radius: 10px !important;
  border: 1.5px solid #e8e4de !important;
  transition: border-color 0.2s ease !important;
}
textarea:focus,
.record-textarea:focus {
  border-color: #7DB8B4 !important;
  outline: none !important;
}

/* スライダー */
input[type="range"] {
  accent-color: #7DB8B4;
}

/* 体調メモセクション */
.condition-memo-section {
  background: #f7f5f0 !important;
  border-radius: 16px !important;
  padding: 24px !important;
  border-top: 3px solid #7DB8B4 !important;
  margin-bottom: 24px;
}

/* ── 【4】断食タイマー改善 ── */

/* 円形プログレス */
.fasting-timer-svg circle.fasting-progress-track,
#fastingTrack {
  stroke: #e8e4de;
  stroke-width: 8;
}
.fasting-timer-svg circle.fasting-progress-bar,
#fastingProgress {
  stroke: #7DB8B4;
  stroke-width: 8;
}

/* タイマー中央時間 */
.fasting-timer-display,
#fastingTimerDisplay {
  font-size: 2rem !important;
  font-weight: 700 !important;
  color: #2d3a2e !important;
}

/* プリセットボタン */
.fasting-preset-btn {
  border-radius: 25px;
  transition: all 0.2s ease;
  border: 1.5px solid #e8e4de;
  background: #f5f3ef;
  color: #666;
  padding: 8px 20px;
  cursor: pointer;
}
.fasting-preset-btn.active,
.fasting-preset-btn.selected {
  background: #7DB8B4;
  color: #fff;
  border-color: #7DB8B4;
}

/* 開始/終了ボタン */
.fasting-start-btn,
.fasting-stop-btn,
#fastingStartBtn,
#fastingStopBtn {
  border-radius: 25px !important;
  padding: 14px 32px !important;
  transition: all 0.2s ease !important;
}
.fasting-start-btn,
#fastingStartBtn {
  background: linear-gradient(135deg, #7DB8B4, #5a9e9a) !important;
  color: #fff !important;
  border: none !important;
}

/* ── 【5】インサイト画面改善 ── */

.insight-hero {
  background: linear-gradient(135deg, #2d3a2e, #3d4e3e) !important;
  color: #fff !important;
  border-radius: 16px !important;
  padding: 32px !important;
  margin-bottom: 24px;
}
.insight-hero-tag,
.insight-hero-title,
.insight-hero-desc {
  color: #fff !important;
}

.insight-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.insight-summary-card .stat-value,
.insight-summary-card .summary-value {
  font-size: 1.75rem !important;
  color: #7DB8B4 !important;
  font-weight: 700;
}

.insight-chart-wrap {
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e8e4de;
}

/* ロックオーバーレイ強化 */
.chart-lock-overlay,
.chart-blur-overlay {
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  background: rgba(255,255,255,0.85) !important;
}

/* ── 【6】ナビゲーションバー改善 ── */

.app-nav {
  background: #fff !important;
  border-top: 1px solid #e8e4de !important;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04) !important;
}

.nav-item.active {
  color: #7DB8B4 !important;
}
.nav-item.active::before {
  background: #7DB8B4 !important;
}

.nav-record-ring {
  background: linear-gradient(135deg, #7DB8B4, #5a9e9a) !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 50% !important;
  transform: translateY(-12px) !important;
  box-shadow: 0 4px 16px rgba(125,184,180,0.4) !important;
}

/* ── 【7】設定画面改善 ── */

.settings-profile-section {
  text-align: center;
}

.settings-avatar {
  border: 3px solid #e8e4de !important;
}

.settings-row {
  padding: 16px !important;
  border-bottom: 1px solid #f0ede8 !important;
}

/* トグルスイッチ */
input[type="checkbox"].toggle,
.reminder-toggle:checked {
  accent-color: #7DB8B4;
}

/* ── 【8】モーダル改善 ── */

.premium-modal-overlay,
.feedback-overlay {
  background: rgba(0,0,0,0.4) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

.premium-modal-card,
.feedback-modal {
  border-radius: 16px !important;
  padding: 32px !important;
  max-width: 340px !important;
}

.premium-modal-line-btn {
  background: #06C755 !important;
  border-radius: 25px !important;
}
.premium-modal-line-btn:hover {
  background: #05b34c !important;
}

/* ── 【9】オンボーディング改善 ── */

.welcome-slide {
  text-align: center;
  padding: 40px 24px;
}

.welcome-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #ddd;
  transition: all 0.3s ease;
}
.welcome-dot.active {
  background: #7DB8B4;
  width: 24px;
}

.welcome-next-btn,
#welcomeNextBtn,
.onboarding-btn {
  background: linear-gradient(135deg, #7DB8B4, #5a9e9a) !important;
  border-radius: 25px !important;
  font-size: 1rem !important;
  color: #fff !important;
  border: none !important;
  padding: 14px 32px !important;
  transition: all 0.2s ease !important;
}

/* ── 【10】アニメーション改善 ── */

/* カードホバー */
.record-panel:hover,
.insight-summary-card:hover,
.home-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* タブ切り替えフェード */
.app-screen {
  animation: screenFadeIn 0.3s ease both;
}
@keyframes screenFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ボタンタップ */
button:active,
.btn:active {
  transform: scale(0.97) !important;
  transition: transform 0.1s ease !important;
}

/* トースト通知 */
#toast {
  animation: toastSlideUp 0.3s ease both;
}
@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(16px) translateX(-50%); }
  to   { opacity: 1; transform: translateY(0) translateX(-50%); }
}

/* 記録保存チェックマーク */
@keyframes checkAppear {
  0%   { opacity: 0; transform: scale(0.5); }
  60%  { transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}
.save-check {
  animation: checkAppear 0.5s ease both;
}

/* ============================================
   登録モーダル & ロックオーバーレイ
   ============================================ */

/* ── 登録モーダル オーバーレイ ── */
.reg-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.reg-modal-overlay.open {
  display: flex;
}

/* ── 登録モーダル カード ── */
.reg-modal-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 28px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
  animation: regModalIn 0.35s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes regModalIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── ロゴ ── */
.reg-modal-logo {
  height: 44px;
  width: auto;
  margin: 0 auto 12px;
  display: block;
}

/* ── タグ・タイトル・説明 ── */
.reg-modal-tag {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7DB8B4;
  margin: 0 0 8px;
  font-family: var(--font-sans, sans-serif);
}
.reg-modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #2d3a2e;
  line-height: 1.5;
  margin: 0 0 12px;
  font-family: var(--font-serif, serif);
}
.reg-modal-desc {
  font-size: 0.8125rem;
  color: #666;
  line-height: 1.75;
  margin: 0 0 24px;
}

/* ── LINEボタン ── */
.reg-modal-line-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: #06C755;
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 14px 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 10px;
  transition: background 0.2s ease, transform 0.1s ease;
}
.reg-modal-line-btn:hover {
  background: #05b34c;
}
.reg-modal-line-btn:active {
  transform: scale(0.97);
}

/* ── メール登録ボタン ── */
.reg-modal-email-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: linear-gradient(135deg, #7DB8B4, #5a9e9a);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 14px 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 16px;
  transition: opacity 0.2s ease, transform 0.1s ease;
}
.reg-modal-email-btn:hover {
  opacity: 0.9;
}
.reg-modal-email-btn:active {
  transform: scale(0.97);
}

/* ── お試しテキスト & あとでリンク ── */
.reg-modal-trial-text {
  font-size: 0.75rem;
  color: #999;
  margin: 0 0 8px;
  line-height: 1.6;
}
.reg-modal-later {
  background: none;
  border: none;
  color: #aaa;
  font-size: 0.8125rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 8px;
  transition: color 0.2s ease;
}
.reg-modal-later:hover {
  color: #666;
}

/* ── セクションロックオーバーレイ ── */
.reg-lock-overlay {
  position: absolute;
  inset: -8px; /* パディング分を含めて完全に覆う */
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  min-height: 160px; /* パネルが小さくてもオーバーレイが見える */
}

.reg-lock-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.reg-lock-text {
  font-size: 0.875rem;
  color: #2d3a2e;
  line-height: 1.6;
  font-weight: 500;
  margin: 0;
}

.reg-lock-btn {
  background: linear-gradient(135deg, #7DB8B4, #5a9e9a);
  color: #fff;
  border: none;
  border-radius: 25px;
  padding: 12px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(125, 184, 180, 0.3);
  transition: opacity 0.2s ease, transform 0.1s ease;
}
.reg-lock-btn:hover {
  opacity: 0.9;
}
.reg-lock-btn:active {
  transform: scale(0.97);
}

/* ============================================
   PC対応レイアウト
   ============================================ */

.app-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: #fff;
  box-shadow: 0 0 30px rgba(0,0,0,0.08);
}

@media (min-width: 768px) {
  body {
    background: #f0ede8;
  }
  .app-shell {
    border-left: 1px solid #e8e4de;
    border-right: 1px solid #e8e4de;
  }
}
.welcome-slides, 
.welcome-slide, 
.welcome-desc {
  width: 100% !important;
  max-width: 1000px !important; /* PCでの理想的な幅 */
}
.welcome-slides, 
.welcome-slide, 
.welcome-desc {
  width: 100vw !important;        /* 画面の横幅いっぱいに強制 */
  max-width: 100% !important;     /* 制限を解除 */
  min-width: 100% !important;     /* 24pxなどの極小化を防止 */
  left: 0 !important;             /* 左端に固定 */
  transform: none !important;     /* JSによる画面外への追い出しを無効化 */
  display: flex !important;       /* レイアウト構造を維持 */
  align-items: center !important;  /* 中央寄せ */
  justify-content: center !important;
}
.welcome-desc {
  padding: 0 10% !important;      /* 左右に適度な余白を作る */
  white-space: normal !important; /* 折り返しを正常にする */
  word-break: normal !important;
}
#welcomeNextBtn {
  width: 90% !important;
  max-width: 350px !important;    /* ボタンが横に伸びすぎないように制限 */
  margin: 20px auto !important;
  display: block !important;
  position: relative !important;
  pointer-events: auto !important; /* クリック可能にする */
}


/* ════════════════════════════════════════════
   F1-4: MILESTONE DISPLAY ENHANCEMENT
   ════════════════════════════════════════════ */
.milestone-banner.show {
  animation: milestoneReveal 0.8s var(--ease-out) both;
}

@keyframes milestoneReveal {
  0% { opacity: 0; transform: translateY(20px) scale(0.95); }
  60% { transform: translateY(-4px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* ════════════════════════════════════════════
   D-5: RECORD SCREEN SPACING & BREATHING
   ════════════════════════════════════════════ */
.record-panel.active {
  display: block;
  padding: var(--sp-6) var(--sp-5) var(--sp-8);
  animation: screenFadeIn var(--duration-normal) var(--ease-out) both;
}

@keyframes screenFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.form-group {
  margin-bottom: var(--sp-8);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
}

.chakra-section-sub {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: var(--sp-8);
  line-height: 1.9;
}

.range-group {
  margin-bottom: var(--sp-8);
  padding: var(--sp-4) 0;
}

/* ════════════════════════════════════════════
   D-6: INSIGHT SCREEN VISUAL ENHANCEMENT
   ════════════════════════════════════════════ */
.insight-hero {
  padding: var(--sp-8) var(--sp-5) var(--sp-6);
  background: linear-gradient(160deg, rgba(250, 232, 244, 0.4) 0%, rgba(234, 247, 247, 0.4) 100%);
  border-bottom: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.insight-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 63, 168, 0.10) 0%, transparent 70%);
  pointer-events: none;
}

.insight-hero::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(39, 183, 179, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.insight-hero-main {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: var(--sp-3);
  position: relative;
  z-index: 1;
}

.insight-hero-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.unlock-card {
  border: 1px solid var(--border-light);
  background: var(--app-bg-card);
  transition: all var(--duration-normal) var(--ease-out);
}

.unlock-card.unlocked {
  border-color: rgba(230, 63, 168, 0.15);
  background: linear-gradient(135deg, rgba(250, 232, 244, 0.3) 0%, rgba(255, 255, 255, 0.8) 100%);
  box-shadow: 0 2px 12px rgba(230, 63, 168, 0.08);
}

.unlock-card.unlocked:hover {
  box-shadow: 0 4px 20px rgba(230, 63, 168, 0.12);
  transform: translateY(-2px);
}

/* ════════════════════════════════════════════
   D-7: HOME SCREEN WARMTH ENHANCEMENT
   ════════════════════════════════════════════ */
.season-quote-card {
  background: linear-gradient(135deg, #F8F1F0 0%, #F0EDE3 100%);
  border: 1px solid rgba(201, 164, 74, 0.15);
  position: relative;
  overflow: hidden;
}

.season-quote-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 164, 74, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.season-quote-card::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 164, 74, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.season-quote-label {
  font-family: var(--font-accent);
  font-size: 0.6875rem;
  color: var(--gold);
  letter-spacing: 0.10em;
  margin-bottom: var(--sp-2);
  position: relative;
  z-index: 1;
}

.season-quote-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text-primary);
  line-height: 2;
  margin-bottom: var(--sp-3);
  position: relative;
  z-index: 1;
}

.season-quote-sub {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

#sumiMessage {
  background: linear-gradient(135deg, rgba(250, 232, 244, 0.2) 0%, rgba(234, 247, 247, 0.2) 100%);
  border: 1px solid rgba(230, 63, 168, 0.1);
  position: relative;
  overflow: hidden;
  animation: sumiMessageSlideIn var(--duration-slow) var(--ease-out) both;
}

#sumiMessage::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 63, 168, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

@keyframes sumiMessageSlideIn {
  0% { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

#sumiMessageText {
  position: relative;
  z-index: 1;
}

/* ============================================
   LUMINOUS PATH — DARK THEME OVERRIDES
   ============================================ */

body {
  background-color: var(--midnight);
}

#app-shell {
  background: var(--midnight);
  box-shadow: none;
}

.app-screen {
  background: var(--midnight);
}

/* ── Navigation ── */
.app-nav {
  background: rgba(11,16,37,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
}

/* ── Header ── */
.app-header.scrolled {
  background: rgba(6,8,15,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
}

/* ── Cards glass effect ── */
.app-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
}
.app-card:hover {
  border-color: rgba(255,255,255,0.12);
}

/* ── Gradient Cards ── */
.card-pink {
  background: linear-gradient(135deg, rgba(176,127,255,0.10) 0%, rgba(176,127,255,0.04) 100%);
  border-color: var(--border-pink);
}
.card-teal {
  background: linear-gradient(135deg, rgba(90,240,208,0.10) 0%, rgba(90,240,208,0.04) 100%);
  border-color: var(--border-teal);
}
.card-plum {
  background: linear-gradient(135deg, rgba(176,127,255,0.08) 0%, rgba(176,127,255,0.03) 100%);
  border-color: var(--border-pink);
}
.card-gold {
  background: linear-gradient(135deg, rgba(255,217,122,0.10) 0%, rgba(255,217,122,0.04) 100%);
  border-color: rgba(255,217,122,0.20);
}

/* ── Buttons ── */
.btn-primary {
  background: linear-gradient(135deg, var(--crystal-violet) 0%, #6a3fff 100%);
  box-shadow: 0 4px 16px rgba(176,127,255,0.35);
}
.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(176,127,255,0.50);
}
.btn-teal {
  background: linear-gradient(135deg, var(--crystal-teal) 0%, #3dd4b0 100%);
  box-shadow: 0 4px 16px rgba(90,240,208,0.35);
}
.btn-outline {
  border-color: var(--glass-border);
  color: var(--text-secondary);
}
.btn-outline:hover {
  background: rgba(176,127,255,0.08);
  border-color: var(--border-pink);
  color: var(--crystal-violet);
}

/* ── Form elements ── */
.form-input,
.form-textarea,
.form-select {
  background: var(--glass);
  border-color: var(--glass-border);
  color: var(--text-primary);
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--crystal-violet);
  box-shadow: 0 0 0 3px rgba(176,127,255,0.15);
}

/* ── Chips ── */
.chip {
  background: var(--glass);
  border-color: var(--glass-border);
  color: var(--text-secondary);
}
.chip:hover {
  background: rgba(176,127,255,0.10);
  border-color: var(--border-pink);
  color: var(--crystal-violet);
}
.chip.selected {
  background: rgba(176,127,255,0.15);
  border-color: var(--crystal-violet);
  color: var(--crystal-violet);
}

/* ── Welcome screen ── */
#screen-welcome {
  background: linear-gradient(160deg, #06080f 0%, #0b1025 40%, #101835 100%);
}
.welcome-deco-1 {
  background: radial-gradient(circle, rgba(176,127,255,0.15) 0%, transparent 70%);
}
.welcome-deco-2 {
  background: radial-gradient(circle, rgba(90,240,208,0.12) 0%, transparent 70%);
}
.welcome-deco-3 {
  background: radial-gradient(circle, rgba(255,217,122,0.10) 0%, transparent 70%);
}

/* ── Home stat cards ── */
.home-stat-card {
  background: var(--glass);
  border-color: var(--glass-border);
}

/* ── Week calendar ── */
.week-day-circle {
  background: var(--glass);
  color: var(--text-muted);
}
.week-day.recorded .week-day-circle {
  background: linear-gradient(135deg, rgba(176,127,255,0.15), rgba(90,240,208,0.15));
  border-color: var(--border-pink);
  color: var(--crystal-violet);
}
.week-day.today .week-day-circle {
  background: linear-gradient(135deg, var(--crystal-violet), var(--crystal-teal));
  color: white;
  box-shadow: 0 4px 12px rgba(176,127,255,0.40);
}

/* ── Today card ── */
.home-today-card {
  background: var(--glass);
  border-color: var(--glass-border);
}
.today-icon-chakra   { background: rgba(176,127,255,0.12); color: var(--crystal-violet); }
.today-icon-food     { background: rgba(90,240,208,0.12);  color: var(--crystal-teal); }
.today-icon-fasting  { background: rgba(255,217,122,0.12); color: var(--crystal-gold); }
.today-icon-emotion  { background: rgba(255,110,176,0.12); color: var(--crystal-rose); }

.home-today-log-row:hover {
  background: rgba(255,255,255,0.03);
}

/* ── Season quote ── */
.season-quote-card {
  background: linear-gradient(135deg, rgba(176,127,255,0.06) 0%, rgba(90,240,208,0.06) 100%);
  border-color: var(--glass-border);
}
.season-quote-card::before {
  background: radial-gradient(circle, rgba(176,127,255,0.12) 0%, transparent 70%);
}

/* ── Milestone ── */
.milestone-banner {
  background: linear-gradient(135deg, rgba(255,217,122,0.08) 0%, rgba(176,127,255,0.08) 50%, rgba(90,240,208,0.08) 100%);
  border-color: rgba(255,217,122,0.20);
}

/* ── Record screen ── */
.record-header-section {
  background: linear-gradient(160deg, rgba(176,127,255,0.08) 0%, var(--midnight) 100%);
  border-bottom-color: var(--glass-border);
}
.record-tabs {
  background: rgba(255,255,255,0.03);
}
.record-tab.active {
  background: var(--glass);
  color: var(--crystal-violet);
  box-shadow: 0 0 12px rgba(176,127,255,0.15);
}

/* ── Chakra items ── */
.chakra-item {
  background: var(--glass);
  border-color: var(--glass-border);
}
.chakra-item:hover {
  border-color: var(--border-pink);
  background: rgba(176,127,255,0.06);
}
.chakra-item.selected {
  border-color: var(--crystal-violet);
  background: rgba(176,127,255,0.10);
  box-shadow: 0 0 0 3px rgba(176,127,255,0.15);
}

/* ── Range slider ── */
input[type="range"] {
  background: linear-gradient(to right, var(--crystal-violet) 0%, var(--crystal-violet) 50%, var(--glass-border) 50%);
}
input[type="range"]::-webkit-slider-thumb {
  background: var(--deep-navy);
  border-color: var(--crystal-violet);
  box-shadow: 0 0 8px rgba(176,127,255,0.40);
}

/* ── Nav record ring ── */
.nav-record-ring {
  background: linear-gradient(135deg, var(--crystal-violet), var(--crystal-teal));
  box-shadow: 0 4px 16px rgba(176,127,255,0.40);
}

/* ── Settings rows ── */
.settings-row {
  border-bottom-color: var(--glass-border);
}

/* ── Feedback overlay ── */
.feedback-overlay {
  background: rgba(6,8,15,0.75);
  backdrop-filter: blur(10px);
}
.feedback-modal {
  background: var(--deep-navy) !important;
  border: 1px solid var(--glass-border);
}

/* ── Toggle ── */
.toggle-track {
  background: var(--glass-border);
}
.toggle-track::after {
  background: var(--text-muted);
}
.toggle-switch input:checked + .toggle-track {
  background: linear-gradient(135deg, var(--crystal-violet), var(--crystal-teal));
}
.toggle-switch input:checked + .toggle-track::after {
  background: white;
}

/* ── Intensity buttons ── */
.intensity-btn:hover,
.intensity-btn.selected {
  border-color: var(--crystal-violet);
  background: rgba(176,127,255,0.10);
  color: var(--crystal-violet);
}

/* ── Logo accent ── */
.app-header-logo .logo-i {
  color: var(--crystal-violet);
}
/* ============================================
   PHASE 2 — CRYSTAL CALENDAR & MELT LIGHT
   ============================================ */

/* ── Section wrapper ── */
.lp-calendar-section {
  margin: 0 var(--sp-5) var(--sp-5);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  backdrop-filter: blur(12px);
}

.lp-section-header {
  margin-bottom: var(--sp-4);
}
.lp-section-title {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-crystal-icon {
  font-size: 1.2rem;
}
.lp-section-sub {
  font-size: 0.67rem;
  color: var(--text-muted);
  letter-spacing: 0.10em;
  margin-top: 3px;
}

/* ── Month nav ── */
.lp-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}
.lp-month-label {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  font-family: var(--font-accent);
}
.lp-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 10px;
  transition: color 0.2s;
  border-radius: var(--radius-sm);
}
.lp-nav-btn:hover {
  color: var(--crystal-violet);
  background: rgba(176,127,255,0.08);
}

/* ── Weekday headers ── */
.lp-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
  margin-bottom: 6px;
}
.lp-cal-wd {
  text-align: center;
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  padding: 2px 0;
}

/* ── Day grid ── */
.lp-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.lp-cal-day {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  background: var(--glass);
  border: 1px solid transparent;
  transition: all 0.2s;
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow: hidden;
}
.lp-cal-day:hover {
  border-color: var(--glass-border);
  color: var(--text-primary);
}
.lp-cal-day.lp-empty {
  background: none;
  cursor: default;
  border-color: transparent;
}
.lp-cal-day.lp-today {
  border-color: rgba(176,127,255,0.4);
  color: var(--text-primary);
}
.lp-cal-day.lp-today::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(176,127,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.lp-cal-day.lp-done {
  background: none;
  border-color: transparent;
}
.lp-cal-day.lp-has-record {
  border-color: rgba(90,240,208,0.3);
}
.lp-cal-day.lp-has-record::before {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--crystal-teal);
}

/* ── Crystal emoji ── */
.lp-crystal {
  font-size: 1.3rem;
  line-height: 1;
  margin-bottom: 1px;
  animation: lp-gem-glow 2s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 5px var(--crystal-violet));
}
@keyframes lp-gem-glow {
  from { filter: drop-shadow(0 0 4px rgba(176,127,255,0.6)); }
  to   { filter: drop-shadow(0 0 10px rgba(176,127,255,0.9)) drop-shadow(0 0 18px rgba(255,122,60,0.4)); }
}
.lp-day-num {
  font-size: 0.6rem;
  color: var(--text-muted);
}
.lp-cal-day.lp-done .lp-day-num {
  color: rgba(176,127,255,0.8);
}

/* ── Stats strip ── */
.lp-stats-strip {
  display: flex;
  gap: 0;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--glass-border);
}
.lp-stat {
  flex: 1;
  text-align: center;
  padding: 4px 0;
}
.lp-stat + .lp-stat {
  border-left: 1px solid var(--glass-border);
}
.lp-stat-num {
  font-family: var(--font-accent);
  font-size: 1.5rem;
  font-weight: 300;
  background: linear-gradient(135deg, var(--crystal-gold), var(--sacral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.lp-stat-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-top: 2px;
}

/* ============================================
   MELT LIGHT BAR
   ============================================ */
.lp-melt-section {
  margin: 0 var(--sp-5) var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 16px;
}
.lp-melt-label {
  font-family: var(--font-accent);
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.lp-melt-track {
  flex: 1;
  height: 10px;
  border-radius: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  position: relative;
}
.lp-melt-fill {
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--crystal-teal), var(--crystal-violet), var(--sacral));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(176,127,255,0.5);
  position: relative;
  overflow: hidden;
}
.lp-melt-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: lp-shimmer 2s linear infinite;
}
@keyframes lp-shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.lp-melt-particle {
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  animation: lp-float 2s ease-in-out infinite alternate;
}
@keyframes lp-float {
  from { transform: translateY(-50%) scale(1); }
  to   { transform: translateY(-60%) scale(1.2); }
}
.lp-melt-pct {
  font-family: var(--font-accent);
  font-size: 1.2rem;
  font-weight: 300;
  background: linear-gradient(135deg, var(--crystal-teal), var(--crystal-violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================
   DAY DETAIL MODAL
   ============================================ */
.lp-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 250;
  background: rgba(6,8,15,0.75);
  backdrop-filter: blur(10px);
  align-items: center;
  justify-content: center;
}
.lp-modal-overlay.lp-open {
  display: flex;
}
.lp-modal {
  background: var(--deep-navy);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 28px;
  width: 320px;
  max-width: 90vw;
  animation: lp-modalIn 0.25s ease;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 40px rgba(176,127,255,0.08);
}
@keyframes lp-modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.lp-modal-title {
  font-family: var(--font-accent);
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.lp-modal-date {
  font-size: 0.67rem;
  color: var(--text-muted);
  letter-spacing: 0.10em;
  margin-bottom: 16px;
}
.lp-modal-section {
  margin-bottom: 14px;
}
.lp-modal-section-label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  color: var(--crystal-teal);
  margin-bottom: 8px;
}

/* Food tags */
.lp-modal-foods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.lp-food-tag {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid;
}
.lp-food-tag.orange { border-color: var(--sacral); color: var(--sacral); background: rgba(255,122,60,0.06); }
.lp-food-tag.teal   { border-color: var(--crystal-teal); color: var(--crystal-teal); background: rgba(90,240,208,0.06); }
.lp-food-tag.violet { border-color: var(--crystal-violet); color: var(--crystal-violet); background: rgba(176,127,255,0.06); }

/* Fast bar */
.lp-modal-fast {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.lp-fast-icon { font-size: 1rem; }
.lp-fast-desc { font-size: 0.75rem; color: var(--text-primary); }
.lp-fast-time {
  margin-left: auto;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(110,207,255,0.08);
  border: 1px solid rgba(110,207,255,0.2);
  color: var(--crystal-blue);
}

/* Record summary in modal */
.lp-modal-record-summary {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Modal actions */
.lp-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.lp-modal-btn {
  flex: 1;
  padding: 9px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  transition: all 0.2s;
}
.lp-btn-primary {
  background: linear-gradient(135deg, var(--crystal-violet), #5a2fff);
  color: white;
  box-shadow: 0 4px 15px rgba(176,127,255,0.25);
}
.lp-btn-primary:hover {
  box-shadow: 0 4px 25px rgba(176,127,255,0.45);
}
.lp-btn-primary:disabled {
  opacity: 0.5;
  pointer-events: none;
}
.lp-btn-secondary {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}

/* ── Crystal pop animation ── */
@keyframes lp-crystal-pop {
  0%   { transform: scale(0); }
  70%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}
.lp-crystal-pop {
  animation: lp-crystal-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

