* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #c7c6c3;
  color: #1a1a1a;
  overflow: hidden;
  height: 100vh;
}

.hub-grid {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  grid-template-rows: 1fr auto;
  height: 100vh;
  gap: 12px;
  padding: 12px 40px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.sidebar.left { grid-column: 1; grid-row: 1; }
.sidebar.right { grid-column: 3; grid-row: 1; }

/* Groups Weather + Photos into one 50%-height block within the left sidebar */
.stack-half {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.main-calendar {
  grid-column: 2;
  grid-row: 1;
  background: #d2d1cf;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #b0b0ad;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.widget {
  background: #d2d1cf;
  border-radius: 16px;
  padding: 16px;
  flex: 1;
  border: 1px solid #b0b0ad;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.widget h3, .main-calendar h3, .bottom-bar h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #333333;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.widget-content {
  font-size: 1rem;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

#spin-btn {
  background: #333333;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

#spin-btn:active {
  transform: scale(0.97);
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.calendar-header button {
  background: #c6c5c3;
  color: #1a1a1a;
  border: 1px solid #b0b0ad;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 1.1rem;
  cursor: pointer;
}

.calendar-header h3 {
  color: #1a1a1a;
  font-size: 2.4rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: auto repeat(6, 1fr);
  gap: 4px;
  flex: 1;
  min-height: 0;
}

.calendar-day-label {
  text-align: center;
  font-size: 0.75rem;
  color: #888;
  padding-bottom: 4px;
}

.calendar-day {
  background: #c0bebb;
  border-radius: 8px;
  padding: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.calendar-day.other-month {
  opacity: 0.3;
}

.calendar-day.today {
  border: 2px solid #1a1a1a;
}

.day-number {
  font-size: 0.85rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.event-tag {
  background: #333333;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 5px;
  padding: 4px 6px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  touch-action: manipulation;
}
/* Append this to the bottom of style.css */

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.widget-header h3 {
  margin: 0;
}

.widget-header-btns {
  display: flex;
  gap: 8px;
}

.widget-add-btn {
  background: #2C4A6E;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.widget-add-btn::after {
  content: '';
  position: absolute;
  top: -16px;
  right: -16px;
  bottom: -16px;
  left: -16px;
}

.widget-next-btn {
  background: rgba(0, 0, 0, 0.08);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  touch-action: manipulation;
  position: relative;
}

.widget-next-btn::after {
  content: '';
  position: absolute;
  top: -16px;
  right: -16px;
  bottom: -16px;
  left: -16px;
}

.widget-next-btn:hover {
  background: rgba(0, 0, 0, 0.14);
}

.widget-empty {
  opacity: 0.6;
  font-style: italic;
  display: block;
  padding: 6px 0;
}

.chore-section {
  margin-bottom: 10px;
}

.chore-section h4 {
  margin: 0 0 4px 0;
  font-size: 0.95rem;
}

.slideshow-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.weather-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 100%;
}

.weather-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.weather-icon-big {
  font-size: 4.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.weather-temp {
  font-size: 2.2rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.1;
}

.weather-condition {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333333;
  margin-top: 2px;
}

.weather-location {
  font-size: 0.85rem;
  color: #888888;
  margin-top: 4px;
}

.weather-uv {
  font-size: 0.85rem;
  color: #555555;
  font-weight: 700;
  margin-top: 6px;
}

/* ---- Event detail modal ---- */
.ev-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.ev-overlay.ev-open {
  display: flex;
}

.ev-modal {
  position: relative;
  background: #d3d2d0;
  border-radius: 16px;
  width: 420px;
  max-width: 85vw;
  padding: 28px 24px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.ev-modal-color {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
}

.ev-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #c6c5c3;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
}

.ev-modal-close::after {
  content: '';
  position: absolute;
  top: -16px;
  right: -16px;
  bottom: -16px;
  left: -16px;
}

#event-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 10px 40px 10px 0;
  line-height: 1.3;
  word-wrap: break-word;
}

#event-modal-time {
  font-size: 1rem;
  color: #666;
  font-weight: 600;
}