/* ============================================================
   Dindee — Mobile-first stylesheet
   Aesthetic: warm, soft, maternal — peach/cream/blush palette
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Bai+Jamjuree:wght@400;500;600;700&display=swap');

:root {
  /* Palette — warm peach/blush */
  --bg:           #FFF8F2;
  --bg-soft:      #FDEDE0;
  --surface:      #FFFFFF;
  --surface-2:    #FFF3EA;
  --ink:          #3A2A23;
  --ink-soft:     #6B5248;
  --ink-mute:     #A08B82;
  --line:         #F2DCC9;

  --primary:      #E8826B;   /* peach */
  --primary-dark: #C76651;
  --primary-soft: #FBD9CB;
  --accent:       #F6B8AB;   /* blush */
  --accent-2:     #FAD3A0;   /* warm cream */
  --leaf:         #8AB28A;   /* sage for "normal" */
  --warn:         #D64545;   /* alert red */
  --warn-soft:    #FBE4E4;

  --shadow-sm: 0 2px 8px rgba(58,42,35,.06);
  --shadow-md: 0 8px 24px rgba(58,42,35,.10);
  --shadow-lg: 0 20px 48px rgba(58,42,35,.14);

  --radius-sm: 12px;
  --radius:    20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }

body {
  font-family: 'Prompt', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  /* soft texture background */
  background-image:
    radial-gradient(at 12% 8%,  rgba(246,184,171,.40) 0, transparent 40%),
    radial-gradient(at 92% 18%, rgba(250,211,160,.35) 0, transparent 42%),
    radial-gradient(at 50% 105%, rgba(232,130,107,.18) 0, transparent 50%);
  background-attachment: fixed;
}

/* App container — mobile-first frame */
.app {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 18px 100px;
  position: relative;
}

/* Headings — distinctive display font */
h1, h2, h3, .display {
  font-family: 'Bai Jamjuree', 'Prompt', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 .4em;
}
h1 { font-size: 1.75rem; line-height: 1.2; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

p  { margin: 0 0 .8em; color: var(--ink-soft); }

a  { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }

/* ----------------------- Top bar / brand ---------------------- */
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0 22px;
}
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent-2) 100%);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
  color: white; font-size: 22px;
}
.brand-name {
  font-family: 'Bai Jamjuree', sans-serif;
  font-weight: 700; font-size: 1.4rem;
  letter-spacing: -0.02em;
}
.brand-tag {
  font-size: .78rem; color: var(--ink-mute); margin-top: -3px;
}

/* ----------------------- Cards & surfaces --------------------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.card.soft {
  background: var(--surface-2);
  border-color: transparent;
}
.card-hero {
  background: linear-gradient(160deg, #FFE9D9 0%, #FBD9CB 60%, #F6B8AB 100%);
  border: none;
  position: relative;
  overflow: hidden;
}
.card-hero::after {
  content: ''; position: absolute; right: -40px; top: -50px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.6) 0%, transparent 70%);
  pointer-events: none;
}

/* ----------------------- Forms -------------------------------- */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; font-weight: 500; font-size: .9rem;
  margin-bottom: 6px; color: var(--ink);
}
.form-control,
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background: var(--surface);
  color: var(--ink);
  transition: all .2s ease;
}
.form-control:focus,
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(232,130,107,.15);
}
.form-row { display: flex; gap: 12px; }
.form-row > * { flex: 1; }

/* ----------------------- Buttons ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit; font-weight: 500; font-size: 1rem;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary); color: white;
  box-shadow: 0 4px 14px rgba(232,130,107,.35);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost {
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn-block { width: 100%; }
.btn-lg    { padding: 18px 28px; font-size: 1.05rem; }

/* ----------------------- Counter button (BIG) ----------------- */
.counter-wrap {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0;
}
.counter-btn {
  width: 240px; height: 240px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 30% 25%, #FFE0D2 0%, var(--primary) 60%, var(--primary-dark) 100%);
  color: white;
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 1.5rem; font-weight: 600;
  cursor: pointer;
  box-shadow:
    0 18px 40px rgba(232,130,107,.45),
    inset 0 -8px 20px rgba(0,0,0,.08),
    inset 0 6px 16px rgba(255,255,255,.4);
  transition: transform .12s ease, box-shadow .12s ease;
  position: relative;
}
.counter-btn:active {
  transform: scale(.94);
  box-shadow:
    0 8px 18px rgba(232,130,107,.35),
    inset 0 -4px 10px rgba(0,0,0,.10),
    inset 0 4px 12px rgba(255,255,255,.3);
}
.counter-btn .heart {
  display: block;
  font-size: 3.5rem; line-height: 1;
  margin-bottom: 6px;
}
.counter-btn .label {
  font-size: 1rem; opacity: .92;
}

/* Pulse ring animation */
.counter-btn::before {
  content: ''; position: absolute; inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: pulse 2.4s ease-out infinite;
}
@keyframes pulse {
  0%   { opacity: .8; transform: scale(.95); }
  100% { opacity: 0;  transform: scale(1.18); }
}

/* Floating "+1" feedback when tap */
.tap-fx {
  position: absolute;
  font-family: 'Bai Jamjuree', sans-serif;
  font-weight: 700; font-size: 1.6rem; color: var(--primary-dark);
  pointer-events: none;
  animation: floatup 900ms ease-out forwards;
}
@keyframes floatup {
  0%   { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-80px) scale(1.2); }
}

/* ----------------------- Stats / Numbers ---------------------- */
.stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 8px;
}
.stat-value {
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 2.2rem; font-weight: 700; line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-size: .8rem; color: var(--ink-mute);
  margin-top: 4px;
}
.stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 8px;
  border: 1px solid var(--line);
}

/* ----------------------- Pills / Tags ------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .82rem; font-weight: 500;
  background: var(--surface-2); color: var(--ink-soft);
}
.pill-normal { background: rgba(138,178,138,.18); color: #5a8a5a; }
.pill-warn   { background: var(--warn-soft);     color: var(--warn); }
.pill-info   { background: var(--primary-soft);  color: var(--primary-dark); }

/* ----------------------- Method selector ---------------------- */
.method-grid { display: grid; gap: 12px; }
.method-card {
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  cursor: pointer; transition: all .2s ease;
  display: flex; gap: 14px; align-items: center;
}
.method-card:hover    { border-color: var(--accent); }
.method-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #FFF3EA 0%, #FBD9CB 100%);
  box-shadow: var(--shadow-md);
}
.method-card .icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--primary-soft); color: var(--primary-dark);
  display: grid; place-items: center; flex-shrink: 0;
  font-size: 24px;
}
.method-card h3 { margin: 0 0 2px; }
.method-card p  { margin: 0; font-size: .85rem; }

/* ----------------------- Choice chips ------------------------- */
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  font-size: .9rem; cursor: pointer;
  transition: all .15s ease;
}
.chip:hover    { border-color: var(--accent); }
.chip.active   { background: var(--primary); border-color: var(--primary); color: white; }

/* ----------------------- Alerts ------------------------------- */
.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: .92rem;
  border-left: 4px solid;
}
.alert-warn  { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.alert-info  { background: var(--primary-soft); color: var(--primary-dark); border-color: var(--primary); }
.alert-ok    { background: rgba(138,178,138,.15); color: #4a7a4a; border-color: var(--leaf); }

/* ----------------------- Modal ------------------------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(58,42,35,.55);
  display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-backdrop.show { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 26px; max-width: 380px; width: 100%;
  box-shadow: var(--shadow-lg);
  animation: modalpop .25s ease;
}
.modal.warn { border-top: 6px solid var(--warn); }
@keyframes modalpop {
  from { transform: scale(.92); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.modal h3 { color: var(--warn); }

/* ----------------------- Bottom nav --------------------------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
.bottom-nav a {
  flex: 1; text-align: center;
  padding: 8px 4px;
  color: var(--ink-mute); font-size: .72rem;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.bottom-nav a.active { color: var(--primary-dark); }
.bottom-nav a .icon { font-size: 22px; }

/* ----------------------- Timer display ------------------------ */
.timer-display {
  font-family: 'Bai Jamjuree', monospace;
  font-size: 2.6rem; font-weight: 700;
  text-align: center;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}
.timer-bar {
  height: 8px; background: var(--surface-2); border-radius: 999px;
  overflow: hidden; margin-top: 12px;
}
.timer-bar > div {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .8s linear;
}

/* ----------------------- Lists -------------------------------- */
.session-item {
  display: flex; gap: 14px; padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.session-item:last-child { border: none; }
.session-item .when {
  width: 64px; flex-shrink: 0; text-align: center;
}
.session-item .when .day {
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 1.4rem; font-weight: 700; line-height: 1;
}
.session-item .when .mo {
  font-size: .72rem; color: var(--ink-mute); text-transform: uppercase;
}
.session-item .meta { flex: 1; min-width: 0; }
.session-item .kicks {
  font-family: 'Bai Jamjuree', sans-serif;
  font-weight: 700; font-size: 1.15rem;
  color: var(--primary-dark);
}

/* ----------------------- Helpers ------------------------------ */
.text-center { text-align: center; }
.text-mute   { color: var(--ink-mute); }
.mt-0 { margin-top: 0; }   .mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.flex { display: flex; }    .flex-col { flex-direction: column; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.hidden { display: none !important; }

/* small flourish — soft divider */
.soft-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0 16px;
  color: var(--ink-mute); font-size: .85rem;
}
.soft-divider::before, .soft-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}
