html {
  min-height: 100%;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px 20px 40px;
  color: #222;
  min-height: 100vh;
  background: linear-gradient(to bottom, #4a4a4a 0%, #ffffff 100%);
  background-attachment: fixed;
}

/* Base header look */
header {
  text-align: center;
  margin-bottom: 2em;
}

h1 {
  font-size: 3rem;
  margin-bottom: 0.1em;
}

h1 a {
  color: inherit;
  text-decoration: none;
}

.tagline {
  color: #555;
  font-size: 1.2rem;
  font-style: italic;
  margin-top: 0;
}

nav {
  margin-top: 1.5em;
  padding: 12px 0;
}

nav a {
  display: inline-block;
  margin: 0 14px;
  color: #0b5cad;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* Sticky wrapper with a see-through copy of the page gradient */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0 -20px 1em;
  padding: 0 20px;
  background: linear-gradient(to bottom, rgba(74, 74, 74, 0.6) 0%, rgba(255, 255, 255, 0.6) 100%);
  background-attachment: fixed;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

#site-header header {
  background: none;
  margin-bottom: 0;
  padding: 10px 0;
}

#site-header .tagline {
  max-height: 3em;
  overflow: hidden;
  color: #e5e5e5;
}

/* Header text colors (readable on the dark top of the gradient) */
#site-header h1 a {
  color: #ffffff;
}

#site-header nav {
  margin-top: 1.5em;
  padding: 12px 0;
  border-top: 2px solid rgba(255, 255, 255, 0.4);
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
}

#site-header h1 a,
#site-header .tagline,
#site-header nav a {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Page content */
h2 {
  margin-top: 0.8em;
}

.card {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  padding: 16px 20px;
  margin: 16px 0;
}

footer {
  margin-top: 3em;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

/* About page */
.about {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.about img {
  width: 260px;
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.about-text {
  flex: 1;
  min-width: 260px;
}

/* Calendar */
.calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0;
  font-size: 1.4rem;
}

.calendar-controls button {
  padding: 10px 20px;
  font-size: 1rem;
  border: 1px solid #ccc;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  cursor: pointer;
}

.calendar {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
}

.calendar th,
.calendar td {
  border: 1px solid #ccc;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
  height: 60px;
}

.calendar th {
  background: rgba(255, 255, 255, 0.9);
  height: auto;
  text-align: center;
  font-size: 1.1rem;
}

.calendar td.today {
  background: #bfdbfe;
  font-weight: bold;
}

/* Calendar day colors (keep these below .today) */
.calendar td.has-school {
  background: #e9d5ff;
  font-weight: bold;
}

.calendar td.has-fun {
  background: #fff3c4;
  font-weight: bold;
}

.calendar td.has-both {
  background: linear-gradient(135deg, #e9d5ff 50%, #fff3c4 50%);
  font-weight: bold;
}

.calendar td.empty {
  background: rgba(255, 255, 255, 0.3);
}

/* Two side-by-side upcoming lists */
.upcoming {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 0.5em;
}

.upcoming-col {
  flex: 1;
  min-width: 240px;
}

.upcoming-col h4 {
  margin: 0 0 6px;
  padding-left: 10px;
  border-left: 6px solid;
}

.upcoming-col.school h4 { border-color: #a855f7; }
.upcoming-col.fun h4 { border-color: #f5b301; }

.legend {
  margin: 8px 0;
}

.chip {
  display: block;
  font-size: 0.8rem;
  line-height: 1.3;
  padding: 2px 6px;
  margin-top: 4px;
  border-radius: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend .chip {
  display: inline-block;
  margin-right: 8px;
}

.chip.school {
  background: #bfdbfe;
  color: #1e3a8a;
}

.chip.fun {
  background: #fde68a;
  color: #78350f;
}

.day-num {
  font-weight: bold;
}

.chip.join-left {
  margin-left: -11px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.chip.join-right {
  margin-right: -11px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  position: relative;
  z-index: 1;
  overflow: visible;
  text-overflow: clip;
}

.chip.spacer {
  visibility: hidden;
}