/* Thai-first font + minor polish on top of Tailwind utilities */
:root {
  --line-green: #06C755;
}

html, body {
  font-family: 'Sarabun', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #f8fafc;
  color: #0f172a;
  -webkit-tap-highlight-color: transparent;
}

/* Mobile-only feel even on desktop */
.app-shell {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  position: relative;
  padding-bottom: 96px; /* room for sticky CTA */
}

.sticky-cta {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0));
  padding: 12px 16px 16px;
}

.btn-primary {
  width: 100%;
  background: #16a34a;
  color: #fff;
  font-weight: 600;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  box-shadow: 0 4px 14px rgba(22,163,74,.25);
}
.btn-primary:active { transform: translateY(1px); }
.btn-primary:disabled { background: #cbd5e1; box-shadow: none; }

.btn-line {
  width: 100%;
  background: var(--line-green);
  color: #fff;
  font-weight: 600;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

.btn-secondary {
  width: 100%;
  background: #fff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 500;
  font-size: 15px;
}

.btn-danger-ghost {
  width: 100%;
  background: #fff;
  color: #b91c1c;
  border: 1px solid #fecaca;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 500;
  font-size: 15px;
}

.fab {
  position: fixed;
  right: max(16px, calc(50vw - 210px + 16px));
  bottom: 24px;
  width: 56px; height: 56px;
  border-radius: 28px;
  background: #16a34a;
  color: #fff;
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(22,163,74,.4);
  z-index: 30;
}

/* Icon buttons in headers (back arrow, hamburger, close, etc.).
   Forces a 44x44 minimum tap target for mobile reliability. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border-radius: 10px;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  background: transparent;
  user-select: none;
  -webkit-tap-highlight-color: rgba(15, 23, 42, .08);
}
.icon-btn:active { background: #f1f5f9; }
.icon-btn:focus-visible { outline: 2px solid #16a34a; outline-offset: 2px; }

/* Card — plain CSS so it works with the Tailwind CDN (which doesn't run @apply). */
.card {
  background-color: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.card:active { transform: scale(0.99); }

/* Pill row tap target */
.row-tap { min-height: 56px; }

/* Calendar dots */
.cal-day {
  width: 100%; aspect-ratio: 1/1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 12px;
}

/* Animations */
@keyframes pop { from { transform: scale(.95); opacity: 0 } to { transform: scale(1); opacity: 1 } }
.pop { animation: pop 120ms ease-out }

/* Hide spinner on number inputs (cleaner mobile look) */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Segmented control */
.seg {
  display: inline-flex; padding: 2px;
  background: #f1f5f9; border-radius: 10px;
}
.seg button {
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 500;
  color: #475569;
}
.seg button[aria-pressed="true"] { background: #fff; color: #0f172a; box-shadow: 0 1px 2px rgba(0,0,0,.06); }

/* Status pill emoji crispness on Android */
.emoji { font-family: 'Segoe UI Emoji','Apple Color Emoji','Noto Color Emoji', sans-serif; }
