/* Wagakki Calendar styles */
.wagakki-cal {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  font-family: inherit;
}

.wagakki-cal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #eef0f3;
}

.wagakki-cal__nav {
  display: flex;
  gap: 8px;
}
.wagakki-cal__btn {
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.wagakki-cal__title {
  font-weight: 700;
  font-size: 18px;
}

.wagakki-cal__weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f9fafb;
  border-bottom: 1px solid #eef0f3;
}
.wagakki-cal__weekday {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-align: right;
}

.wagakki-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: #eef0f3;
}

/* セルは可変高さ（イベント数が多い日も自然に伸びる） */
.wagakki-cal__cell {
  background: #fff;
  min-height: 90px;
  padding: 6px 6px 8px 6px;
  display: flex;
  flex-direction: column;
}
.wagakki-cal__date {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
  text-align: right;
}
.wagakki-cal__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.wagakki-cal__event a {
  display: block;
  font-size: 12px;
  line-height: 1.35;
  text-decoration: none;
  border-left: 3px solid #d1d5db;
  padding: 2px 4px 2px 6px;
  word-break: break-word;
}
.wagakki-cal--today .wagakki-cal__date {
  color: #111827;
  font-weight: 700;
}

/* スマホでの余白 */
@media (max-width: 640px) {
  .wagakki-cal__title { font-size: 16px; }
  .wagakki-cal__cell { min-height: 78px; }
}


/* ---- Bullet removal & tighter mobile layout tweaks ---- */
/* Kill any theme-provided bullets/markers/pseudo content */
.wagakki-cal__list,
.wagakki-cal__list li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}
.wagakki-cal__list li::before,
.wagakki-cal__list li::after {
  content: none !important;
}
.wagakki-cal__list li::marker {
  content: "" !important;
}

/* Slightly tighter default spacing */
.wagakki-cal__list { gap: 3px; }
.wagakki-cal__event a { padding: 2px 4px 2px 6px; }

/* Mobile: reduce sizes to avoid tall cells */
@media (max-width: 640px) {
  .wagakki-cal__weekday { font-size: 11px; padding: 6px 8px; }
  .wagakki-cal__date { font-size: 11px; margin-bottom: 2px; }
  .wagakki-cal__list { gap: 2px; }
  .wagakki-cal__event a {
    font-size: 11px;
    line-height: 1.25;
    padding: 1px 3px 1px 5px;
    border-left-width: 2px;
  }
  .wagakki-cal__cell { min-height: 64px; padding: 4px 4px 6px 4px; }
  .wagakki-cal__title { font-size: 16px; }
}

/* ---- Horizontal text & 2-line clamp on mobile ---- */
.wagakki-cal__event,
.wagakki-cal__event a {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
}
@media (max-width: 640px) {
  .wagakki-cal__event a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    word-break: break-word;
    line-height: 1.25;
    font-size: 11px;
  }
  .wagakki-cal__cell { min-height: 56px; }
}

/* ---- Remove residual left indent & shrink border gap ---- */
.wagakki-cal .wagakki-cal__list { padding-left: 0 !important; margin-left: 0 !important; }
.wagakki-cal .wagakki-cal__list li { padding-left: 0 !important; margin-left: 0 !important; list-style: none !important; }

/* Slim border and minimal padding */
.wagakki-cal .wagakki-cal__event a {
  border-left-width: 1px !important;
  padding-left: 4px !important;
  box-sizing: border-box;
}

@media (max-width: 640px) {
  .wagakki-cal .wagakki-cal__event a {
    border-left-width: 1px !important;
    padding-left: 3px !important;
  }
}
