/* =========================
   Pink + white theme (sitewide)
   ========================= */
*{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #2a2430;
  background: radial-gradient(circle at 20% 20%, #fff0f8, #ffd6ea);
}

/* Links */
a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; }

/* Media should never overflow */
img, video, iframe{ max-width: 100%; height: auto; }

/* Make sure [hidden] always works */
[hidden]{ display: none !important; }

:root{
  --ink: #2a2430;
  --muted: rgba(42,36,48,0.72);

  --panel-bg: rgba(255,255,255,0.78);
  --panel-border: rgba(255,255,255,0.60);

  --shadow: 0 16px 50px rgba(0,0,0,0.14);
  --shadow-soft: 0 10px 26px rgba(0,0,0,0.10);

  --radius: 18px;

  /* Water tracker shades */
  --water-0: #ffffff;
  --water-1: #ffe7f3;
  --water-2: #ffc6e2;
  --water-3: #ff9fd0;
  --water-4: #ff6fb9;

  --lace-height: 34px;
}

/* =========================
   Layout shell
   ========================= */
.site{
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 16px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
}

@media (max-width: 860px){
  .site{ grid-template-columns: 1fr; }
}

.panel{
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* =========================
   Header
   ========================= */
.panel.header{
  grid-column: 1 / -1;
  position: relative;
  color: #fff;
  background: linear-gradient(180deg, rgba(255,182,219,0.55), rgba(255,255,255,0.20));
}

.header-inner{
  position: relative;
  z-index: 1;
  padding: 18px 18px 10px;
  text-align: center;
}

.panel.header h1{
  margin: 0;
  font-family: "Lobster", cursive;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: 0.4px;
  text-shadow: 0 8px 20px rgba(0,0,0,0.28);
}

.panel.header p{
  margin: 8px 0 0;
  font-weight: 800;
  opacity: 0.95;
  text-shadow: 0 6px 18px rgba(0,0,0,0.20);
}

.header-lace{
  display: block;
  width: 100%;
  height: var(--lace-height);
  object-fit: cover;
}
.header-gif{
  display: block;
  width: 100%;
  height: auto;
}

/* =========================
   Nav
   ========================= */
.panel.nav{
  position: relative;
  padding: 14px;
  background: rgba(255,255,255,0.65);
}

.nav-inner{ position: relative; z-index: 1; }

.menuBox{ display: grid; gap: 10px; }

.navBtn{
  display: block;
  text-align: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.08);
  font-weight: 900;
}
.navBtn:hover{ background: rgba(255,255,255,0.98); }

.navFooter{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(0,0,0,0.10);
  text-align: center;
  font-weight: 900;
  color: rgba(42,36,48,0.75);
}

/* =========================
   Main panel
   ========================= */
.panel.main{
  padding: 16px;
  background: rgba(255,255,255,0.60);
  min-width: 0;
}

/* =========================
   Homepage layout (KEEP SAME)
   ========================= */
.homeLayout{
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 980px){
  .homeLayout{ grid-template-columns: 1fr; }
}

.homeMain{ display: grid; gap: 16px; min-width: 0; }
.homeSide{ display: grid; gap: 16px; min-width: 0; }

/* Widgets */
.widget{
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.78);
  padding: 14px;
  box-shadow: var(--shadow-soft);
  min-width: 0;
}
.widget h3{
  margin: 0 0 8px;
  font-weight: 900;
}

.muted{ color: var(--muted); }
.tiny{ font-size: 0.88rem; }

/* Date/Time pill */
.dateTimePill{
  display: inline-block;
  padding: 10px 12px;
  border-radius: 999px;
  background: rgba(255, 179, 217, 0.75);
  color: #fff;
  font-weight: 900;
}

/* Quote + compliment */
.quoteBox,
.complimentBox{
  border-radius: 14px;
  padding: 12px;
  border: 1px dashed rgba(0,0,0,0.16);
  background: rgba(255,231,243,0.45);
  font-weight: 800;
  line-height: 1.35;
}

.complimentBox{
  min-height: 44px;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.25;
}

/* Buttons */
.pillBtn{
  border-radius: 999px;
  padding: 10px 12px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.80);
  cursor: pointer;
  font-weight: 900;
}
.pillBtn:hover{ background: rgba(255,255,255,0.98); }

/* =========================
   Mini Calendar (MATCHES YOUR HTML + JS)
   ========================= */
.miniCal{
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.miniCalTitle{
  font-weight: 900;
  text-align: center;
}

.miniCalGrid{
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.miniCalDow{
  text-align: center;
  font-weight: 900;
  font-size: 0.86rem;
  color: rgba(42,36,48,0.72);
}

.miniCalDay{
  text-align: center;
  padding: 10px 0;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.80);
  font-weight: 800;
  min-width: 0;
}

.miniCalDay.isToday{
  background: rgba(255, 179, 217, 0.75);
  color: #fff;
  border-color: rgba(255,255,255,0.75);
}

.miniCalBlank{
  opacity: 0;
  border: 0;
  background: transparent;
}

/* =========================
   Water Tracker (WIDER on desktop, scroll inside widget)
   ========================= */
.waterTop{
  display:flex;
  align-items: baseline;
  justify-content: space-between;
  gap:10px;
}

/* always allow scroll INSIDE the widget (desktop + mobile) */
.waterYearWrap{
  margin-top: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  max-width: 100%;
}

/* Base: compact but readable */
.waterYearGrid{
  display: grid;
  gap: 3px;
  width: max-content; /* IMPORTANT: prevents squishing; scroll instead */

  /* fixed column sizes = “wider” */
  grid-template-columns: 40px repeat(12, 34px);
  grid-template-rows: 22px repeat(31, 14px);
}

/* Bigger + wider on computers */
@media (min-width: 900px){
  .waterYearGrid{
    grid-template-columns: 44px repeat(12, 46px);  /* wider month columns */
    grid-template-rows: 24px repeat(31, 16px);     /* a bit taller so it’s nicer */
    gap: 4px;
  }
}

/* labels */
.waterCorner{ grid-row: 1; grid-column: 1; }

.waterMonth{
  grid-row: 1;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: .78rem;
  color: rgba(42,36,48,.78);
  border-radius: 10px;
  padding: 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.waterMonth.isCurrent{
  background: rgba(255, 179, 217, 0.35);
  border: 1px solid rgba(0,0,0,0.08);
}

.waterDay{
  grid-column: 1;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: .78rem;
  color: rgba(42,36,48,.70);
  border-radius: 10px;
  background: rgba(255,255,255,0.35);
  border: 1px solid rgba(0,0,0,0.06);
}

/* cells */
.waterCellYear{
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  cursor: pointer;
  padding: 0;
}

.waterCellYear.isInvalid{
  opacity: .25;
  cursor: default;
  border-style: dashed;
}

.waterCellYear[data-level="0"]{ background: var(--water-0); }
.waterCellYear[data-level="1"]{ background: var(--water-1); }
.waterCellYear[data-level="2"]{ background: var(--water-2); }
.waterCellYear[data-level="3"]{ background: var(--water-3); }
.waterCellYear[data-level="4"]{ background: var(--water-4); }

.waterActions{
  margin-top: 10px;
}

.waterLegend{
  margin-top: 10px;
  display: grid;
  gap: 4px;
  line-height: 1.25;
}

/* Mobile tweaks */
@media (max-width: 720px){
  .panel.main{ padding: 14px; }
}
