/* assets/css/liman.css */

/* ─── TOKENS ─── */
:root {
  --cream:        #FBF6F1;
  --cream-deep:   #F4ECE3;
  --blush:        #F5DDDA;
  --blush-soft:   #FBE8E5;
  --rose:         #E8B4B8;
  --rose-deep:    #D89499;
  --mauve:        #B08DA0;
  --mauve-deep:   #8E6B81;
  --plum:         #4A2E3D;
  --plum-soft:    #6B4A5C;
  --gold:         #D4A574;
  --sage:         #B5C4A8;
  --sage-deep:    #7C9469;
  --ink:          #2A1A22;
  --line:         rgba(74,46,61,.12);
  --sh-sm:        0 2px 8px  rgba(74,46,61,.06);
  --sh-md:        0 8px 24px rgba(74,46,61,.08);
  --sh-lg:        0 24px 60px rgba(74,46,61,.12);
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 24px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100dvh;
  padding-bottom: 84px; /* bottom nav height */
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 5%,  rgba(245,221,218,.55), transparent 55%),
    radial-gradient(ellipse 55% 40% at 90% 85%,  rgba(176,141,160,.15), transparent 55%);
  background-attachment: fixed;
}

.serif { font-family: 'Instrument Serif', serif; font-weight: 400; }

/* ─── TYPOGRAPHY ─── */
h1,h2,h3 { font-family: 'Instrument Serif', serif; font-weight: 400; color: var(--plum); }
p { color: var(--plum-soft); }

/* ─── APP SHELL ─── */
.app-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 20px 16px;
  min-height: calc(100dvh - 84px);
}

/* ─── TOP BAR ─── */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.top-bar .logo {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 26px;
  color: var(--plum);
  text-decoration: none;
}
.top-bar .logo em { color: var(--mauve); }

/* ─── BOTTOM NAV ─── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 4px calc(10px + env(safe-area-inset-bottom));
  background: rgba(251,246,241,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--line);
  z-index: 100;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--plum-soft);
  opacity: .5;
  font-size: 9px;
  letter-spacing: .06em;
  flex: 1;
  position: relative;
  transition: opacity .2s;
}
.nav-item.active { opacity: 1; color: var(--mauve-deep); }
.nav-item svg { width: 22px; height: 22px; }
.nav-badge {
  position: absolute;
  top: 0; right: calc(50% - 14px);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--rose-deep);
  box-shadow: 0 0 0 1.5px var(--cream);
}

/* ─── GREETING ─── */
.greeting .date {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--mauve);
  margin-bottom: 4px;
}
.greeting h1 {
  font-size: 32px;
  line-height: 1.05;
  font-style: italic;
}
.greeting .heart { color: var(--rose-deep); font-style: normal; }

/* ─── STREAK CARD ─── */
.streak-card {
  background: linear-gradient(135deg, var(--rose), var(--mauve));
  color: var(--cream);
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin: 16px 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px -8px rgba(176,141,160,.5);
}
.streak-card::after {
  content: '✿';
  position: absolute;
  right: -12px; top: -20px;
  font-size: 90px;
  color: rgba(251,246,241,.15);
  pointer-events: none;
}
.streak-card .sc-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .2em;
  opacity: .85;
  margin-bottom: 4px;
}
.streak-card .sc-number {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 42px;
  line-height: 1;
}
.streak-card .sc-number em {
  font-size: 15px;
  font-style: normal;
  font-family: 'DM Sans', sans-serif;
  opacity: .85;
  margin-left: 4px;
}
.streak-card .sc-flower {
  position: absolute;
  bottom: 14px; right: 18px;
  font-size: 24px;
}

/* ─── SECTION TITLE ─── */
.section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--mauve-deep);
  margin: 16px 0 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-label span:last-child {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  color: var(--plum-soft);
  font-size: 13px;
}

/* ─── HABIT ROW ─── */
.habit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: white;
  border-radius: var(--r-sm);
  margin-bottom: 8px;
  box-shadow: var(--sh-sm);
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.habit-row:active { transform: scale(.98); }
.habit-row.done { opacity: .75; }
.habit-row.done .habit-name {
  text-decoration: line-through;
  text-decoration-color: var(--rose);
  color: var(--plum-soft);
}
.habit-check {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--rose);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s;
}
.habit-row.done .habit-check {
  background: linear-gradient(135deg, var(--rose), var(--mauve));
  border-color: transparent;
}
.habit-row.done .habit-check::after {
  content: '';
  width: 9px; height: 5px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px,-1px);
}
.habit-info { flex: 1; min-width: 0; }
.habit-name  { font-size: 14px; font-weight: 500; color: var(--plum); }
.habit-meta  { font-size: 11px; color: var(--mauve); margin-top: 1px; }
.habit-icon  { font-size: 16px; }

/* Water bar */
.water-bar { display: flex; gap: 4px; margin-top: 5px; }
.water-seg {
  flex: 1; height: 5px; border-radius: 3px;
  background: var(--cream-deep);
  transition: background .3s;
}
.water-seg.filled { background: linear-gradient(90deg, var(--rose), var(--mauve)); }

/* ─── DAILY NOTE ─── */
.daily-note {
  background: linear-gradient(135deg, var(--blush-soft), var(--cream));
  border: 1px dashed var(--rose);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin-top: 12px;
}
.daily-note .dn-head {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 5px;
}
.daily-note .dn-pen { color: var(--rose-deep); font-size: 13px; }
.daily-note .dn-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--mauve);
}
.daily-note .dn-text {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 14px;
  color: var(--plum);
  line-height: 1.4;
  cursor: text;
  min-height: 22px;
  outline: none;
}
.daily-note .dn-meta {
  display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap;
}
.mood-btn {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--cream-deep);
  color: var(--plum-soft);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.mood-btn.active {
  background: var(--rose);
  color: white;
  border-color: var(--rose);
}

/* ─── GOAL CARD ─── */
.goal-card {
  background: white;
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  box-shadow: var(--sh-sm);
  border-left: 3px solid var(--rose);
}
.goal-card.cat-pilates  { border-left-color: var(--mauve); }
.goal-card.cat-hareket  { border-left-color: var(--sage); }
.goal-card.cat-su       { border-left-color: #72b4e3; }
.goal-card.cat-uyku     { border-left-color: var(--gold); }
.goal-card.cat-beslenme { border-left-color: var(--rose-deep); }

.gc-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 10px;
}
.gc-title { font-size: 14px; font-weight: 600; color: var(--plum); }
.gc-freq  { font-size: 10px; text-transform: uppercase; letter-spacing: .15em; color: var(--mauve); margin-top: 2px; }
.gc-pct   { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 24px; color: var(--rose-deep); line-height: 1; }

.cat-pilates  .gc-pct { color: var(--mauve-deep); }
.cat-hareket  .gc-pct { color: var(--sage-deep); }
.cat-uyku     .gc-pct { color: var(--gold); }

.prog-bar { height: 5px; background: var(--cream-deep); border-radius: 3px; overflow: hidden; }
.prog-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--rose), var(--mauve)); }
.cat-hareket  .prog-fill { background: linear-gradient(90deg, var(--sage), var(--sage-deep)); }
.cat-pilates  .prog-fill { background: linear-gradient(90deg, var(--mauve), var(--mauve-deep)); }
.cat-uyku     .prog-fill { background: linear-gradient(90deg, #E5BC8C, var(--gold)); }

.gc-actions { display: flex; gap: 8px; margin-top: 10px; }
.btn-ghost {
  font-size: 11px; padding: 5px 12px; border-radius: 100px;
  background: var(--cream); color: var(--plum-soft);
  border: 1px solid var(--line); cursor: pointer;
  transition: background .2s;
}
.btn-ghost:hover { background: var(--blush); }
.btn-ghost.danger { color: #b94a4a; }

/* ─── BUTTONS ─── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px; border-radius: 100px;
  background: linear-gradient(135deg, var(--rose), var(--mauve));
  color: white; font-size: 15px; font-weight: 600;
  border: none; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 16px -4px rgba(176,141,160,.5);
  transition: opacity .2s, transform .15s;
}
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: .6; cursor: default; }

.btn-add {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--mauve));
  color: white; border: none; font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px -2px rgba(176,141,160,.5);
  flex-shrink: 0;
}

/* ─── FORM ─── */
.form-card {
  background: white;
  border-radius: var(--r-md);
  padding: 20px;
  box-shadow: var(--sh-md);
  margin-bottom: 16px;
}
.form-card h2 {
  font-size: 22px;
  font-style: italic;
  margin-bottom: 16px;
}
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 10px; text-transform: uppercase; letter-spacing: .2em;
  color: var(--mauve); margin-bottom: 5px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--cream);
  font-size: 14px;
  color: var(--plum);
  font-family: 'DM Sans', sans-serif;
  transition: border-color .2s;
}
.form-input:focus { outline: none; border-color: var(--rose); }
.form-textarea {
  resize: vertical; min-height: 80px;
}

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip {
  font-size: 11px; padding: 5px 12px; border-radius: 100px;
  background: var(--cream); color: var(--plum-soft);
  border: 1px solid var(--line); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.chip.active { background: var(--rose); color: white; border-color: var(--rose); }
.chip[data-val="Mon"], .chip[data-val="Wed"], .chip[data-val="Fri"] {}

/* ─── STAT CARDS ─── */
.stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 16px; }
.stat-card {
  background: white; border-radius: var(--r-sm);
  padding: 12px 8px; text-align: center; box-shadow: var(--sh-sm);
}
.stat-num {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 26px; color: var(--mauve-deep); line-height: 1;
}
.stat-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: .18em; color: var(--plum-soft); margin-top: 4px; }

/* ─── CHART CARD ─── */
.chart-card {
  background: white; border-radius: var(--r-md);
  padding: 16px; margin-bottom: 12px; box-shadow: var(--sh-sm);
}
.chart-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
}
.chart-head .ch-ttl { font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: var(--mauve-deep); }
.chart-head .ch-sub { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 14px; color: var(--plum); }

/* Heatmap */
.heatmap { display: grid; grid-template-columns: repeat(13,1fr); gap: 3px; }
.hm-cell { aspect-ratio: 1; border-radius: 3px; background: var(--cream-deep); }
.hm-cell.l1 { background: var(--blush); }
.hm-cell.l2 { background: var(--rose); }
.hm-cell.l3 { background: var(--rose-deep); }
.hm-cell.l4 { background: var(--mauve); }
.hm-legend {
  display: flex; align-items: center; gap: 5px;
  font-size: 9px; color: var(--mauve); margin-top: 8px;
  letter-spacing: .12em; justify-content: flex-end;
}
.hm-dot { width: 8px; height: 8px; border-radius: 2px; }

/* ─── MESSAGES ─── */
.msg-intro { text-align: center; margin: 4px 0 18px; }
.msg-intro h1 { font-size: 30px; font-style: italic; }
.msg-intro p { font-size: 10px; text-transform: uppercase; letter-spacing: .2em; color: var(--mauve-deep); margin-top: 4px; }

.letter-card {
  background: linear-gradient(135deg, white, var(--blush-soft));
  border-radius: var(--r-md); padding: 14px 16px;
  margin-bottom: 10px; position: relative;
  box-shadow: var(--sh-sm); border: 1px solid var(--blush);
}
.letter-card .lc-stamp {
  position: absolute; top: 12px; right: 14px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--rose-deep); color: white;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
}
.letter-card .lc-when {
  font-size: 9px; text-transform: uppercase; letter-spacing: .18em;
  color: var(--mauve); margin-bottom: 6px;
}
.letter-card .lc-body {
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 15px; color: var(--plum); line-height: 1.45;
  padding-right: 32px;
}
.letter-card .lc-reward {
  margin-top: 8px; font-size: 11px; color: var(--rose-deep);
  font-weight: 600;
}
.letter-card .lc-sig {
  margin-top: 8px;
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 13px; color: var(--rose-deep); text-align: right;
}

.letter-card.locked {
  background: linear-gradient(135deg, var(--cream-deep), var(--cream));
  border: 1px dashed var(--mauve); text-align: center;
  padding: 16px;
}
.letter-card.locked .lc-lock { font-size: 18px; color: var(--mauve); margin-bottom: 5px; }
.letter-card.locked .lc-body { font-size: 13px; padding-right: 0; color: var(--plum-soft); }
.letter-card.locked .lc-req { font-size: 10px; color: var(--mauve); margin-top: 6px; text-transform: uppercase; letter-spacing: .15em; }

/* ─── CYCLE ─── */
.cycle-wheel-wrap { position: relative; display: flex; justify-content: center; margin: 8px 0 14px; }
.cycle-wheel { width: 220px; height: 220px; }
.wheel-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  text-align: center; pointer-events: none;
}
.wc-label { font-size: 9px; text-transform: uppercase; letter-spacing: .22em; color: var(--mauve); }
.wc-day { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 52px; color: var(--plum); line-height: .95; }
.wc-phase { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 14px; color: var(--mauve-deep); margin-top: 3px; }

.cycle-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 12px; }
.cs-card { background: white; border-radius: var(--r-sm); padding: 10px 8px; text-align: center; box-shadow: var(--sh-sm); }
.cs-val { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 20px; color: var(--plum); line-height: 1; }
.cs-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: .15em; color: var(--mauve); margin-top: 3px; }

.phase-tip {
  background: linear-gradient(135deg, var(--blush-soft), var(--cream));
  border: 1px solid var(--blush); border-radius: var(--r-md);
  padding: 12px 16px; margin-bottom: 14px;
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 14px; color: var(--plum); line-height: 1.4;
}

.symptom-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.history-list { margin-top: 8px; }
.history-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: 13px; color: var(--plum);
}
.history-row:last-child { border-bottom: none; }
.history-len { font-size: 10px; color: var(--mauve); }

/* ─── PROFILE ─── */
.profile-head { text-align: center; margin-bottom: 16px; }
.p-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blush), var(--mauve));
  margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-family: 'Instrument Serif', serif; font-style: italic; font-size: 32px;
  box-shadow: 0 8px 20px -6px rgba(176,141,160,.5);
  position: relative;
}
.p-avatar::after {
  content: '✿'; position: absolute; bottom: -4px; right: -4px;
  background: white; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--rose-deep); font-size: 12px;
  box-shadow: var(--sh-sm);
}
.p-name { font-size: 24px; font-style: italic; }
.p-since { font-size: 10px; text-transform: uppercase; letter-spacing: .18em; color: var(--mauve); margin-top: 2px; }

.p-stats {
  display: flex; justify-content: space-around;
  background: white; border-radius: var(--r-md);
  padding: 14px; margin-bottom: 14px; box-shadow: var(--sh-sm);
}
.p-stat { text-align: center; }
.p-stat .num { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 24px; color: var(--plum); line-height: 1; }
.p-stat .lbl { font-size: 9px; text-transform: uppercase; letter-spacing: .18em; color: var(--mauve); margin-top: 3px; }
.p-divider { width: 1px; background: var(--line); }

.settings-card { background: white; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-sm); margin-bottom: 12px; }
.setting-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
.setting-row:last-child { border-bottom: none; }
.sr-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--blush-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0; color: var(--rose-deep);
}
.sr-label { flex: 1; font-size: 14px; color: var(--plum); }
.sr-val { font-size: 12px; color: var(--mauve); }

/* Toggle */
.toggle-wrap { position: relative; display: inline-block; width: 36px; height: 20px; }
.toggle-wrap input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--cream-deep); border-radius: 100px;
  cursor: pointer; transition: background .2s;
}
.toggle-slider::after {
  content: ''; position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: white; border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.toggle-wrap input:checked + .toggle-slider { background: var(--mauve); }
.toggle-wrap input:checked + .toggle-slider::after { transform: translateX(16px); }

.p-footer { text-align: center; padding: 8px 0 16px; }
.p-footer p { font-family: 'Instrument Serif', serif; font-style: italic; font-size: 13px; color: var(--mauve); }

/* ─── LOGIN ─── */
.login-page {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 100dvh; padding: 32px 24px;
  background-image:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(245,221,218,.7), transparent 55%),
    radial-gradient(ellipse 55% 40% at 85% 85%, rgba(176,141,160,.2), transparent 55%);
}
.login-logo {
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 72px; color: var(--plum); line-height: .9;
  margin-bottom: 6px;
}
.login-logo em { color: var(--mauve); }
.login-tagline {
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 18px; color: var(--plum-soft); margin-bottom: 40px;
}
.login-card {
  background: white; border-radius: var(--r-lg);
  padding: 28px 24px; box-shadow: var(--sh-lg);
  width: 100%; max-width: 360px;
}
.login-card h2 { font-size: 20px; font-style: italic; margin-bottom: 20px; }
.login-error {
  background: var(--blush); color: var(--plum);
  padding: 10px 14px; border-radius: var(--r-sm);
  font-size: 13px; margin-bottom: 14px;
}

/* ─── ADMIN ─── */
.admin-bar {
  background: var(--plum); color: white;
  padding: 10px 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
}
.admin-bar a { color: var(--rose); text-decoration: none; }
.admin-page { max-width: 800px; margin: 0 auto; padding: 24px 20px 60px; }
.admin-page h1 { font-size: 30px; font-style: italic; margin-bottom: 24px; }

/* ─── TOAST ─── */
.toast {
  position: fixed; bottom: 96px; left: 50%; transform: translateX(-50%);
  background: var(--plum); color: white;
  padding: 10px 20px; border-radius: 100px;
  font-size: 13px; box-shadow: var(--sh-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  z-index: 200;
  white-space: nowrap;
}
.toast.show { opacity: 1; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(74,46,61,.4);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none; align-items: flex-end;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  background: var(--cream);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
  width: 100%; max-height: 85dvh;
  overflow-y: auto;
}
.modal-handle {
  width: 40px; height: 4px; background: var(--line);
  border-radius: 2px; margin: 0 auto 16px;
}
.modal-sheet h2 { font-size: 22px; font-style: italic; margin-bottom: 18px; }

/* ─── UTILITIES ─── */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-0  { margin-bottom: 0; }
.text-mauve { color: var(--mauve); }
.text-plum  { color: var(--plum); }
.text-sm { font-size: 12px; }
.italic { font-style: italic; font-family: 'Instrument Serif', serif; }
.flex   { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ─── CONFETTI (tamamlama efekti) ─── */
@keyframes confetti-fall {
  0%   { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(80px)  rotate(360deg); opacity: 0; }
}
.confetti-piece {
  position: fixed; top: 40%; pointer-events: none; z-index: 400;
  width: 8px; height: 8px; border-radius: 2px;
  animation: confetti-fall .8s ease-out forwards;
}

@media (min-width: 640px) {
  .app-page { padding: 32px 24px 20px; }
}
