﻿:root {
  /* the pastels are the whole point — opt out of browser auto-dark */
  color-scheme: light;

  --pink: #f27ba9;
  --pink-soft: #ffd6e7;
  --pink-bg: #fff5f9;
  --matcha: #a8c686;
  --matcha-soft: #e4efd4;
  --peach: #ffb289;
  --peach-soft: #ffe3d1;
  --tulip: #7e9fe0;
  --tulip-soft: #dde7fa;
  --ink: #6b4457;
  --ink-soft: #b48ba0;
  --card: #ffffff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Quicksand", -apple-system, "SF Pro Rounded", sans-serif;
  background: linear-gradient(180deg, #ffeaf3 0%, var(--pink-bg) 30%, #fdf8ee 100%);
  color: var(--ink);
  min-height: 100vh;
  min-height: 100dvh;
}

.app {
  max-width: 430px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px 32px;
}

/* ---------- header ---------- */
.header {
  text-align: center;
  margin-bottom: 16px;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.2px;
}

.tulip {
  display: inline-block;
  animation: sway 3s ease-in-out infinite;
  transform-origin: bottom center;
}

@keyframes sway {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(8deg); }
}

.subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 500;
}

/* ---------- now card: clock + live status ---------- */
.now-card {
  background: var(--card);
  border-radius: 20px;
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(242, 123, 169, 0.14);
}

.now-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.now-time {
  font-size: 1.55rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.now-date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 2px;
}

.status-pill {
  flex: none;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.st-class, .st-work { background: var(--tulip-soft); color: #5578bd; }
.st-avail { background: var(--matcha-soft); color: #64803f; }
.st-free { background: var(--pink-soft); color: #c94f85; }

.now-today {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1.5px dashed var(--pink-soft);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- calendar ---------- */
.calendar {
  background: var(--card);
  border-radius: 24px;
  padding: 14px 12px 16px;
  box-shadow: 0 4px 20px rgba(242, 123, 169, 0.12);
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 0 4px;
}

.month-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.nav-btn {
  background: var(--pink-soft);
  color: var(--pink);
  border: none;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  font-size: 1.3rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding-bottom: 3px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.nav-btn:active { transform: scale(0.9); }
.nav-btn:disabled { opacity: 0.3; }

.weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  touch-action: pan-y;
}

.day {
  aspect-ratio: 1 / 1;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 600;
  position: relative;
  background: #fdf3f7;
  color: var(--ink);
  transition: transform 0.12s ease;
}

.day.empty {
  background: transparent;
}

.day:active {
  transform: scale(0.9);
}

.day.free { background: var(--peach-soft); color: #b06a3e; }
.day.half { background: var(--matcha-soft); color: #64803f; }

.day.today {
  background: var(--pink);
  box-shadow: 0 3px 10px rgba(242, 123, 169, 0.45);
  color: #fff;
  font-weight: 700;
}

.day.today .dot { background: #fff; }

.dots {
  display: flex;
  gap: 3px;
  height: 5px;
  margin-top: 2px;
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.dot-event { background: var(--tulip); }
.dot-us { background: var(--pink); }

/* ---------- legend ---------- */
.legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  margin-top: 16px;
  background: var(--card);
  border-radius: 18px;
  padding: 13px 18px;
  box-shadow: 0 2px 10px rgba(242, 123, 169, 0.1);
}

.key {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.swatch { flex: none; }

.swatch.square {
  width: 20px;
  height: 20px;
  border-radius: 7px;
}

.swatch.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin: 0 5.5px;
}

.swatch.peach { background: var(--peach-soft); border: 1.5px solid var(--peach); }
.swatch.matcha { background: var(--matcha-soft); border: 1.5px solid var(--matcha); }
.swatch.dot.tulip { background: var(--tulip); }
.swatch.pink { background: var(--pink); }

.hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 14px;
}

/* ---------- tap-to-peek ---------- */
.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(255, 214, 231, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s;
  pointer-events: none;
  z-index: 10;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* so a tap anywhere dismisses it */
}

.peek-card {
  background: var(--card);
  border-radius: 26px;
  padding: 26px 30px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(242, 123, 169, 0.3);
  transform: scale(0.8) translateY(10px);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.overlay.show .peek-card {
  transform: scale(1) translateY(0);
}

.peek-emoji { font-size: 2.6rem; line-height: 1.2; }

.peek-date {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--ink-soft);
  margin-top: 6px;
}

.peek-status {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 6px;
}

.peek-sub {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 4px;
}

.peek-events {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.peek-event {
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--tulip-soft);
  color: #5578bd;
  border-radius: 12px;
  padding: 7px 12px;
}

.peek-event.us {
  background: var(--pink-soft);
  color: #c94f85;
}

